@Test
public void testGetMDCValuePrincipalStringValue() {

    UserIdMDCPutFilter mdcPutFilter = new UserIdMDCPutFilter();
    // expected data
    String userName = "terasoluna@nttd.co.jp";
    securityContext = mock(SecurityContext.class);
    authentication = mock(Authentication.class);
    when(authentication.getPrincipal()).thenReturn(userName);
    when(securityContext.getAuthentication()).thenReturn(authentication);
    SecurityContextHolder.setContext(securityContext);
    String mdcValueStr = mdcPutFilter.getMDCValue(request, response);
    // assert
    assertThat(mdcValueStr, is(userName));
}