@@ -0,0 +1,2206 @@
+package com.filestack;%0A%0Aimport java.io.File;%0Aimport java.util.ArrayList;%0Aimport java.util.Map;%0Aimport org.junit.AfterClass;%0Aimport org.junit.Assert;%0Aimport org.junit.Test;%0A%0Apublic class TestImageTagging %7B%0A  private static final String API_KEY = System.getenv(%22API_KEY%22);%0A  private static final String POLICY = System.getenv(%22POLICY%22);%0A  private static final String SIGNATURE = System.getenv(%22SIGNATURE%22);%0A  private static final Security SECURITY = Security.fromExisting(POLICY, SIGNATURE);%0A%0A  private static ArrayList%3CString%3E handles = new ArrayList%3C%3E();%0A  private static ArrayList%3CFile%3E files = new ArrayList%3C%3E();%0A%0A  @Test%0A  public void testImageTags() throws Exception %7B%0A    FilestackClient client = new FilestackClient(API_KEY, SECURITY);%0A%0A    ClassLoader loader = Thread.currentThread().getContextClassLoader();%0A    String origPath = loader.getResource(%22com/filestack/sample_image.jpg%22).getPath();%0A    File origFile = new File(origPath);%0A%0A    FileLink fileLink = client.upload(origPath, %22image/jpeg%22);%0A    handles.add(fileLink.getHandle());%0A%0A    Map%3CString, Integer%3E tags = fileLink.imageTags();%0A    Assert.assertNotNull(tags.get(%22nebula%22));%0A  %7D%0A%0A  @Test%0A  public void testImageSfw() throws Exception %7B%0A    FilestackClient client = new FilestackClient(API_KEY, SECURITY);%0A%0A    ClassLoader loader = Thread.currentThread().getContextClassLoader();%0A    String origPath = loader.getResource(%22com/filestack/sample_image.jpg%22).getPath();%0A    File origFile = new File(origPath);%0A%0A    FileLink fileLink = client.upload(origPath, %22image/jpeg%22);%0A    handles.add(fileLink.getHandle());%0A%0A    Assert.assertTrue(fileLink.imageSfw());%0A  %7D%0A%0A  /** Deletes any files uploaded during tests. */%0A  @AfterClass%0A  public static void cleanupHandles() %7B%0A    for (String handle : handles) %7B%0A      FileLink fileLink = new FileLink(API_KEY, handle, SECURITY);%0A      try %7B%0A        fileLink.delete();%0A      %7D catch (Exception e) %7B%0A        Assert.fail(%22FileLink delete failed%22);%0A      %7D%0A    %7D%0A  %7D%0A%0A  /** Deletes any local files created during tests. */%0A  @AfterClass%0A  public static void cleanupFiles() %7B%0A    for (File file : files) %7B%0A      if (!file.delete()) %7B%0A        Assert.fail(%22Unable to cleanup resource%22);%0A      %7D%0A    %7D%0A  %7D%0A%7D

Add integration tests for image tagging