removed unnecessary code, changed test to more junit4