@Test
public void testRestartConnector() throws Exception {

    expectAdd(CONNECTOR_NAME, BogusSourceConnector.class, BogusSourceTask.class, false);
    worker.stopConnector(CONNECTOR_NAME);
    EasyMock.expectLastCall();
    worker.startConnector(EasyMock.eq(new ConnectorConfig(connectorConfig(CONNECTOR_NAME, BogusSourceConnector.class, false))),
            EasyMock.anyObject(HerderConnectorContext.class), EasyMock.eq(herder), EasyMock.eq(TargetState.STARTED));
    EasyMock.expectLastCall();
    PowerMock.replayAll();
    herder.putConnectorConfig(CONNECTOR_NAME, connectorConfig(CONNECTOR_NAME, BogusSourceConnector.class, false), false, createCallback);
    FutureCallback<Void> cb = new FutureCallback<>();
    herder.restartConnector(CONNECTOR_NAME, cb);
    cb.get(1000L, TimeUnit.MILLISECONDS);
    PowerMock.verifyAll();
}