Fix broken assertion in javamethod
Add test case (doesn't actually work)