### Question:
ActiveRotationRegistry { public <T extends ActiveRotationSupport> T add(T instance) { registeredInstances.add(instance); return instance; }  static ActiveRotationRegistry getSingletonInstance(); static void setSingletonInstance(ActiveRotationRegistry newRegistry); T add(T instance); void remove(ActiveRotationSupport instance); boolean contains(ActiveRotationSupport instance); void refreshFileHandles();  }### Answer:
@Test public void add_shouldReturnTheProvidedArgument() throws Exception { ActiveRotationSupport ars = mock(ActiveRotationSupport.class); ActiveRotationSupport result = registry.add(ars); assertSame(ars, result); }
@Test public void add_shouldNotRequireACast_givenAnImplementationOfActiveRotationSupport() throws Exception { @SuppressWarnings("UnusedDeclaration") Foo foo = registry.add(new Foo()); }