### Question:
Resources { @Produces public Logger produceLog(InjectionPoint injectionPoint) { return Logger.getLogger(injectionPoint.getMember().getDeclaringClass().getName()); }  @Produces Logger produceLog(InjectionPoint injectionPoint); @Produces @RequestScoped @Named("facesContext") FacesContext produceFacesContext(); static String readStringFromClasspathFile(String filePath);  }### Answer:
@SuppressWarnings("unchecked") @Test public void produceLog() { Resources tested = new Resources(); InjectionPoint ipMock = Mockito.mock(InjectionPoint.class); Member memberMock = Mockito.mock(Member.class); Mockito.when(((Class<ProduceLogTestClass>) memberMock.getDeclaringClass())).thenReturn(ProduceLogTestClass.class); Mockito.when(ipMock.getMember()).thenReturn(memberMock); Logger l = tested.produceLog(ipMock); Assert.assertEquals("org.searchisko.api.util.ResourcesTest$ProduceLogTestClass", l.getName()); }