Added JUnit for testing and fixed AutoTextView so that it passes checkstyle

As above

colinkho