### Question:
Services { public <S> S create(Class<S> service) { Check.notNull(service); try { final S instance = UtilReflection.create(service, new Class<?>[] { Services.class }, this); return add(instance); } catch (@SuppressWarnings("unused") final NoSuchMethodException exception) { try { final S instance = service.newInstance(); return add(instance); } catch (final IllegalAccessException exception2) { throw new LionEngineException(exception2, ERROR_SERVICE_NO_CONSTRUCTOR + service); } catch (final InstantiationException exception2) { throw new LionEngineException(exception2, ERROR_SERVICE_CREATE + service); } } } Services(); S create(Class<S> service); S add(S service); S get(Class<S> service); Optional<S> getOptional(Class<S> service);  }### Answer:
@Test void testServiceNoConstructor() { final Services services = new Services(); assertCause(() -> services.create(NoConstructorService.class), IllegalAccessException.class); }
@Test void testServiceInvalidConstructor() { final Services services = new Services(); assertCause(() -> services.create(InvalidConstructorService.class), InstantiationException.class); }