@Test
public void shouldCreateATypeCachingJaxb() throws Exception {

    TypeCachingJaxb mockTypeCachingJaxb = mock(TypeCachingJaxb.class);
    whenNew(TypeCachingJaxb.class).withArguments(any(CRestConfig.class), any(Class.class)).thenReturn(mockTypeCachingJaxb);
    Jaxb actual = JaxbFactory.create(mockCRestConfig, getClass());
    assertTrue(actual instanceof TypeCachingJaxb);
    verifyNew(TypeCachingJaxb.class).withArguments(mockCRestConfig, getClass());
}