Added unit tests

Added RMI unit tests
Added java file license header