assertThat(accessControl.checkAccess("admin", invocation), Matchers.is(Access.GRANTED));
}
@Test
public void checkServiceAccess_shouldGrant() throws Exception {
OpenEngSBService service = mock(OpenEngSBService.class);
when(service.getInstanceId()).thenReturn("fooService");
MethodInvocation invocation = mock(MethodInvocation.class);
when(invocation.getThis()).thenReturn(service);
when(servicePermissionAccessConnector.checkAccess("testuser", invocation)).thenReturn(Access.GRANTED);
assertThat(accessControl.checkAccess("testuser", invocation), Matchers.is(Access.GRANTED));
}