Add creation helpers and tests for java database api