Added JUnit that tests both positive and negative cases.