Assert.assertThat(result, not(instanceOf(AnonymousUser.class)));
}
@Test
public void getCurrentUserShouldReturnAnonymousUserIfCurrentUserNotFound() {
when(userReader.getCurrentUser()).thenReturn(new AnonymousUser());
ReadOnlySecurityService service = (ReadOnlySecurityService)ReadOnlySecurityService.getInstance();
service.setUserReader(userReader);
JCUser result = service.getCurrentUser();