    @Test
    public void notifies_at_end_of_successful_bootstrap() {

        final MockBootstrapSessionManager bsSessionManager = new MockBootstrapSessionManager(true);
        final LwM2mBootstrapRequestSender requestSender = new MockRequestSender(true);

        final BootstrapStore bsStore = new BootstrapStore() {
            @Override
            public BootstrapConfig getBootstrap(String endpoint) {
                return new BootstrapConfig();
            }
        };

        BootstrapHandler bsHandler = new BootstrapHandler(bsStore, requestSender, bsSessionManager, new Executor() {

            @Override
            public void execute(Runnable command) {
                command.run();
            }
        });

        bsHandler.bootstrap(Identity.psk(new InetSocketAddress(4242), "pskdentity"), new BootstrapRequest("enpoint"));

        assertTrue(bsSessionManager.endWasCalled());
    }