### Question:
ImageStripRegistry { public ImageStrip get(final String name) { return StreamSupport.stream(stripInstances.spliterator(), false) .filter(strip -> getName(strip).equals(name)) .findAny() .get(); } protected  ImageStripRegistry(); @Inject  ImageStripRegistry(final @Any ManagedInstance<ImageStrip> stripInstances); ImageStrip get(final String name); ImageStrip get(final Class<? extends ImageStrip> stripType); ImageStrip[] get(final Annotation... qualifiers); @PreDestroy void destroy(); @SuppressWarnings("unchecked") static String getName(final ImageStrip strip); static String getName(final Class<? extends ImageStrip> stripType);  }### Answer:
@Test public void testGetByType() { final ImageStrip result = tested.get(ImageStripTestInstance.class); assertEquals(strip, result); verify(stripInstances, times(1)).select(eq(ImageStripTestInstance.class)); }
@Test public void testGetByQualifier() { Annotation qualifier = mock(Annotation.class); final ImageStrip[] result = tested.get(qualifier); assertEquals(1, result.length); assertEquals(strip, result[0]); verify(stripInstances, times(1)).select(eq(qualifier)); }