You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by ra...@apache.org on 2014/12/23 05:26:53 UTC

[29/51] [partial] stratos git commit: dropping jclouds 1.8.0 clone

http://git-wip-us.apache.org/repos/asf/stratos/blob/a9834e9e/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/AllocateAddressResponseHandlerTest.java
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/AllocateAddressResponseHandlerTest.java b/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/AllocateAddressResponseHandlerTest.java
deleted file mode 100644
index 68b7265..0000000
--- a/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/AllocateAddressResponseHandlerTest.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.ec2.xml;
-
-import static org.testng.Assert.assertEquals;
-
-import java.io.InputStream;
-import java.net.UnknownHostException;
-
-import org.jclouds.http.functions.BaseHandlerTest;
-import org.testng.annotations.Test;
-
-/**
- * Tests behavior of {@code AllocateAddressResponseHandler}
- */
-//NOTE:without testName, this will not call @Before* and fail w/NPE during surefire
-@Test(groups = "unit", testName = "AllocateAddressResponseHandlerTest")
-public class AllocateAddressResponseHandlerTest extends BaseHandlerTest {
-   public void testApplyInputStream() throws UnknownHostException {
-
-      InputStream is = getClass().getResourceAsStream("/allocate_address.xml");
-
-      String result = factory.create(injector.getInstance(AllocateAddressResponseHandler.class))
-               .parse(is);
-
-      assertEquals(result, "67.202.55.255");
-   }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/a9834e9e/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/AttachmentHandlerTest.java
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/AttachmentHandlerTest.java b/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/AttachmentHandlerTest.java
deleted file mode 100644
index d43306d..0000000
--- a/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/AttachmentHandlerTest.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.ec2.xml;
-
-import static org.testng.Assert.assertEquals;
-
-import java.io.InputStream;
-
-import org.jclouds.date.DateService;
-import org.jclouds.ec2.domain.Attachment;
-import org.jclouds.http.functions.ParseSax;
-import org.testng.annotations.Test;
-
-/**
- * Tests behavior of {@code AttachmentHandler}
- */
-// NOTE:without testName, this will not call @Before* and fail w/NPE during surefire
-@Test(groups = "unit", testName = "AttachmentHandlerTest")
-public class AttachmentHandlerTest extends BaseEC2HandlerTest {
-   public void testApplyInputStream() {
-      DateService dateService = injector.getInstance(DateService.class);
-      InputStream is = getClass().getResourceAsStream("/attach.xml");
-
-      Attachment expected = new Attachment(defaultRegion, "vol-4d826724", "i-6058a509", "/dev/sdh",
-            Attachment.Status.ATTACHING, dateService.iso8601DateParse("2008-05-07T11:51:50.000Z"));
-
-      AttachmentHandler handler = injector.getInstance(AttachmentHandler.class);
-      addDefaultRegionToHandler(handler);
-      Attachment result = factory.create(handler).parse(is);
-
-      assertEquals(result, expected);
-   }
-
-   private void addDefaultRegionToHandler(ParseSax.HandlerWithResult<?> handler) {
-      handler.setContext(request);
-   }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/a9834e9e/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/BaseEC2HandlerTest.java
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/BaseEC2HandlerTest.java b/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/BaseEC2HandlerTest.java
deleted file mode 100644
index d789d86..0000000
--- a/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/BaseEC2HandlerTest.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.ec2.xml;
-
-import java.util.Map;
-import java.util.Set;
-
-import javax.inject.Singleton;
-
-import org.jclouds.aws.domain.Region;
-import org.jclouds.http.functions.BaseHandlerTest;
-import org.jclouds.http.functions.ParseSax;
-import org.jclouds.http.functions.config.SaxParserModule;
-import org.jclouds.location.Zone;
-import org.jclouds.util.Suppliers2;
-import org.testng.annotations.BeforeTest;
-import org.testng.annotations.Test;
-
-import com.google.common.base.Supplier;
-import com.google.common.base.Suppliers;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.ImmutableSet;
-import com.google.common.collect.Maps;
-import com.google.inject.AbstractModule;
-import com.google.inject.Guice;
-import com.google.inject.Provides;
-
-@Test(groups = "unit")
-public abstract class BaseEC2HandlerTest extends BaseHandlerTest {
-   protected String defaultRegion = Region.US_EAST_1;
-
-   @BeforeTest
-   @Override
-   protected void setUpInjector() {
-      injector = Guice.createInjector(new SaxParserModule(), new AbstractModule() {
-
-         @Override
-         protected void configure() {
-
-         }
-
-         @Singleton
-         @Provides
-         @org.jclouds.location.Region
-         Supplier<String> provideDefaultRegion() {
-            return Suppliers.ofInstance(defaultRegion);
-         }
-
-         @Singleton
-         @Provides
-         @Zone
-         Supplier<Map<String, Supplier<Set<String>>>> provideRegionToAvailabilityZoneMap() {
-            return Suppliers.<Map<String, Supplier<Set<String>>>> ofInstance(Maps.transformValues(ImmutableMap
-                     .<String, Set<String>> of("us-east-1", ImmutableSet.of("us-east-1a")), Suppliers2
-                     .<Set<String>> ofInstanceFunction()));
-         }
-
-         @Singleton
-         @Provides
-         @Zone
-         Supplier<Set<String>> provideZones() {
-            return Suppliers.<Set<String>> ofInstance(ImmutableSet.of("us-east-1a"));
-         }
-      });
-      factory = injector.getInstance(ParseSax.Factory.class);
-      assert factory != null;
-   }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/a9834e9e/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/BlockDeviceMappingHandlerTest.java
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/BlockDeviceMappingHandlerTest.java b/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/BlockDeviceMappingHandlerTest.java
deleted file mode 100644
index 16eb8fa..0000000
--- a/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/BlockDeviceMappingHandlerTest.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.ec2.xml;
-
-import static org.testng.Assert.assertEquals;
-
-import java.io.InputStream;
-import java.util.Map;
-
-import org.jclouds.date.DateService;
-import org.jclouds.ec2.domain.Attachment;
-import org.jclouds.ec2.domain.BlockDevice;
-import org.jclouds.http.functions.BaseHandlerTest;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableMap;
-
-/**
- * Tests behavior of {@code BlockDeviceMappingHandler}
- */
-//NOTE:without testName, this will not call @Before* and fail w/NPE during surefire
-@Test(groups = "unit", testName = "BlockDeviceMappingHandlerTest")
-public class BlockDeviceMappingHandlerTest extends BaseHandlerTest {
-   public void testApplyInputStream() {
-
-      InputStream is = getClass().getResourceAsStream(
-               "/describe_image_attribute_blockDeviceMapping.xml");
-
-      DateService dateService = injector.getInstance(DateService.class);
-      Map<String, BlockDevice> expected = ImmutableMap.<String, BlockDevice> of("/dev/sda1",
-               new BlockDevice("vol-d74b82be", Attachment.Status.ATTACHED, dateService
-                        .iso8601DateParse("2010-02-20T18:25:26.000Z"), true), "/dev/sdf",
-               new BlockDevice("vol-another", Attachment.Status.DETACHED, dateService
-                        .iso8601DateParse("2010-02-20T19:26:26.000Z"), false));
-
-      Map<String, BlockDevice> result = factory.create(
-               injector.getInstance(BlockDeviceMappingHandler.class)).parse(is);
-
-      assertEquals(result, expected);
-   }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/a9834e9e/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/BundleTaskHandlerTest.java
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/BundleTaskHandlerTest.java b/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/BundleTaskHandlerTest.java
deleted file mode 100644
index 3636fc9..0000000
--- a/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/BundleTaskHandlerTest.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.ec2.xml;
-
-import static org.testng.Assert.assertEquals;
-
-import java.io.InputStream;
-
-import org.jclouds.date.DateService;
-import org.jclouds.ec2.domain.BundleTask;
-import org.jclouds.http.functions.ParseSax;
-import org.testng.annotations.Test;
-
-/**
- * Tests behavior of {@code BundleTaskHandler}
- */
-//NOTE:without testName, this will not call @Before* and fail w/NPE during surefire
-@Test(groups = "unit", testName = "BundleTaskHandlerTest")
-public class BundleTaskHandlerTest extends BaseEC2HandlerTest {
-   public void testBundleInstance() {
-      DateService dateService = injector.getInstance(DateService.class);
-      InputStream is = getClass().getResourceAsStream("/bundle_instance.xml");
-
-      BundleTask expected = new BundleTask(defaultRegion, "bun-c1a540a8", null, "i-12345678", 70, dateService
-            .iso8601DateParse("2008-10-07T11:41:50.000Z"), "bundling", "my-bucket", "winami", dateService
-            .iso8601DateParse("2008-10-07T11:51:50.000Z"));
-
-      BundleTaskHandler handler = injector.getInstance(BundleTaskHandler.class);
-      addDefaultRegionToHandler(handler);
-      BundleTask result = factory.create(handler).parse(is);
-
-      assertEquals(result, expected);
-   }
-
-   public void testCancleBundleTask() {
-      DateService dateService = injector.getInstance(DateService.class);
-      InputStream is = getClass().getResourceAsStream("/cancel_bundle_task.xml");
-      BundleTask expected = new BundleTask(defaultRegion, "bun-cla322b9", null, "i-12345678", 20, dateService
-            .iso8601DateParse("2008-10-07T11:41:50.000Z"), "canceling", "my-bucket", "my-new-image", dateService
-            .iso8601DateParse("2008-10-07T11:51:50.000Z"));
-
-      BundleTaskHandler handler = injector.getInstance(BundleTaskHandler.class);
-      addDefaultRegionToHandler(handler);
-      BundleTask result = factory.create(handler).parse(is);
-
-      assertEquals(result, expected);
-   }
-
-   private void addDefaultRegionToHandler(ParseSax.HandlerWithResult<?> handler) {
-      handler.setContext(request);
-   }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/a9834e9e/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/CreateVolumeResponseHandlerTest.java
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/CreateVolumeResponseHandlerTest.java b/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/CreateVolumeResponseHandlerTest.java
deleted file mode 100644
index 278b978..0000000
--- a/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/CreateVolumeResponseHandlerTest.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.ec2.xml;
-
-import static org.testng.Assert.assertEquals;
-
-import java.io.InputStream;
-
-import org.jclouds.aws.domain.Region;
-import org.jclouds.date.DateService;
-import org.jclouds.ec2.domain.Attachment;
-import org.jclouds.ec2.domain.Volume;
-import org.jclouds.http.functions.ParseSax;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.Sets;
-
-/**
- * Tests behavior of {@code CreateVolumeResponseHandler}
- */
-//NOTE:without testName, this will not call @Before* and fail w/NPE during surefire
-@Test(groups = "unit", testName = "CreateVolumeResponseHandlerTest")
-public class CreateVolumeResponseHandlerTest extends BaseEC2HandlerTest {
-
-   public void testApplyInputStream() {
-      DateService dateService = injector.getInstance(DateService.class);
-      InputStream is = getClass().getResourceAsStream("/created_volume.xml");
-
-      Volume expected = new Volume(Region.US_EAST_1, "vol-2a21e543", 1, null,
-              "us-east-1a", Volume.Status.CREATING, dateService
-              .iso8601DateParse("2009-12-28T05:42:53.000Z"), "standard", 0, false,
-              Sets.<Attachment> newLinkedHashSet());
-
-      CreateVolumeResponseHandler handler = injector.getInstance(CreateVolumeResponseHandler.class);
-      addDefaultRegionToHandler(handler);
-      Volume result = factory.create(handler).parse(is);
-
-      assertEquals(result, expected);
-   }
-
-   private void addDefaultRegionToHandler(ParseSax.HandlerWithResult<?> handler) {
-      handler.setContext(request);
-   }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/a9834e9e/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/DescribeAddressesResponseHandlerTest.java
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/DescribeAddressesResponseHandlerTest.java b/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/DescribeAddressesResponseHandlerTest.java
deleted file mode 100644
index 65c61c2..0000000
--- a/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/DescribeAddressesResponseHandlerTest.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.ec2.xml;
-
-import static org.testng.Assert.assertEquals;
-
-import java.io.InputStream;
-import java.net.UnknownHostException;
-import java.util.Set;
-
-import org.jclouds.ec2.domain.PublicIpInstanceIdPair;
-import org.jclouds.http.functions.ParseSax;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableList;
-
-/**
- * Tests behavior of {@code DescribeAddressesResponseHandler}
- */
-//NOTE:without testName, this will not call @Before* and fail w/NPE during surefire
-@Test(groups = "unit", testName = "DescribeAddressesResponseHandlerTest")
-public class DescribeAddressesResponseHandlerTest extends BaseEC2HandlerTest {
-   public void testApplyInputStream() throws UnknownHostException {
-
-      InputStream is = getClass().getResourceAsStream("/describe_addresses.xml");
-
-      DescribeAddressesResponseHandler handler = injector
-               .getInstance(DescribeAddressesResponseHandler.class);
-      addDefaultRegionToHandler(handler);
-
-      Set<PublicIpInstanceIdPair> result = factory.create(handler).parse(is);
-
-      assertEquals(result, ImmutableList.of(new PublicIpInstanceIdPair(defaultRegion,
-               "67.202.55.255", "i-f15ebb98"), new PublicIpInstanceIdPair(defaultRegion,
-               "67.202.55.233", null)));
-   }
-
-   private void addDefaultRegionToHandler(ParseSax.HandlerWithResult<?> handler) {
-      handler.setContext(request);
-   }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/a9834e9e/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/DescribeAvailabilityZonesResponseHandlerTest.java
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/DescribeAvailabilityZonesResponseHandlerTest.java b/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/DescribeAvailabilityZonesResponseHandlerTest.java
deleted file mode 100644
index b29dd8d..0000000
--- a/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/DescribeAvailabilityZonesResponseHandlerTest.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.ec2.xml;
-
-import static org.testng.Assert.assertEquals;
-
-import java.io.InputStream;
-import java.util.Set;
-
-import javax.inject.Singleton;
-
-import org.jclouds.ec2.domain.AvailabilityZoneInfo;
-import org.jclouds.http.functions.BaseHandlerTest;
-import org.jclouds.http.functions.ParseSax;
-import org.jclouds.http.functions.config.SaxParserModule;
-import org.testng.annotations.BeforeTest;
-import org.testng.annotations.Test;
-
-import com.google.common.base.Supplier;
-import com.google.common.base.Suppliers;
-import com.google.common.collect.ImmutableSet;
-import com.google.inject.Guice;
-import com.google.inject.Provides;
-
-/**
- * Tests behavior of {@code DescribeAvailabilityZonesResponseHandler}
- */
-// NOTE:without testName, this will not call @Before* and fail w/NPE during surefire
-@Test(groups = "unit", testName = "DescribeAvailabilityZonesResponseHandlerTest")
-public class DescribeAvailabilityZonesResponseHandlerTest extends BaseHandlerTest {
-
-   @BeforeTest
-   protected void setUpInjector() {
-      injector = Guice.createInjector(new SaxParserModule() {
-         
-         @Singleton
-         @Provides
-         @org.jclouds.location.Region
-         Supplier<String> provideDefaultRegion() {
-            return Suppliers.ofInstance("SHOULDNTSEETHISASXMLHASREGIONDATA");
-         }
-
-      });
-      factory = injector.getInstance(ParseSax.Factory.class);
-      assert factory != null;
-   }
-
-   public void testApplyInputStream() {
-
-      InputStream is = getClass().getResourceAsStream("/availabilityZones.xml");
-
-      Set<AvailabilityZoneInfo> expected = ImmutableSet.<AvailabilityZoneInfo> of(
-
-      new AvailabilityZoneInfo("us-east-1a", "available", "us-east-1", ImmutableSet.<String> of()),
-               new AvailabilityZoneInfo("us-east-1b", "available", "us-east-1", ImmutableSet
-                        .<String> of()),
-
-               new AvailabilityZoneInfo("us-east-1c", "available", "us-east-1", ImmutableSet
-                        .<String> of("our service is awesome")),
-
-               new AvailabilityZoneInfo("us-east-1d", "downlikeaclown", "us-east-1", ImmutableSet
-                        .<String> of()));
-      Set<AvailabilityZoneInfo> result = factory.create(
-               injector.getInstance(DescribeAvailabilityZonesResponseHandler.class)).parse(is);
-
-      assertEquals(result, expected);
-   }
-
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/a9834e9e/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/DescribeBundleTasksResponseHandlerTest.java
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/DescribeBundleTasksResponseHandlerTest.java b/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/DescribeBundleTasksResponseHandlerTest.java
deleted file mode 100644
index 2f61ead..0000000
--- a/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/DescribeBundleTasksResponseHandlerTest.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.ec2.xml;
-
-import static org.testng.Assert.assertEquals;
-
-import java.io.InputStream;
-
-import org.jclouds.date.DateService;
-import org.jclouds.ec2.domain.BundleTask;
-import org.jclouds.http.functions.ParseSax;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.Iterables;
-
-/**
- * Tests behavior of {@code DescribeBundleTasksResponseHandler}
- */
-//NOTE:without testName, this will not call @Before* and fail w/NPE during surefire
-@Test(groups = "unit", testName = "DescribeBundleTasksResponseHandlerTest")
-public class DescribeBundleTasksResponseHandlerTest extends BaseEC2HandlerTest {
-   public void testApplyInputStream() {
-      DateService dateService = injector.getInstance(DateService.class);
-      InputStream is = getClass().getResourceAsStream("/describe_bundle_tasks.xml");
-
-      BundleTask expected = new BundleTask(defaultRegion, "bun-c1a540a8", null, "i-12345678", 20, dateService
-            .iso8601DateParse("2008-10-07T11:41:50.000Z"), "canceling", "my-bucket", "winami", dateService
-            .iso8601DateParse("2008-10-07T11:51:50.000Z"));
-
-      DescribeBundleTasksResponseHandler handler = injector.getInstance(DescribeBundleTasksResponseHandler.class);
-      addDefaultRegionToHandler(handler);
-      BundleTask result = Iterables.getOnlyElement(factory.create(handler).parse(is));
-
-      assertEquals(result, expected);
-   }
-
-   private void addDefaultRegionToHandler(ParseSax.HandlerWithResult<?> handler) {
-      handler.setContext(request);
-   }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/a9834e9e/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/DescribeImagesResponseHandlerTest.java
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/DescribeImagesResponseHandlerTest.java b/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/DescribeImagesResponseHandlerTest.java
deleted file mode 100644
index d44efa6..0000000
--- a/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/DescribeImagesResponseHandlerTest.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.ec2.xml;
-
-import static com.google.common.collect.Iterables.get;
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertNull;
-
-import java.io.InputStream;
-import java.util.Set;
-
-import org.jclouds.ec2.compute.functions.EC2ImageParserTest;
-import org.jclouds.ec2.domain.Hypervisor;
-import org.jclouds.ec2.domain.Image;
-import org.jclouds.ec2.domain.RootDeviceType;
-import org.jclouds.ec2.domain.VirtualizationType;
-import org.jclouds.ec2.domain.Image.Architecture;
-import org.jclouds.ec2.domain.Image.EbsBlockDevice;
-import org.jclouds.ec2.domain.Image.ImageState;
-import org.jclouds.ec2.domain.Image.ImageType;
-import org.jclouds.http.functions.ParseSax;
-import org.jclouds.http.functions.config.SaxParserModule;
-import org.jclouds.location.Region;
-import org.testng.annotations.Test;
-
-import com.google.common.base.Supplier;
-import com.google.common.base.Suppliers;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.ImmutableSet;
-import com.google.common.collect.Sets;
-import com.google.inject.AbstractModule;
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-import com.google.inject.TypeLiteral;
-
-/**
- * Tests behavior of {@code DescribeImagesResponseHandler}
- */
-@Test(groups = "unit", testName = "DescribeImagesResponseHandlerTest")
-public class DescribeImagesResponseHandlerTest {
-
-   public void testUNIX() {
-      Set<Image> contents = ImmutableSet.of(new Image("us-east-1", Architecture.I386, null, null, "ami-be3adfd7",
-               "ec2-public-images/fedora-8-i386-base-v1.04.manifest.xml", "206029621532", ImageState.AVAILABLE, "available",
-               ImageType.MACHINE, false, Sets.<String> newHashSet("9961934F"), "aki-4438dd2d", null, "ari-4538dd2c",
-               RootDeviceType.INSTANCE_STORE, null, ImmutableMap.<String, EbsBlockDevice> of(),
-               ImmutableMap.<String, String> of(), VirtualizationType.PARAVIRTUAL, Hypervisor.XEN));
-
-      Set<Image> result = parseImages("/describe_images.xml");
-
-      assertEquals(result.toString(), contents.toString());
-      assertEquals(get(result, 0).getImageState(), ImageState.AVAILABLE);
-      assertEquals(get(result, 0).getRawState(), "available");
-   }
-
-   public void testWindows() {
-      Set<Image> contents = ImmutableSet.of(new Image("us-east-1", Architecture.X86_64, null, null, "ami-02eb086b",
-               "aws-solutions-amis/SqlSvrStd2003r2-x86_64-Win_SFWBasic5.1-v1.0.manifest.xml", "771350841976",
-               ImageState.AVAILABLE, "available", ImageType.MACHINE, true, Sets.<String> newHashSet("5771E9A6"), null, "windows",
-               null, RootDeviceType.INSTANCE_STORE, null, ImmutableMap.<String, EbsBlockDevice> of(),
-               ImmutableMap.<String, String> of(), VirtualizationType.PARAVIRTUAL, Hypervisor.XEN));
-
-
-      Set<Image> result = parseImages("/describe_images_windows.xml");
-
-      assertEquals(result.toString(), contents.toString());
-      assertEquals(get(result, 0).getImageState(), ImageState.AVAILABLE);
-      assertEquals(get(result, 0).getRawState(), "available");
-   }
-
-   public void testEBS() {
-      Set<Image> contents = ImmutableSet.of(new Image("us-east-1", Architecture.I386, "websrv_2009-12-10",
-              "Web Server AMI", "ami-246f8d4d", "706093390852/websrv_2009-12-10", "706093390852",
-              ImageState.AVAILABLE, "available", ImageType.MACHINE, true, Sets.<String> newHashSet(), null, "windows", null,
-              RootDeviceType.EBS, "/dev/sda1",
-              ImmutableMap.<String, EbsBlockDevice> of("/dev/sda1",
-                      new EbsBlockDevice("snap-d01272b9", 30, true, "standard", null, false),
-                      "xvdf", new EbsBlockDevice("snap-d31272ba", 250, false, "standard", null, false)),
-              ImmutableMap.<String, String> of(), VirtualizationType.HVM, Hypervisor.XEN));
-
-      Set<Image> result = parseImages("/describe_images_ebs.xml");
-
-      assertEquals(result.toString(), contents.toString());
-      assertEquals(get(result, 0).getImageState(), ImageState.AVAILABLE);
-      assertEquals(get(result, 0).getRawState(), "available");
-      assertEquals(get(result, 0).getEbsBlockDevices().get("/dev/sda1").getVolumeType(), "standard");
-      assertEquals(get(result, 0).getEbsBlockDevices().get("/dev/sda1").isEncrypted(), false);
-      assertNull(get(result, 0).getEbsBlockDevices().get("/dev/sda1").getIops());
-   }
-   
-   public void testTags() {
-      Set<Image> contents = ImmutableSet.of(new Image("us-east-1", Architecture.I386, null, null, "ami-be3adfd7",
-            "ec2-public-images/fedora-8-i386-base-v1.04.manifest.xml", "206029621532", ImageState.AVAILABLE, "available",
-            ImageType.MACHINE, false, Sets.<String> newHashSet("9961934F"), "aki-4438dd2d", null, "ari-4538dd2c",
-            RootDeviceType.INSTANCE_STORE, null, ImmutableMap.<String, EbsBlockDevice> of(),
-            ImmutableMap.<String, String> of("Name", "Some machine name", "Second", "Second value"),
-            VirtualizationType.PARAVIRTUAL, Hypervisor.XEN));
-
-      Set<Image> result = parseImages("/describe_images_tags.xml");
-
-      assertEquals(result.toString(), contents.toString());
-      assertEquals(get(result, 0).getImageState(), ImageState.AVAILABLE);
-      assertEquals(get(result, 0).getRawState(), "available");
-      assertEquals(get(result, 0).getTags().get("Name"), "Some machine name");
-      assertEquals(get(result, 0).getTags().get("Second"), "Second value");
-   }
-
-   public void testDiabloWithIncorrectDisplayNameField() {
-      Set<Image> contents = ImmutableSet.of(new Image("us-east-1", Architecture.X86_64, "CentOS 6.2 Server 64-bit 20120125", "", "ami-0000054e",
-               "local (CentOS 6.2 Server 64-bit 20120125)", "", ImageState.AVAILABLE, "available",
-               ImageType.MACHINE, true, Sets.<String> newHashSet(), "aki-0000054c", null, "ari-0000054d",
-               RootDeviceType.INSTANCE_STORE, "/dev/sda1", ImmutableMap.<String, EbsBlockDevice> of(),
-               ImmutableMap.<String, String> of(), VirtualizationType.PARAVIRTUAL, Hypervisor.XEN));
-      
-      Set<Image> result = parseImages("/describe_images_nova.xml");
-
-      assertEquals(result.toString(), contents.toString());
-      assertEquals(get(result, 0).getImageState(), ImageState.AVAILABLE);
-      assertEquals(get(result, 0).getRawState(), "available");
-   }
-
-   static ParseSax<Set<Image>> createParser() {
-      Injector injector = Guice.createInjector(new SaxParserModule(), new AbstractModule() {
-
-         @Override
-         protected void configure() {
-            bind(new TypeLiteral<Supplier<String>>() {
-            }).annotatedWith(Region.class).toInstance(Suppliers.ofInstance("us-east-1"));
-         }
-
-      });
-      ParseSax<Set<Image>> parser = injector.getInstance(ParseSax.Factory.class).create(
-               injector.getInstance(DescribeImagesResponseHandler.class));
-      return parser;
-   }
-
-   public static Set<Image> parseImages(String resource) {
-      InputStream is = EC2ImageParserTest.class.getResourceAsStream(resource);
-      return createParser().parse(is);
-   }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/a9834e9e/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/DescribeInstanceAttributeTest.java
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/DescribeInstanceAttributeTest.java b/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/DescribeInstanceAttributeTest.java
deleted file mode 100644
index d5aa7aa..0000000
--- a/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/DescribeInstanceAttributeTest.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.ec2.xml;
-
-import static org.testng.Assert.assertEquals;
-
-import java.io.InputStream;
-
-import org.jclouds.ec2.domain.InstanceType;
-import org.jclouds.ec2.domain.Volume.InstanceInitiatedShutdownBehavior;
-import org.jclouds.http.functions.BaseHandlerTest;
-import org.testng.annotations.Test;
-
-/**
- * Tests behavior of {@code DescribeInstanceAttribute}
- */
-// NOTE:without testName, this will not call @Before* and fail w/NPE during surefire
-@Test(groups = "unit", testName = "DescribeInstanceAttributeTest")
-public class DescribeInstanceAttributeTest extends BaseHandlerTest {
-
-   public void testInstanceInitiatedShutdownBehaviorHandler() {
-      InputStream is = getClass().getResourceAsStream("/instanceInitiatedShutdownBehavior.xml");
-
-      InstanceInitiatedShutdownBehaviorHandler handler = injector
-               .getInstance(InstanceInitiatedShutdownBehaviorHandler.class);
-      InstanceInitiatedShutdownBehavior result = factory.create(handler).parse(is);
-
-      assertEquals(result, InstanceInitiatedShutdownBehavior.STOP);
-   }
-
-   public void testInstanceTypeHandler() {
-      InputStream is = getClass().getResourceAsStream("/instanceType.xml");
-
-      InstanceTypeHandler handler = injector.getInstance(InstanceTypeHandler.class);
-      String result = factory.create(handler).parse(is);
-
-      assertEquals(result, InstanceType.M1_SMALL);
-   }
-
-   public void testBooleanValueHandler() {
-      InputStream is = getClass().getResourceAsStream("/disableApiTermination.xml");
-
-      BooleanValueHandler handler = injector.getInstance(BooleanValueHandler.class);
-      Boolean result = factory.create(handler).parse(is);
-
-      assert !result;
-   }
-
-   public void testStringValueHandler() {
-      InputStream is = getClass().getResourceAsStream("/ramdisk.xml");
-
-      StringValueHandler handler = injector.getInstance(StringValueHandler.class);
-      String result = factory.create(handler).parse(is);
-
-      assertEquals(result, "ari-a51cf9cc");
-   }
-
-   public void testUnencodeStringValueHandler() {
-      InputStream is = getClass().getResourceAsStream("/userData.xml");
-      UnencodeStringValueHandler handler = injector.getInstance(UnencodeStringValueHandler.class);
-      String result = factory.create(handler).parse(is);
-      assertEquals(result, "#!/bin/bash\n");
-   }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/a9834e9e/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/DescribeInstancesResponseHandlerTest.java
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/DescribeInstancesResponseHandlerTest.java b/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/DescribeInstancesResponseHandlerTest.java
deleted file mode 100644
index 862388f..0000000
--- a/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/DescribeInstancesResponseHandlerTest.java
+++ /dev/null
@@ -1,171 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.ec2.xml;
-
-import static com.google.common.collect.Iterables.get;
-import static org.testng.Assert.assertEquals;
-
-import java.io.InputStream;
-import java.net.UnknownHostException;
-import java.util.Set;
-
-import org.jclouds.date.DateService;
-import org.jclouds.ec2.domain.Attachment;
-import org.jclouds.ec2.domain.BlockDevice;
-import org.jclouds.ec2.domain.InstanceState;
-import org.jclouds.ec2.domain.InstanceType;
-import org.jclouds.ec2.domain.Reservation;
-import org.jclouds.ec2.domain.RootDeviceType;
-import org.jclouds.ec2.domain.RunningInstance;
-import org.jclouds.http.functions.ParseSax;
-import org.jclouds.http.functions.config.SaxParserModule;
-import org.jclouds.location.Region;
-import org.testng.annotations.BeforeTest;
-import org.testng.annotations.Test;
-
-import com.google.common.base.Supplier;
-import com.google.common.base.Suppliers;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.ImmutableSet;
-import com.google.inject.AbstractModule;
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-import com.google.inject.TypeLiteral;
-
-/**
- * Tests behavior of {@code DescribeInstancesResponseHandler}
- */
-// NOTE:without testName, this will not call @Before* and fail w/NPE during surefire
-@Test(groups = "unit", testName = "DescribeInstancesResponseHandlerTest")
-public class DescribeInstancesResponseHandlerTest extends BaseEC2HandlerTest {
-
-   private DateService dateService;
-
-   @BeforeTest
-   @Override
-   protected void setUpInjector() {
-      super.setUpInjector();
-      dateService = injector.getInstance(DateService.class);
-      assert dateService != null;
-   }
-
-   public void testWhenRunning() throws UnknownHostException {
-
-      Set<Reservation<RunningInstance>> contents = ImmutableSet.of(new Reservation<RunningInstance>(defaultRegion,
-               ImmutableSet.of("adriancole.ec2ingress"), ImmutableSet.of(RunningInstance.builder().region(
-                        defaultRegion).groupName("adriancole.ec2ingress").amiLaunchIndex("0").dnsName(
-                        "ec2-174-129-81-68.compute-1.amazonaws.com").imageId("ami-82e4b5c7").instanceId("i-0799056f")
-                        .instanceState(InstanceState.RUNNING).rawState("running").instanceType(InstanceType.M1_SMALL)
-                        .ipAddress("174.129.81.68").kernelId("aki-a71cf9ce").keyName("adriancole.ec21").launchTime(
-                                 dateService.iso8601DateParse("2009-11-09T03:00:34.000Z"))
-                        // MonitoringState.DISABLED,
-                        .availabilityZone("us-east-1c").virtualizationType("paravirtual").privateDnsName(
-                                 "ip-10-243-42-70.ec2.internal").privateIpAddress("10.243.42.70").ramdiskId(
-                                 "ari-a51cf9cc").rootDeviceType(RootDeviceType.INSTANCE_STORE).build()),
-               "993194456877", null, "r-a3c508cb"));
-
-      Set<Reservation<? extends RunningInstance>> result = parseRunningInstances("/describe_instances_running.xml");
-
-      assertEquals(result.toString(), contents.toString());
-      assertEquals(get(get(result, 0), 0).getInstanceState(), InstanceState.RUNNING);
-      assertEquals(get(get(result, 0), 0).getRawState(), "running");
-
-   }
-
-   public void testApplyInputStream() {
-      Set<Reservation<RunningInstance>> contents = ImmutableSet.of(new Reservation<RunningInstance>(defaultRegion,
-               ImmutableSet.of("default"), ImmutableSet.of(RunningInstance.builder().region(defaultRegion).groupName(
-                        "default").amiLaunchIndex("23").dnsName("ec2-72-44-33-4.compute-1.amazonaws.com").imageId(
-                        "ami-6ea54007").instanceId("i-28a64341").instanceState(InstanceState.RUNNING).rawState(
-                        "running").instanceType(InstanceType.M1_LARGE).kernelId("aki-ba3adfd3").keyName(
-                        "example-key-name").launchTime(dateService.iso8601DateParse("2007-08-07T11:54:42.000Z"))
-               // MonitoringState.DISABLED,
-                        .availabilityZone("us-east-1b").virtualizationType("paravirtual").privateDnsName(
-                                 "10-251-50-132.ec2.internal")// product codes
-                        // ImmutableSet.of("774F4FF8")
-                        .tags(ImmutableMap.of("Name", "ec2-o", "Empty", ""))
-                        .ramdiskId("ari-badbad00").rootDeviceType(RootDeviceType.INSTANCE_STORE).build(),
-                        RunningInstance.builder().region(defaultRegion).groupName("default").amiLaunchIndex("23")
-                                 .dnsName("ec2-72-44-33-6.compute-1.amazonaws.com").imageId("ami-6ea54007").instanceId(
-                                          "i-28a64435").instanceState(InstanceState.RUNNING).rawState("running")
-                                 .instanceType(InstanceType.M1_LARGE).kernelId("aki-ba3adfd3").keyName(
-                                          "example-key-name").launchTime(
-                                          dateService.iso8601DateParse("2007-08-07T11:54:42.000Z"))
-                                 // MonitoringState.DISABLED,
-                                 .availabilityZone("us-east-1b").virtualizationType("paravirtual").privateDnsName(
-                                          "10-251-50-134.ec2.internal")// product codes
-                                 // ImmutableSet.of("774F4FF8")
-                                 .ramdiskId("ari-badbad00").rootDeviceType(RootDeviceType.INSTANCE_STORE).build()),
-               "UYY3TLBUXIEON5NQVUUX6OMPWBZIQNFM", null, "r-44a5402d"));
-
-      Set<Reservation<? extends RunningInstance>> result = parseRunningInstances("/describe_instances.xml");
-
-      assertEquals(result.toString(), contents.toString());
-      assertEquals(get(get(result, 0), 0).getInstanceState(), InstanceState.RUNNING);
-      assertEquals(get(get(result, 0), 0).getRawState(), "running");
-
-   }
-
-   public void testEBS() throws UnknownHostException {
-
-      Set<Reservation<RunningInstance>> contents = ImmutableSet.of(new Reservation<RunningInstance>(defaultRegion,
-               ImmutableSet.of("adriancole.ec2ebsingress"), ImmutableSet.of(RunningInstance.builder().region(
-                        defaultRegion).groupName("adriancole.ec2ebsingress").amiLaunchIndex("0").dnsName(
-                        "ec2-75-101-203-146.compute-1.amazonaws.com").imageId("ami-849875ed").instanceId("i-e564438d")
-                        .instanceState(InstanceState.RUNNING).rawState("running").instanceType(InstanceType.M1_SMALL)
-                        .ipAddress("75.101.203.146").kernelId("aki-a71cf9ce")
-                        .keyName("adriancole.ec2ebs1")
-                        .launchTime(dateService.iso8601DateParse("2009-12-30T04:06:23.000Z"))
-                        // MonitoringState.DISABLED
-                        .availabilityZone("us-east-1b")
-                        // "placement"
-                        .virtualizationType("hvm").privateDnsName("domU-12-31-39-09-CE-53.compute-1.internal")
-                        .privateIpAddress("10.210.209.157").ramdiskId("ari-a51cf9cc")
-                        .rootDeviceType(RootDeviceType.EBS).rootDeviceName("/dev/sda1").device(
-                                 "/dev/sda1",
-                                 new BlockDevice("vol-dc6ca8b5", Attachment.Status.ATTACHED, dateService
-                                          .iso8601DateParse("2009-12-30T04:06:29.000Z"), true)).build()),
-               "993194456877", null, "r-596dd731"));
-
-      Set<Reservation<? extends RunningInstance>> result = parseRunningInstances("/describe_instances_ebs.xml");
-
-      assertEquals(result.toString(), contents.toString());
-      assertEquals(get(get(result, 0), 0).getInstanceState(), InstanceState.RUNNING);
-      assertEquals(get(get(result, 0), 0).getRawState(), "running");
-   }
-
-   static ParseSax<Set<Reservation<? extends RunningInstance>>> createParser() {
-      Injector injector = Guice.createInjector(new SaxParserModule(), new AbstractModule() {
-
-         @Override
-         protected void configure() {
-            bind(new TypeLiteral<Supplier<String>>() {
-            }).annotatedWith(Region.class).toInstance(Suppliers.ofInstance("us-east-1"));
-         }
-
-      });
-      ParseSax<Set<Reservation<? extends RunningInstance>>> parser = injector
-               .getInstance(ParseSax.Factory.class)
-               .create(injector.getInstance(DescribeInstancesResponseHandler.class));
-      return parser;
-   }
-
-   public static Set<Reservation<? extends RunningInstance>> parseRunningInstances(String resource) {
-      InputStream is = DescribeInstancesResponseHandlerTest.class.getResourceAsStream(resource);
-      return createParser().parse(is);
-   }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/a9834e9e/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/DescribeKeyPairsResponseHandlerTest.java
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/DescribeKeyPairsResponseHandlerTest.java b/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/DescribeKeyPairsResponseHandlerTest.java
deleted file mode 100644
index 0ea51ed..0000000
--- a/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/DescribeKeyPairsResponseHandlerTest.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.ec2.xml;
-import static org.testng.Assert.assertEquals;
-
-import java.io.InputStream;
-import java.util.Set;
-
-import org.jclouds.ec2.domain.KeyPair;
-import org.jclouds.http.functions.ParseSax;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableSet;
-
-/**
- * Tests behavior of {@code DescribeKeyPairsResponseHandler}
- */
-// NOTE:without testName, this will not call @Before* and fail w/NPE during surefire
-@Test(groups = "unit", testName = "DescribeKeyPairsResponseHandlerTest")
-public class DescribeKeyPairsResponseHandlerTest extends BaseEC2HandlerTest {
-   public void testApplyInputStream() {
-
-      InputStream is = getClass().getResourceAsStream("/describe_keypairs.xml");
-
-      Set<KeyPair> expected = ImmutableSet.of(new KeyPair(defaultRegion, "gsg-keypair",
-               "1f:51:ae:28:bf:89:e9:d8:1f:25:5d:37:2d:7d:b8:ca:9f:f5:f1:6f", null, null));
-
-      DescribeKeyPairsResponseHandler handler = injector.getInstance(DescribeKeyPairsResponseHandler.class);
-      addDefaultRegionToHandler(handler);
-      Set<KeyPair> result = factory.create(handler).parse(is);
-      assertEquals(result, expected);
-   }
-
-   private void addDefaultRegionToHandler(ParseSax.HandlerWithResult<?> handler) {
-      handler.setContext(request);
-   }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/a9834e9e/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/DescribeRegionsResponseHandlerTest.java
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/DescribeRegionsResponseHandlerTest.java b/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/DescribeRegionsResponseHandlerTest.java
deleted file mode 100644
index a3df407..0000000
--- a/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/DescribeRegionsResponseHandlerTest.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.ec2.xml;
-
-import static org.testng.Assert.assertEquals;
-
-import java.io.InputStream;
-import java.net.URI;
-import java.util.Map;
-
-import org.jclouds.aws.domain.Region;
-import org.jclouds.http.functions.BaseHandlerTest;
-import org.jclouds.http.functions.ParseSax;
-import org.jclouds.http.functions.config.SaxParserModule;
-import org.jclouds.location.Provider;
-import org.jclouds.util.Strings2;
-import org.testng.annotations.BeforeTest;
-import org.testng.annotations.Test;
-
-import com.google.common.base.Supplier;
-import com.google.common.base.Suppliers;
-import com.google.common.collect.ImmutableMap;
-import com.google.inject.AbstractModule;
-import com.google.inject.Guice;
-import com.google.inject.TypeLiteral;
-
-/**
- * Tests behavior of {@code DescribeRegionsResponseHandler}
- */
-// NOTE:without testName, this will not call @Before* and fail w/NPE during surefire
-@Test(groups = "unit", testName = "DescribeRegionsResponseHandlerTest")
-public class DescribeRegionsResponseHandlerTest extends BaseHandlerTest {
-   @BeforeTest
-   @Override
-   protected void setUpInjector() {
-      injector = Guice.createInjector(new SaxParserModule(), new AbstractModule() {
-
-         @Override
-         protected void configure() {
-            bind(new TypeLiteral<Supplier<URI>>(){}).annotatedWith(Provider.class).toInstance(
-                  Suppliers.ofInstance(URI.create("https://booya")));
-         }
-
-      });
-      factory = injector.getInstance(ParseSax.Factory.class);
-      assert factory != null;
-   }
-
-   public void testApplyInputStream() {
-
-      InputStream is = getClass().getResourceAsStream(
-            "/regionEndpoints.xml");
-
-      Map<String, URI> expected = ImmutableMap
-            .<String, URI> of(Region.EU_WEST_1, URI
-                  .create("https://ec2.eu-west-1.amazonaws.com"),
-                  Region.US_EAST_1, URI
-                        .create("https://ec2.us-east-1.amazonaws.com"),
-                  Region.US_WEST_1, URI
-                        .create("https://ec2.us-west-1.amazonaws.com"));
-
-      Map<String, URI> result = factory.create(
-            injector.getInstance(DescribeRegionsResponseHandler.class)).parse(
-            is);
-
-      assertEquals(result, expected);
-   }
-
-   public void testEuc() {
-
-      InputStream is = Strings2
-            .toInputStream("<DescribeRegionsResponse xmlns=\"http://ec2.amazonaws.com/doc/2010-08-31/\"><requestId>6a3b36f9-9ff4-47cf-87e3-285b08fbe5e5</requestId><regionInfo><item><regionName>Eucalyptus</regionName><regionEndpoint>http://173.205.188.130:8773/services/Eucalyptus</regionEndpoint></item><item><regionName>Walrus</regionName><regionEndpoint>http://173.205.188.130:8773/services/Walrus</regionEndpoint></item></regionInfo></DescribeRegionsResponse>");
-
-      Map<String, URI> expected = ImmutableMap.<String, URI> of("Eucalyptus",
-            URI.create("http://173.205.188.130:8773/services/Eucalyptus"));
-
-      Map<String, URI> result = factory.create(
-            injector.getInstance(DescribeRegionsResponseHandler.class)).parse(
-            is);
-
-      assertEquals(result, expected);
-   }
-   
-   public void testEuc2() {
-
-      InputStream is = Strings2
-            .toInputStream("<?xml version=\"1.0\" ?><DescribeRegionsResponse xmlns=\"http://ec2.amazonaws.com/doc/2009-11-30/\"><requestId>1LAQRTCLTLPS6CEIC627</requestId><regionInfo><item><regionUrl>http://10.255.255.1:8773/services/Cloud</regionUrl><regionName>nova</regionName></item></regionInfo></DescribeRegionsResponse>");
-
-      Map<String, URI> expected = ImmutableMap.<String, URI> of("nova",
-            URI.create("http://10.255.255.1:8773/services/Cloud"));
-
-      Map<String, URI> result = factory.create(
-            injector.getInstance(DescribeRegionsResponseHandler.class)).parse(
-            is);
-
-      assertEquals(result, expected);
-   }
-
-   public void testUnsupportedAdditionalRegionDoesntBreak() {
-
-      InputStream is = getClass().getResourceAsStream(
-            "/regionEndpoints-additional.xml");
-
-      Map<String, URI> expected = ImmutableMap
-            .<String, URI> of("jp-west-1", URI
-                  .create("https://ec2.jp-west-1.amazonaws.com"),
-                  Region.EU_WEST_1, URI
-                        .create("https://ec2.eu-west-1.amazonaws.com"),
-                  Region.US_EAST_1, URI
-                        .create("https://ec2.us-east-1.amazonaws.com"),
-                  Region.US_WEST_1, URI
-                        .create("https://ec2.us-west-1.amazonaws.com"));
-
-      Map<String, URI> result = factory.create(
-            injector.getInstance(DescribeRegionsResponseHandler.class)).parse(
-            is);
-
-      assertEquals(result, expected);
-   }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/a9834e9e/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/DescribeSecurityGroupsResponseHandlerTest.java
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/DescribeSecurityGroupsResponseHandlerTest.java b/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/DescribeSecurityGroupsResponseHandlerTest.java
deleted file mode 100644
index d534b01..0000000
--- a/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/DescribeSecurityGroupsResponseHandlerTest.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.ec2.xml;
-
-import static org.testng.Assert.assertEquals;
-
-import java.io.InputStream;
-import java.util.Set;
-
-import org.jclouds.ec2.domain.SecurityGroup;
-import org.jclouds.http.functions.ParseSax;
-import org.jclouds.net.domain.IpPermission;
-import org.jclouds.net.domain.IpProtocol;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableMultimap;
-import com.google.common.collect.ImmutableSet;
-import com.google.common.collect.LinkedHashMultimap;
-import com.google.common.collect.Multimap;
-
-/**
- * Tests behavior of {@code DescribeSecurityGroupsResponseHandler}
- */
-// NOTE:without testName, this will not call @Before* and fail w/NPE during
-// surefire
-@Test(groups = "unit", testName = "DescribeSecurityGroupsResponseHandlerTest")
-public class DescribeSecurityGroupsResponseHandlerTest extends BaseEC2HandlerTest {
-   public void testApplyInputStream() {
-
-      InputStream is = getClass().getResourceAsStream("/describe_securitygroups.xml");
-
-      Set<SecurityGroup> expected = ImmutableSet.of(
-            new SecurityGroup(defaultRegion, "sg-3c6ef654", "WebServers", "UYY3TLBUXIEON5NQVUUX6OMPWBZIQNFM", "Web Servers",
-                  ImmutableSet.of(new IpPermission(IpProtocol.TCP, 80, 80, ImmutableMultimap.<String, String> of(),
-                        ImmutableSet.<String> of(), ImmutableSet.of("0.0.0.0/0")))),
-            new SecurityGroup(defaultRegion, "sg-867309ab", "RangedPortsBySource", "UYY3TLBUXIEON5NQVUUX6OMPWBZIQNFM", "Group A",
-                  ImmutableSet.of(new IpPermission(IpProtocol.TCP, 6000, 7000, ImmutableMultimap
-                        .<String, String> of(), ImmutableSet.<String> of(), ImmutableSet.<String> of()))));
-
-      DescribeSecurityGroupsResponseHandler handler = injector.getInstance(DescribeSecurityGroupsResponseHandler.class);
-      addDefaultRegionToHandler(handler);
-      Set<SecurityGroup> result = factory.create(handler).parse(is);
-
-      assertEquals(result.toString(), expected.toString());
-   }
-
-   // Response from OpenStack 1.1 EC2 API
-   public void testApplyInputStreamWithEmptyFields() {
-
-      InputStream is = getClass().getResourceAsStream("/describe_securitygroups_empty.xml");
-
-      Multimap<String, String> userIdGroupPairs = LinkedHashMultimap.create();
-      userIdGroupPairs.put("UYY3TLBUXIEON5NQVUUX6OMPWBZIQNFM", "jclouds#cluster#world");
-
-      Set<SecurityGroup> expected = ImmutableSet.of(
-            new SecurityGroup(defaultRegion, "sg-3c6ef654", "jclouds#cluster#world", "UYY3TLBUXIEON5NQVUUX6OMPWBZIQNFM", "Cluster",
-                  ImmutableSet.of(
-                        new IpPermission(IpProtocol.TCP, 22, 22, ImmutableMultimap.<String, String> of(),
-                              ImmutableSet.<String> of(), ImmutableSet.of("0.0.0.0/0")),
-                        new IpPermission(IpProtocol.ALL, -1, -1, userIdGroupPairs,
-                              ImmutableSet.<String> of(), ImmutableSet.<String> of()))));
-
-      DescribeSecurityGroupsResponseHandler handler = injector.getInstance(DescribeSecurityGroupsResponseHandler.class);
-      addDefaultRegionToHandler(handler);
-      Set<SecurityGroup> result = factory.create(handler).parse(is);
-
-      assertEquals(result.toString(), expected.toString());
-   }
-
-   private void addDefaultRegionToHandler(ParseSax.HandlerWithResult<?> handler) {
-      handler.setContext(request);
-   }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/a9834e9e/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/DescribeSnapshotsResponseHandlerTest.java
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/DescribeSnapshotsResponseHandlerTest.java b/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/DescribeSnapshotsResponseHandlerTest.java
deleted file mode 100644
index 4d16d7c..0000000
--- a/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/DescribeSnapshotsResponseHandlerTest.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.ec2.xml;
-
-import static org.testng.Assert.assertEquals;
-
-import java.io.InputStream;
-import java.util.Set;
-
-import org.jclouds.date.DateService;
-import org.jclouds.ec2.domain.Snapshot;
-import org.jclouds.http.functions.ParseSax;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.Sets;
-
-/**
- * Tests behavior of {@code DescribeSnapshotsResponseHandler}
- */
-//NOTE:without testName, this will not call @Before* and fail w/NPE during surefire
-@Test(groups = "unit", testName = "DescribeSnapshotsResponseHandlerTest")
-public class DescribeSnapshotsResponseHandlerTest extends BaseEC2HandlerTest {
-   public void testApplyInputStream() {
-      DateService dateService = injector.getInstance(DateService.class);
-      InputStream is = getClass().getResourceAsStream("/describe_snapshots.xml");
-
-      Set<Snapshot> expected = Sets.newLinkedHashSet();
-      expected.add(new Snapshot(defaultRegion, "snap-78a54011", "vol-4d826724", 10,
-               Snapshot.Status.PENDING, dateService.iso8601DateParse("2008-05-07T12:51:50.000Z"),
-               80, "218213537122", "Daily Backup", null));
-
-      DescribeSnapshotsResponseHandler handler = injector
-               .getInstance(DescribeSnapshotsResponseHandler.class);
-      addDefaultRegionToHandler(handler);
-      Set<Snapshot> result = factory.create(handler).parse(is);
-
-      assertEquals(result, expected);
-   }
-
-   private void addDefaultRegionToHandler(ParseSax.HandlerWithResult<?> handler) {
-      handler.setContext(request);
-   }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/a9834e9e/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/DescribeVolumesResponseHandlerTest.java
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/DescribeVolumesResponseHandlerTest.java b/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/DescribeVolumesResponseHandlerTest.java
deleted file mode 100644
index aba1d1b..0000000
--- a/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/DescribeVolumesResponseHandlerTest.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.ec2.xml;
-
-import static org.testng.Assert.assertEquals;
-
-import java.io.InputStream;
-import java.util.Set;
-
-import org.jclouds.date.DateService;
-import org.jclouds.ec2.domain.Attachment;
-import org.jclouds.ec2.domain.Volume;
-import org.jclouds.http.functions.ParseSax;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.Sets;
-
-/**
- * Tests behavior of {@code DescribeVolumesResponseHandler}
- */
-//NOTE:without testName, this will not call @Before* and fail w/NPE during surefire
-@Test(groups = "unit", testName = "DescribeVolumesResponseHandlerTest")
-public class DescribeVolumesResponseHandlerTest extends BaseEC2HandlerTest {
-
-   public void testApplyInputStream() {
-      DateService dateService = injector.getInstance(DateService.class);
-      InputStream is = getClass().getResourceAsStream("/describe_volumes.xml");
-
-      Set<Volume> expected = Sets.newLinkedHashSet();
-      expected.add(new Volume(defaultRegion, "vol-2a21e543", 1, null, "us-east-1a",
-               Volume.Status.AVAILABLE, dateService.iso8601DateParse("2009-12-28T05:42:53.000Z"),
-               "standard", 0, false, Sets.<Attachment> newLinkedHashSet()));
-      expected.add(new Volume(defaultRegion, "vol-4282672b", 800, "snap-536d1b3a",
-              "us-east-1a", Volume.Status.IN_USE, dateService
-              .iso8601DateParse("2008-05-07T11:51:50.000Z"),
-              "standard", 0, false,
-              Sets.<Attachment> newHashSet(new Attachment(defaultRegion, "vol-4282672b", "i-6058a509",
-                      "/dev/sdh", Attachment.Status.ATTACHED, dateService
-                      .iso8601DateParse("2008-05-07T12:51:50.000Z")))));
-
-      DescribeVolumesResponseHandler handler = injector
-               .getInstance(DescribeVolumesResponseHandler.class);
-      addDefaultRegionToHandler(handler);
-      Set<Volume> result = factory.create(handler).parse(is);
-
-      assertEquals(result, expected);
-   }
-
-   private void addDefaultRegionToHandler(ParseSax.HandlerWithResult<?> handler) {
-      handler.setContext(request);
-   }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/a9834e9e/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/GetConsoleOutputResponseHandlerTest.java
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/GetConsoleOutputResponseHandlerTest.java b/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/GetConsoleOutputResponseHandlerTest.java
deleted file mode 100644
index f823120..0000000
--- a/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/GetConsoleOutputResponseHandlerTest.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.ec2.xml;
-
-import static org.testng.Assert.assertEquals;
-
-import java.io.InputStream;
-
-import org.jclouds.http.functions.BaseHandlerTest;
-import org.testng.annotations.Test;
-
-/**
- * Tests behavior of {@code GetConsoleOutputResponseHandler}
- */
-//NOTE:without testName, this will not call @Before* and fail w/NPE during surefire
-@Test(groups = "unit", testName = "GetConsoleOutputResponseHandlerTest")
-public class GetConsoleOutputResponseHandlerTest extends BaseHandlerTest {
-   public void testApplyInputStream() {
-
-      InputStream is = getClass().getResourceAsStream(
-               "/get_console_output_response.xml");
-
-      String result = factory.create(
-               injector.getInstance(GetConsoleOutputResponseHandler.class)).parse(is);
-
-      String expected = "Linux version 2.6.16-xenU (builder@patchbat.amazonsa) (gcc version 4.0.1 20050727 (Red Hat 4.0.1-5)) #1 SMP Thu Oct 26 08:41:26 SAST 2006\n" + 
-              "BIOS-provided physical RAM map:\n" + 
-              "Xen: 0000000000000000 - 000000006a400000 (usable)\n" + 
-              "980MB HIGHMEM available.\n" + 
-              "727MB LOWMEM available.\n" + 
-              "NX (Execute Disable) protection: active\n" + 
-              "IRQ lockup detection disabled\n" + 
-              "Built 1 zonelists\n" + 
-              "Kernel command line: root=/dev/sda1 ro 4\n" + 
-              "Enabling fast FPU save and restore... done.\n";
-
-      assertEquals(result, expected);
-   }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/a9834e9e/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/InstanceStateChangeHandlerTest.java
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/InstanceStateChangeHandlerTest.java b/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/InstanceStateChangeHandlerTest.java
deleted file mode 100644
index 6ec9589..0000000
--- a/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/InstanceStateChangeHandlerTest.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.ec2.xml;
-
-import static org.testng.Assert.assertEquals;
-
-import java.io.InputStream;
-import java.util.Set;
-
-import org.jclouds.date.DateService;
-import org.jclouds.ec2.domain.InstanceState;
-import org.jclouds.ec2.domain.InstanceStateChange;
-import org.jclouds.http.functions.ParseSax;
-import org.testng.annotations.BeforeTest;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableSet;
-
-/**
- * Tests behavior of {@code InstanceStateChangeHandler}
- */
-//NOTE:without testName, this will not call @Before* and fail w/NPE during surefire
-@Test(groups = "unit", testName = "InstanceStateChangeHandlerTest")
-public class InstanceStateChangeHandlerTest extends BaseEC2HandlerTest {
-
-   private DateService dateService;
-
-   @BeforeTest
-   @Override
-   protected void setUpInjector() {
-      super.setUpInjector();
-      dateService = injector.getInstance(DateService.class);
-      assert dateService != null;
-   }
-
-   public void testTerminate() {
-
-      InputStream is = getClass().getResourceAsStream("/terminate_instances.xml");
-
-      Set<InstanceStateChange> expected = ImmutableSet.of(new InstanceStateChange(defaultRegion,
-               "i-3ea74257", InstanceState.SHUTTING_DOWN, InstanceState.RUNNING));
-
-      InstanceStateChangeHandler handler = injector.getInstance(InstanceStateChangeHandler.class);
-      addDefaultRegionToHandler(handler);
-      Set<InstanceStateChange> result = factory.create(handler).parse(is);
-      assertEquals(result, expected);
-   }
-
-   public void testStart() {
-
-      InputStream is = getClass().getResourceAsStream("/start_instances.xml");
-
-      Set<InstanceStateChange> expected = ImmutableSet.of(new InstanceStateChange(defaultRegion,
-               "i-10a64379", InstanceState.PENDING, InstanceState.STOPPED));
-      InstanceStateChangeHandler handler = injector.getInstance(InstanceStateChangeHandler.class);
-      addDefaultRegionToHandler(handler);
-      Set<InstanceStateChange> result = factory.create(handler).parse(is);
-      assertEquals(result, expected);
-   }
-
-   public void testStop() {
-
-      InputStream is = getClass().getResourceAsStream("/stop_instances.xml");
-
-      Set<InstanceStateChange> expected = ImmutableSet.of(new InstanceStateChange(defaultRegion,
-               "i-10a64379", InstanceState.STOPPING, InstanceState.RUNNING));
-
-      InstanceStateChangeHandler handler = injector.getInstance(InstanceStateChangeHandler.class);
-      addDefaultRegionToHandler(handler);
-      Set<InstanceStateChange> result = factory.create(handler).parse(is);
-      assertEquals(result, expected);
-   }
-
-   private void addDefaultRegionToHandler(ParseSax.HandlerWithResult<?> handler) {
-      handler.setContext(request);
-   }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/a9834e9e/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/KeyPairResponseHandlerTest.java
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/KeyPairResponseHandlerTest.java b/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/KeyPairResponseHandlerTest.java
deleted file mode 100644
index 9ec4b9a..0000000
--- a/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/KeyPairResponseHandlerTest.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.ec2.xml;
-import static org.testng.Assert.assertEquals;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-import org.jclouds.ec2.domain.KeyPair;
-import org.jclouds.http.functions.ParseSax;
-import org.jclouds.ssh.SshKeys;
-import org.testng.annotations.Test;
-
-/**
- * Tests behavior of {@code KeyPairResponseHandler}
- */
-// NOTE:without testName, this will not call @Before* and fail w/NPE during surefire
-@Test(groups = "unit", testName = "KeyPairResponseHandlerTest")
-public class KeyPairResponseHandlerTest extends BaseEC2HandlerTest {
-   public void testApplyInputStream() throws IOException {
-
-      InputStream is = getClass().getResourceAsStream("/create_keypair.xml");
-
-      KeyPair expected = KeyPair.builder().region(defaultRegion).keyName("jclouds#test#0").sha1OfPrivateKey(
-               "13:36:74:b9:56:bb:07:96:c0:19:ab:00:7f:9f:06:d2:16:a0:45:32").keyMaterial(
-               "-----BEGIN RSA PRIVATE KEY-----\n"
-                        + "MIIEowIBAAKCAQEA0CbFlhSdbMdad2ux2BVqk6Ut5fLKb0CdbqubGcEBfwsSz9Rp4Ile76P90MpV\n"
-                        + "W1BGKL5V4MO+flG6dZnRWPVmgrNVyDTmEsALiMGjfEwbACEZ1A8C6mPa36wWO7MlxuyMjg8OczTB\n"
-                        + "EXnHNDpxE5a6KowJtzFlmgjHk2Y+Q42UIqPx47lQUv5bdMDCnfNNomSzTVRjOZLUkDja+ybCKdux\n"
-                        + "gqTsuInhuBRMx+wxff8Z43ECdJV6UPoXK3der1dlZunxGCFkCeYq0kCX7FZ7PV35X744jqhD8P+7\n"
-                        + "y5prO4W+M3DWgChUx0OlbDbSHtDVlcfdbj/+4AKYKU6rQOqh+4DPDQIDAQABAoIBAHjQuEiXKJSV\n"
-                        + "1U2RZcVtENInws9AL/2I/Jfa5Qh6vTqXG9EjklywfzkK72x7tDVvD3ngmAoAs5WwLFDL+fXvYhOk\n"
-                        + "sbql8ZCahVdYRWME7XsSu2IZYHDZipXe1XzLS7b9X8uos5Ns4E8bZuNKtI1RJDdD1vPMqRNR2z0T\n"
-                        + "0Dn3eC7t+t+t7PWaK5AXu2ot7DoOeG1QhqJbwd5pMkIn2ydBILytgmDk/2P3EtJGePIJIeQBicmw\n"
-                        + "Z0KrJFa/K2cC8AtmMJUoZMo+mh1yemDbDLCZW30PjFHbZtcszS2cydAgq/HDFkZynvZG0zhbx/To\n"
-                        + "jzcNza1AyypYwOwb2/9/ulXZp0UCgYEA+QFgWDfYLH2zwjU5b6e0UbIyd/X/yRZ+L8lOEBd0Bbu8\n"
-                        + "qO3txaDbwi7o2mG7pJENHJ3u62CHjgTGDNW9V9Q8eNoGtj3uHvMvi7FdDEK8B6izdZyR7hmZmQ/5\n"
-                        + "MIldelyiGZlz1KBSoy4FsCpA7hV7cI6H6x+Im24NxG90/wd/EgMCgYEA1f+cUyUisIO3yKOCf0hQ\n"
-                        + "aL289q2//F2cbvBxtki6I8JzTg1H3oTO2WVrXQeCA3a/yiuRUatgGH4mxrpCF6byVJyqrEWAj4kU\n"
-                        + "uTbhMgIYhLGoaF1e+vMirCRXUXox0i5X976ASzHn64V9JSd1B+UbKfpcFTYYnChmrRDzmhKN1a8C\n"
-                        + "gYBTvIHAyO7ab18/BRUOllAOVSWhr8lXv0eqHEEzKh/rOaoFCRY3qpOcZpgJsGogumK1Z+sLnoeX\n"
-                        + "W8WaVVp6KbY4UeGF8aedItyvVnLbB6ohzTqkZ4Wvk05S6cs75kXYO0SL5U3NiCiiFXz2NA9nwTOk\n"
-                        + "s1nD2PPgiQ76Kx0mEkhKLwKBgFhHEJqv+AZu37Kx2NRe5WS/2KK9/DPD/hM5tv7mM3sq7Nvm2J3v\n"
-                        + "lVDS6J5AyZ5aLzXcER9qncKcz6wtC7SsFs1Wr4VPSoBroRPikrVJbgnXK8yZr+O/xq7Scv7WdJTq\n"
-                        + "rzkw6cWbObvLnltkUn/GQBVqBPBvF2nbtLdyBbuqKb5bAoGBAI1+aoJnvXEXxT4UHrMkQcY0eXRz\n"
-                        + "3UdbzJmtjMW9CR6l9s11mV6PcZP4qnODp3nd6a+lPeL3wVYQ47DsTJ/Bx5dI17zA5mU57n6mV0a3\n"
-                        + "DbSoPKSdaKTQdo2THnVE9P9sPKZWueAcsE4Yw/qcTjoxrtUnAH/AXN250v0tkKIOvMhu\n"
-                        + "-----END RSA PRIVATE KEY-----").build();
-
-      KeyPairResponseHandler handler = injector.getInstance(KeyPairResponseHandler.class);
-      addDefaultRegionToHandler(handler);
-      KeyPair result = factory.create(handler).parse(is);
-
-      assertEquals(result, expected);
-
-      assert SshKeys.privateKeyHasSha1(result.getKeyMaterial(), result.getSha1OfPrivateKey());
-      assert SshKeys.privateKeyHasFingerprint(result.getKeyMaterial(), result.getFingerprint());
-
-   }
-
-   private void addDefaultRegionToHandler(ParseSax.HandlerWithResult<?> handler) {
-      handler.setContext(request);
-   }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/a9834e9e/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/PermissionHandlerTest.java
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/PermissionHandlerTest.java b/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/PermissionHandlerTest.java
deleted file mode 100644
index 73bfae6..0000000
--- a/dependencies/jclouds/apis/ec2/1.8.0-stratos/src/test/java/org/jclouds/ec2/xml/PermissionHandlerTest.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.ec2.xml;
-
-import static org.testng.Assert.assertEquals;
-
-import java.io.InputStream;
-
-import org.jclouds.ec2.domain.Permission;
-import org.jclouds.http.functions.BaseHandlerTest;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.Sets;
-
-/**
- * Tests behavior of {@code PermissionHandler}
- */
-// NOTE:without testName, this will not call @Before* and fail w/NPE during surefire
-@Test(groups = "unit", testName = "PermissionHandlerTest")
-public class PermissionHandlerTest extends BaseHandlerTest {
-   public void testApplyInputStream() {
-
-      InputStream is = getClass().getResourceAsStream(
-               "/describe_image_attribute_launchPermission.xml");
-
-      Permission expected = new Permission(Sets.newHashSet("495219933132"), Sets.newHashSet("all"));
-
-      Permission result = factory.create(injector.getInstance(PermissionHandler.class)).parse(is);
-
-      assertEquals(result, expected);
-   }
-}