### Question:
CredentialTypes { public static <T> Map<String, T> indexByCredentialType(Iterable<T> iterable) { return Maps.uniqueIndex(iterable, new Function<T, String>() { @Override public String apply(T input) { return credentialTypeOf(input); } }); }  static String credentialTypeOf(T input); static Map<String, T> indexByCredentialType(Iterable<T> iterable); static CredentialType findCredentialType(Class<?> input); static final String API_ACCESS_KEY_CREDENTIALS; static final String PASSWORD_CREDENTIALS; static final String TOKEN_CREDENTIALS; }### Answer:
@Test(expectedExceptions = IllegalArgumentException.class) public void testIndexByCredentialTypeWithoutAnnotation() { CredentialTypes.indexByCredentialType(ImmutableSet.of("")); }