Converted some "tests" to proper JUnit tests