Test to demonstrate issue 317 and how it's implemented.

git-svn-id: https://google-guice.googlecode.com/svn/trunk@813 d779f126-a31b-0410-b53b-1d3aecad763e
diff --git a/test/com/google/inject/ScopesTest.java b/test/com/google/inject/ScopesTest.java
index 286f191..0d789ea 100644
--- a/test/com/google/inject/ScopesTest.java
+++ b/test/com/google/inject/ScopesTest.java
@@ -334,6 +334,17 @@
     }
   }
 
+  public void testSingletonAnnotationOnParameterizedType() {
+    Injector injector = Guice.createInjector();
+    assertSame(injector.getInstance(new Key<Injected<String>>() {}),
+        injector.getInstance(new Key<Injected<String>>() {}));
+    assertSame(injector.getInstance(new Key<In<Integer>>() {}),
+        injector.getInstance(new Key<In<Short>>() {}));
+  }
+
+  @ImplementedBy(Injected.class) public interface In<T> {}
+  @Singleton public static class Injected<T>  implements In<T> {}
+
   @Target({ ElementType.TYPE, ElementType.METHOD })
   @Retention(RUNTIME)
   @ScopeAnnotation