Fixed checkstyle errors and removed use of assert keyword, replaces with JUnit assertions