### Question:
Injector { <T> T initializeAndInject(Class<? extends T> cls) { try { T object = initializeObjectViaConstructor(cls); injectFields(object); return object; } catch (IllegalAccessException | InvocationTargetException | InstantiationException e) { throw new ElepyConfigException("Failed to instantiate an Elepy Object: " + cls .getName(), e); } } Injector(ElepyContext elepyContext);   }### Answer:
@Test void testCrudInjection() { defaultElepyContext.strictMode(true); defaultElepyContext.registerDependencySupplier(Crud.class, "/resources", MockCrudResource::new); final var mockCrudService = sut.initializeAndInject(MockCrudService.class); assertThat(mockCrudService.getCrudGeneric()) .isNotNull(); assertThat(mockCrudService.getCrudResource()) .isNotNull(); }
@Test void testPropertyInjection() { final var propertiesConfiguration = new PropertiesConfiguration(); propertiesConfiguration.addProperty("smtp.server", "ryan"); propertiesConfiguration.addProperty("test", true); defaultElepyContext.registerDependency(Configuration.class, propertiesConfiguration); final var props = sut.initializeAndInject(Props.class); assertThat(props.getSmtpServer()) .isEqualTo("ryan"); assertThat(props.isTestBoolean()) .isTrue(); assertThat(props.getWithDefault()) .isEqualTo("isAvailable"); }