@Test
public void testGetAuthenticatorInstances_singleton() throws Exception {

  when(config.getAuthenticators()).thenReturn(ImmutableList.of(PassAuthenticator.class,
      FailAuthenticator.class, PassAuthenticator.class));
  List<Authenticator> authenticators = Lists.newArrayList(auth.getAuthenticatorInstances());
  assertEquals(3, authenticators.size());
  assertTrue(authenticators.get(0) instanceof PassAuthenticator);
  assertTrue(authenticators.get(1) instanceof FailAuthenticator);
  assertTrue(authenticators.get(2) instanceof PassAuthenticator);
  assertSame(authenticators.get(0), authenticators.get(2));
}