Migrate junit tests from 3.x to 4.x

* Use annotations
* Use org.junit.* instead of junit.framework.*
* Move test from outdated wildfire to openfire package
* Small code cleanups