  @Test
  public void testAddImages() {

    server.enqueue(jsonResponse(imageDetailsList));

    AddImagesOptions options =
        new AddImagesOptions.Builder()
            .addImagesFile(fileWithMetadata)
            .addImageUrl(IMAGE_URL)
            .collectionId(COLLECTION_ID)
            .trainingData(TRAINING_DATA)
            .build();
    ImageDetailsList response = service.addImages(options).execute().getResult();

    assertImageDetails(response.getImages().get(0));
    assertEquals(CODE, response.getWarnings().get(0).getCode());
    assertEquals(MESSAGE, response.getWarnings().get(0).getMessage());
    assertEquals(MORE_INFO, response.getWarnings().get(0).getMoreInfo());
    assertEquals(TRACE, response.getTrace());
  }