wrote junit tests