@Test
public void testMetadata() {

    EasyMock.expect(configStorage.snapshot()).andReturn(configState1);
    PowerMock.replayAll();
    List<ProtocolMetadata> serialized = coordinator.metadata();
    assertEquals(1, serialized.size());
    ProtocolMetadata defaultMetadata = serialized.get(0);
    assertEquals(WorkerCoordinator.DEFAULT_SUBPROTOCOL, defaultMetadata.name());
    ConnectProtocol.WorkerState state = ConnectProtocol.deserializeMetadata(defaultMetadata.metadata());
    assertEquals(1, state.offset());
    PowerMock.verifyAll();
}