}
@Test
public void testOptionalPathInjectionWithNonResourceAdaptable() {
SlingHttpServletRequest nonResourceAdaptable = mock(SlingHttpServletRequest.class);
ResourcePathAllOptionalModel model = factory.getAdapter(nonResourceAdaptable, ResourcePathAllOptionalModel.class);
// should not be null because resource paths fields are optional
assertNotNull(model);
// but the field itself are null
assertNull(model.getFromPath());
assertNull(model.getByDerefProperty());
assertNull(model.getFromPath2());
assertNull(model.getByDerefProperty2());
}