@Test
public void testSetCndPattern() {

    final ImportOptions delegate = new ImportOptions();
    final InternalImportOptions options = new InternalImportOptions(pid, delegate, null);
    final Pattern listener1 = delegate.getCndPattern();
    final Pattern listener2 = Pattern.compile(listener1.pattern());
    delegate.setCndPattern(listener1.pattern());
    assertEquals("instance1", listener1.pattern(), options.getCndPattern().pattern());
    delegate.setCndPattern(listener2.pattern());
    assertEquals("instance2", listener2.pattern(), options.getCndPattern().pattern());
    options.setCndPattern(listener1.pattern());
    assertEquals("instance1", listener1.pattern(), delegate.getCndPattern().pattern());
    options.setCndPattern(listener2.pattern());
    assertEquals("instance2", listener2.pattern(), delegate.getCndPattern().pattern());
}