Wrote JUnit

Wrote my JUnit tests. Fixed an error I found through them.