Default [Q] how to test code?

how to write unit tests or any testing code in android? any pointers/links will be helpful