@Test
public void wrap_ofWrapped_differentMode_delegates_to_createProxy() throws Exception {

    // given
    final DomainObject wrappedObject = new DomainObject();
    final DomainObject domainObject = new WrappingDomainObject(wrappedObject, ImmutableEnumSet.noneOf(ExecutionMode.class));
    // when
    final DomainObject wrappingObject = wrapperFactory.wrap(domainObject, SyncControl.control().withSkipRules());
    // then
    assertThat(wrappingObject, is(not(domainObject)));
    assertThat(createProxyCalledWithDomainObject, is(wrappedObject));
    Assertions.assertThat(createProxyCalledWithSyncControl.getExecutionModes()).contains(ExecutionMode.SKIP_RULE_VALIDATION);
}