Junit 4 refactoring

I updated the junit version from 3.8.2 to 4.11 and refactored the unit tests to receive benefit from this.