@Test
public void testSetEditingPattern() throws Exception {

    final PatternWrapper patternWrapper = mock(PatternWrapper.class);
    plugin.setEditingPattern(patternWrapper);
    verify(editingWrapper).setFactField(null);
    verify(editingWrapper).setFactType(null);
    verify(editingWrapper).setBoundName(null);
    verify(editingWrapper).setType(null);
    verify(plugin).fireChangeEvent(patternPage);
    verify(plugin).fireChangeEvent(fieldPage);
    verify(plugin).fireChangeEvent(additionalInfoPage);
    assertEquals(patternWrapper,
                 plugin.patternWrapper());
}