Switching from the Java High Level Rest Client to the new Java API Client