// Path: coopr-server/src/main/java/co/cask/coopr/spec/plugin/AutomatorType.java
// public class AutomatorType extends AbstractPluginSpecification {
// 
//   private AutomatorType(BaseEntity.Builder baseBuilder,
//                         Map<ParameterType, ParametersSpecification> parameters,
//                         Map<String, ResourceTypeSpecification> resourceTypes) {
//     super(baseBuilder, parameters, resourceTypes);
//   }
// 
//   /**
//    * Get a builder for creating automator types.
//    *
//    * @return builder for creating automator types
//    */
//   public static Builder builder() {
//     return new Builder();
//   }
// 
//   /**
//    * Builder for creating automator types.
//    */
//   public static class Builder extends AbstractPluginSpecification.Builder<AutomatorType> {
//     @Override
//     public AutomatorType build() {
//       return new AutomatorType(this, parameters, resourceTypes);
//     }
//   }
// }


import co.cask.common.http.exception.HttpFailureException;
import co.cask.coopr.client.ClientManager;
import co.cask.coopr.client.PluginClient;
import co.cask.coopr.client.rest.handler.PluginTestConstants;
import co.cask.coopr.client.rest.handler.PluginTestHandler;
import co.cask.coopr.provisioner.plugin.ResourceMeta;
import co.cask.coopr.provisioner.plugin.ResourceStatus;
import co.cask.coopr.spec.plugin.AutomatorType;
import co.cask.coopr.spec.plugin.ProviderType;
import co.cask.http.NettyHttpService;
import com.google.common.collect.ImmutableSet;
import org.apache.http.HttpStatus;
import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;
import java.io.IOException;
import java.util.List;
import java.util.Map;
import java.util.Set;
    } catch (HttpFailureException e) {
      Assert.assertEquals(HttpStatus.SC_NOT_FOUND, e.getStatusCode());
    }
  }

  @Test
  public void stageAutomatorTypeResourceSuccessTest() throws IOException {
    PluginClient pluginRestClient = clientManager.getPluginClient();
    pluginRestClient.stageAutomatorTypeResource(PluginTestConstants.CHEF_PLUGIN, PluginTestConstants.TEST_RESOURCE_TYPE,
                                                PluginTestConstants.REACTOR_RESOURCE, PluginTestConstants.VERSION);
  }

  @Test
  public void recallAutomatorTypeResourceSuccessTest() throws IOException {
    pluginRestClient.recallAutomatorTypeResource(PluginTestConstants.CHEF_PLUGIN,
                                                 PluginTestConstants.TEST_RESOURCE_TYPE,
                                                 PluginTestConstants.REACTOR_RESOURCE, PluginTestConstants.VERSION);
  }

  @Test
  public void deleteAutomatorTypeResourceSuccessTest() throws IOException {
    pluginRestClient.deleteAutomatorTypeResourceVersion(PluginTestConstants.CHEF_PLUGIN,
                                                        PluginTestConstants.TEST_RESOURCE_TYPE,
                                                        PluginTestConstants.REACTOR_RESOURCE,
                                                        PluginTestConstants.VERSION);
  }

  @Test
  public void getAllProviderTypesSuccessTest() throws IOException {
    List<ProviderType> allProviderTypes = pluginRestClient.getAllProviderTypes();
// Path: coopr-server/src/main/java/co/cask/coopr/spec/plugin/AutomatorType.java
// public class AutomatorType extends AbstractPluginSpecification {
// 
//   private AutomatorType(BaseEntity.Builder baseBuilder,
//                         Map<ParameterType, ParametersSpecification> parameters,
//                         Map<String, ResourceTypeSpecification> resourceTypes) {
//     super(baseBuilder, parameters, resourceTypes);
//   }
// 
//   /**
//    * Get a builder for creating automator types.
//    *
//    * @return builder for creating automator types
//    */
//   public static Builder builder() {
//     return new Builder();
//   }
// 
//   /**
//    * Builder for creating automator types.
//    */
//   public static class Builder extends AbstractPluginSpecification.Builder<AutomatorType> {
//     @Override
//     public AutomatorType build() {
//       return new AutomatorType(this, parameters, resourceTypes);
//     }
//   }
// }


// Path: coopr-rest-client/src/test/java/co/cask/coopr/client/rest/PluginRestTest.java
import co.cask.common.http.exception.HttpFailureException;
import co.cask.coopr.client.ClientManager;
import co.cask.coopr.client.PluginClient;
import co.cask.coopr.client.rest.handler.PluginTestConstants;
import co.cask.coopr.client.rest.handler.PluginTestHandler;
import co.cask.coopr.provisioner.plugin.ResourceMeta;
import co.cask.coopr.provisioner.plugin.ResourceStatus;
import co.cask.coopr.spec.plugin.AutomatorType;
import co.cask.coopr.spec.plugin.ProviderType;
import co.cask.http.NettyHttpService;
import com.google.common.collect.ImmutableSet;
import org.apache.http.HttpStatus;
import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;
import java.io.IOException;
import java.util.List;
import java.util.Map;
import java.util.Set;

    } catch (HttpFailureException e) {
      Assert.assertEquals(HttpStatus.SC_NOT_FOUND, e.getStatusCode());
    }
  }

  @Test
  public void stageAutomatorTypeResourceSuccessTest() throws IOException {
    PluginClient pluginRestClient = clientManager.getPluginClient();
    pluginRestClient.stageAutomatorTypeResource(PluginTestConstants.CHEF_PLUGIN, PluginTestConstants.TEST_RESOURCE_TYPE,
                                                PluginTestConstants.REACTOR_RESOURCE, PluginTestConstants.VERSION);
  }

  @Test
  public void recallAutomatorTypeResourceSuccessTest() throws IOException {
    pluginRestClient.recallAutomatorTypeResource(PluginTestConstants.CHEF_PLUGIN,
                                                 PluginTestConstants.TEST_RESOURCE_TYPE,
                                                 PluginTestConstants.REACTOR_RESOURCE, PluginTestConstants.VERSION);
  }

  @Test
  public void deleteAutomatorTypeResourceSuccessTest() throws IOException {
    pluginRestClient.deleteAutomatorTypeResourceVersion(PluginTestConstants.CHEF_PLUGIN,
                                                        PluginTestConstants.TEST_RESOURCE_TYPE,
                                                        PluginTestConstants.REACTOR_RESOURCE,
                                                        PluginTestConstants.VERSION);
  }

  @Test
  public void getAllProviderTypesSuccessTest() throws IOException {
    List<ProviderType> allProviderTypes = pluginRestClient.getAllProviderTypes();
    Assert.assertEquals(allProviderTypes, PluginTestConstants.PROVIDER_LISTS);