Transforming main into JUnit test