### Question:
StunnerPreferencesRegistries { public <T> T get(final String definitionSetId, Class<T> preferenceType) { final Annotation qualifier = definitionUtils.getQualifier(definitionSetId); return get(qualifier, preferenceType); } @Inject  StunnerPreferencesRegistries(final DefinitionUtils definitionUtils,
                                        final @Any ManagedInstance<StunnerPreferencesRegistry> preferencesRegistries); T get(final String definitionSetId, Class<T> preferenceType); T get(final Annotation qualifier, Class<T> preferenceType);  }### Answer:
@Test @SuppressWarnings("unchecked") public void testGet() { StunnerPreferences instance = tested.get(DEF_SET_ID, StunnerPreferences.class); verify(preferencesRegistries, times(1)).select(eq(qualifier)); assertEquals(preferences, instance); }
@Test @SuppressWarnings("unchecked") public void testGetTextPreferences() { StunnerTextPreferences instance = tested.get(DEF_SET_ID, StunnerTextPreferences.class); verify(preferencesRegistries, times(1)).select(eq(qualifier)); assertEquals(textPreferences, instance); }