Improve acceptance test for java