Took a crack at JUnit tests.