test java api call