Add clearer example java api usage