    @Test
    public void testStartEditOfferForDeactivatedOffer() throws IOException {

        P2PService p2PService = mock(P2PService.class);
        OfferBookService offerBookService = mock(OfferBookService.class);
        when(p2PService.getPeerManager()).thenReturn(mock(PeerManager.class));

        final OpenOfferManager manager = new OpenOfferManager(null, null, null, p2PService,
                null, null, null, offerBookService,
                null, null, null,
                null, null, null, null, null, null,
                new PersistenceManager<>(storageDir, null, corruptedStorageFileHandler));

        AtomicBoolean startEditOfferSuccessful = new AtomicBoolean(false);

        ResultHandler resultHandler = () -> {
            startEditOfferSuccessful.set(true);
        };

        final OpenOffer openOffer = new OpenOffer(make(btcUsdOffer));
        openOffer.setState(OpenOffer.State.DEACTIVATED);

        manager.editOpenOfferStart(openOffer, resultHandler, null);
        assertTrue(startEditOfferSuccessful.get());

    }