> +import static org.jclouds.reflect.Reflection2.typeToken;
> +
> +import org.jclouds.ContextBuilder;
> +import org.jclouds.View;
> +import org.jclouds.compute.ComputeServiceContext;
> +import org.testng.annotations.Test;
> +
> +/**
> + * @author Andrew Bayer
> + */
> +@Test(groups = "unit", testName = "EC2ContextBuilderTest")
> +public class EC2ContextBuilderText {
> +   public void testAssignability() {
> +      View view = ContextBuilder.newBuilder(new 
> EC2ApiMetadata()).credentials("foo", "bar")
> +              .buildView(typeToken(ComputeServiceContext.class));
> +      view.unwrapApi(EC2Api.class);

Not in my experience while trying to unravel this yesterday/this morning - all 
the barfing happens deep within unwrapApi(). But this is reflection and 
generics and other magic, so I could soooooooo easily be wrong. Very wrong.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/159/files#r6641279

Reply via email to