Added unit test on java method invocation (reference not modified)