@Override
    protected void doStop() throws Exception {
        shutdownReconnectService(reconnectService);

        LOG.debug("Disconnecting from: {}...", getEndpoint().getConnectionString());

        super.doStop();
        closeSession();

        LOG.info("Disconnected from: {}", getEndpoint().getConnectionString());
    }
@Test
    public void doStopShouldNotCloseTheSMPPSessionIfItIsNull() throws Exception {
        when(endpoint.getConnectionString())
                .thenReturn("smpp://smppclient@localhost:2775");

        consumer.doStop();
    }