@Override
    protected void onStateExpiry(UUID sessionId, TransportProtos.SessionInfoProto sessionInfo) {
        log.debug("Session with id: [{}] has expired due to last activity time.", sessionId);
        SessionMetaData expiredSession = sessions.remove(sessionId);
        if (expiredSession != null) {
            deregisterSession(sessionInfo);
            process(sessionInfo, SESSION_EVENT_MSG_CLOSED, null);
            expiredSession.getListener().onRemoteSessionCloseCommand(sessionId, SESSION_EXPIRED_NOTIFICATION_PROTO);
        }
    }
@Test
    void givenSessionDoesNotExist_whenOnStateExpiryCalled_thenShouldNotPerformExpirationActions() {
        // GIVEN
        TransportProtos.SessionInfoProto sessionInfo = TransportProtos.SessionInfoProto.newBuilder()
                .setSessionIdMSB(SESSION_ID.getMostSignificantBits())
                .setSessionIdLSB(SESSION_ID.getLeastSignificantBits())
                .build();
        doCallRealMethod().when(transportServiceMock).onStateExpiry(SESSION_ID, sessionInfo);

        // WHEN
        transportServiceMock.onStateExpiry(SESSION_ID, sessionInfo);

        // THEN
        assertThat(sessions.containsKey(SESSION_ID)).isFalse();
        verify(transportServiceMock, never()).deregisterSession(sessionInfo);
        verify(transportServiceMock, never()).process(sessionInfo, SESSION_EVENT_MSG_CLOSED, null);
    }