Subject.class); expect(subjectUnderTest.getPrincipalandReturn("cenap"); assertTrue("Subject is not authenticated", SecurityUtils.getSubject().isAuthenticate
org.springframework.security.core.userdetails.User) SecurityContextHolder.getContext().getAuthentication().getPrincipal();
System.out.println("Is Principal Null:"+Boolean.valueOf(principal==null));
Authentication auth = SecurityContextHolder.getContext().getAuthentication(); LOGGER.warn("Current authentication instance from security context is null"); // ...rest of code omitted f