Make an indpendent test setup for Java tests

Update the tests to run with the new setup