MapboxDirections extends
  MapboxService<DirectionsResponse, DirectionsService> { private Call<DirectionsResponse> post() { return getService().postCall( ApiCallHelper.getHeaderUserAgent(clientAppName()), user(), profile(), FormatUtils.formatCoordinates(coordinates()), accessToken(), alternatives(), geometries(), overview(), radius(), steps(), bearing(), continueStraight(), annotation(), language(), roundaboutExits(), voiceInstructions(), bannerInstructions(), voiceUnits(), exclude(), approaches(), waypointIndices(), waypointNames(), waypointTargets(), enableRefresh(), walkingSpeed(), walkwayBias(), alleyBias() ); } protected  MapboxDirections(); @Override Response<DirectionsResponse> executeCall(); @Override void enqueueCall(final Callback<DirectionsResponse> callback); static Builder builder(); abstract Builder toBuilder();  }
@Test public void post() throws IOException { List<String> names = new ArrayList<>(); names.add("Home"); names.add("Work"); MapboxDirections mapboxDirections = MapboxDirections.builder() .profile(PROFILE_CYCLING) .origin(Point.fromLngLat(-122.42,37.78)) .destination(Point.fromLngLat(-77.03,38.91)) .steps(true) .voiceInstructions(true) .voiceUnits(DirectionsCriteria.IMPERIAL) .waypointNames(names) .accessToken(ACCESS_TOKEN) .baseUrl(mockUrl.toString()) .post() .build(); Response<DirectionsResponse> response = mapboxDirections.executeCall(); assertEquals(200, response.code()); assertEquals("Ok", response.body().code()); assertNotNull(response.body().routes()); assertEquals(1, response.body().routes().size()); }