@Test public void getMatrix() { JSONIndividualMatrixResponse durationMatrix = jsonMatrixDurationsResponse.getMatrix(); Assert.assertNotNull(durationMatrix.getDurations()); Assert.assertNull(durationMatrix.getDistances()); Assert.assertEquals(3, durationMatrix.getDestinations().size()); Assert.assertEquals(3, durationMatrix.getSources().size()); Assert.assertEquals(8.681495, durationMatrix.getSources().get(0).location.x, 0); Assert.assertEquals(49.41461, durationMatrix.getSources().get(0).location.y, 0); Assert.assertEquals(Double.NaN, durationMatrix.getSources().get(0).location.z, 0); Assert.assertNotNull(durationMatrix.getSources().get(0).name); Assert.assertEquals(0.0, durationMatrix.getSources().get(0).getSnappedDistance(), 0); JSONIndividualMatrixResponse distanceMatrix = jsonMatrixDistancesResponse.getMatrix(); Assert.assertNotNull(distanceMatrix.getDistances()); Assert.assertNull(distanceMatrix.getDurations()); Assert.assertEquals(3, distanceMatrix.getDestinations().size()); Assert.assertEquals(3, distanceMatrix.getSources().size()); Assert.assertEquals(8.681495, distanceMatrix.getSources().get(0).location.x, 0); Assert.assertEquals(49.41461, distanceMatrix.getSources().get(0).location.y, 0); Assert.assertEquals(Double.NaN, distanceMatrix.getSources().get(0).location.z, 0); Assert.assertNull(distanceMatrix.getSources().get(0).name); Assert.assertEquals(0.0, distanceMatrix.getSources().get(0).getSnappedDistance(), 0); JSONIndividualMatrixResponse combinedMatrix = jsonMatrixCombinedResponse.getMatrix(); Assert.assertNotNull(combinedMatrix.getDistances()); Assert.assertNotNull(combinedMatrix.getDurations()); Assert.assertEquals(3, combinedMatrix.getDestinations().size()); Assert.assertEquals(3, combinedMatrix.getSources().size()); Assert.assertEquals(8.681495, combinedMatrix.getSources().get(0).location.x, 0); Assert.assertEquals(49.41461, combinedMatrix.getSources().get(0).location.y, 0); Assert.assertEquals(Double.NaN, combinedMatrix.getSources().get(0).location.z, 0); Assert.assertNotNull(combinedMatrix.getSources().get(0).name); Assert.assertEquals(0.0, combinedMatrix.getSources().get(0).getSnappedDistance(), 0); }
@JsonProperty("matrix") @JsonUnwrapped public JSONIndividualMatrixResponse getMatrix() { return new JSONIndividualMatrixResponse(matrixResult, matrixRequest); }
JSONMatrixResponse extends MatrixResponse { @JsonProperty("matrix") @JsonUnwrapped public JSONIndividualMatrixResponse getMatrix() { return new JSONIndividualMatrixResponse(matrixResult, matrixRequest); } }
JSONMatrixResponse extends MatrixResponse { @JsonProperty("matrix") @JsonUnwrapped public JSONIndividualMatrixResponse getMatrix() { return new JSONIndividualMatrixResponse(matrixResult, matrixRequest); } JSONMatrixResponse(MatrixResult result, MatrixRequest request); }
JSONMatrixResponse extends MatrixResponse { @JsonProperty("matrix") @JsonUnwrapped public JSONIndividualMatrixResponse getMatrix() { return new JSONIndividualMatrixResponse(matrixResult, matrixRequest); } JSONMatrixResponse(MatrixResult result, MatrixRequest request); @JsonProperty("matrix") @JsonUnwrapped JSONIndividualMatrixResponse getMatrix(); @JsonProperty("metadata") @ApiModelProperty("Information about the service and request") MatrixResponseInfo getInfo(); }
JSONMatrixResponse extends MatrixResponse { @JsonProperty("matrix") @JsonUnwrapped public JSONIndividualMatrixResponse getMatrix() { return new JSONIndividualMatrixResponse(matrixResult, matrixRequest); } JSONMatrixResponse(MatrixResult result, MatrixRequest request); @JsonProperty("matrix") @JsonUnwrapped JSONIndividualMatrixResponse getMatrix(); @JsonProperty("metadata") @ApiModelProperty("Information about the service and request") MatrixResponseInfo getInfo();  }