@Test
public void testLog_noLoggingWhenSessionInfoSessionIdhasLengthZero() {

    // Mock SessionInfo to have SessionInfo.getSession().getId has length 0
    HttpSession session = mock(HttpSession.class);
    when(session.getId()).thenReturn("");
    SessionInfo sessionInfo = mock(SessionInfo.class);
    when(sessionInfo.getSession()).thenReturn(session);
    when(userSessionMock.getSessionInfo()).thenReturn(sessionInfo);
    IUserActivityLogger userActivityLogger = createUserActivityLogger(userSessionMock, false);
    ReturnValue<LoggingObject> returnValue = userActivityLogger.log(defaultLoggingActionMock, this.getClass(), null);
    verify(activityLoggingDaoMock, never()).saveLogObject(returnValue.getValue());
    assertNull("should not log when 'SessionInfo.getSession().getId().length = 0' ", returnValue.getValue());
}