added junit test.