@Test
public void shouldUseAccessControlIfTheAccessControlDisabledPropertyIsFalse() throws Exception {

    System.setProperty(ACCESS_CONTROL_DISABLED_PROPERTY, "false");
    final Optional<AccessControlViolation> accessControlViolation =
            of(mock(AccessControlViolation.class));
    when(policyEvaluator.checkAccessPolicyFor("command", jsonEnvelope)).thenReturn(accessControlViolation);
    assertThat(accessControlService.checkAccessControl("command", jsonEnvelope),
            is(sameInstance(accessControlViolation)));
    assertLogStatement();
}