@Test
public void testGetFactType() {

    final PatternWrapper patternWrapper = mock(PatternWrapper.class);
    final String expectedFactType = "factType";
    when(patternWrapper.getFactType()).thenReturn(expectedFactType);
    when(plugin.patternWrapper()).thenReturn(patternWrapper);
    final String actualFactType = plugin.getFactType();
    verify(patternWrapper).getFactType();
    assertEquals(expectedFactType,
                 actualFactType);
}