OptimizationResponse implements Serializable { @NonNull public static Builder builder() { return new AutoValue_OptimizationResponse.Builder(); }  @NonNull static Builder builder(); @Nullable abstract String code(); @Nullable abstract List<OptimizationWaypoint> waypoints(); @Nullable abstract List<DirectionsRoute> trips(); abstract Builder toBuilder(); static TypeAdapter<OptimizationResponse> typeAdapter(Gson gson);  }
@Test public void sanityTest() throws Exception { OptimizationResponse optimizationResponse = OptimizationResponse.builder() .build(); assertNotNull(optimizationResponse); }
@Test public void testSerializable() throws IOException, ClassNotFoundException { MapboxOptimization client = MapboxOptimization.builder() .coordinate(Point.fromLngLat(1.0, 1.0)) .coordinate(Point.fromLngLat(2.0, 2.0)) .baseUrl(mockUrl.toString()) .accessToken(ACCESS_TOKEN) .build(); Response<OptimizationResponse> response = client.executeCall(); byte[] bytes = serialize(response.body()); assertEquals(response.body(), deserialize(bytes, OptimizationResponse.class)); }