tests for java gen