### Question:
ServiceLoaderProvider { public static <T> T get(Class<T> supplier) { return getSupplier(requireNonNull(supplier, "supplier is required")); } private  ServiceLoaderProvider(); static T get(Class<T> supplier); static T getUnique(Class<T> supplier); static T getUnique(Class<T> supplier, Predicate<Object> predicate); static I getUnique(Class<T> supplier, Class<I> supplierImplementation); static Stream<Object> getSupplierStream(Class<T> supplier);  }### Answer:
@Test public void shouldReturnExceptionWhenThereNotImplementation() { assertThrows(ProviderNotFoundException.class, () -> ServiceLoaderProvider.get(Unicorn.class)); }
@Test public void shouldReturnImplementation() { Animal animal = ServiceLoaderProvider.get(Animal.class); Assertions.assertNotNull(animal); Assertions.assertTrue(animal instanceof Horse); }
@Test public void shouldReturnWithPriority() { Machine machine = ServiceLoaderProvider.get(Machine.class); Assertions.assertNotNull(machine); Assertions.assertTrue(machine instanceof Computer); }