}
@Test
public void getPrincipal() {
SecurityContext securityContextMock = mock(SecurityContext.class);
Authentication authenticationMock = mock(Authentication.class);
PowerMockito.mockStatic(SecurityContextHolder.class);
when(SecurityContextHolder.getContext()).thenReturn(securityContextMock);
when(securityContextMock.getAuthentication()).thenReturn(authenticationMock);
UserDetails expectedPrincipal = new User("user", "password", new ArrayList<GrantedAuthority>());
when(authenticationMock.getPrincipal()).thenReturn(expectedPrincipal);
UserDetails actualPrincipal = securityContextUtil.getPrincipal();
PowerMockito.verifyStatic(times(1));
SecurityContextHolder.getContext();