InMemoryCachedDistributedMetaStorageBridge { public DistributedMetaStorageKeyValuePair[] localFullData() { return cache.entrySet().stream().map( entry -> new DistributedMetaStorageKeyValuePair(entry.getKey(), entry.getValue()) ).toArray(DistributedMetaStorageKeyValuePair[]::new); } InMemoryCachedDistributedMetaStorageBridge(JdkMarshaller marshaller); Serializable read(String globalKey); byte[] readMarshalled(String globalKey); void iterate(
        String globalKeyPrefix,
        BiConsumer<String, ? super Serializable> cb
    ); void write(String globalKey, @Nullable byte[] valBytes); DistributedMetaStorageKeyValuePair[] localFullData(); void writeFullNodeData(DistributedMetaStorageClusterNodeData fullNodeData); DistributedMetaStorageVersion readInitialData(
        ReadOnlyMetastorage metastorage
    );  }
@Test public void testLocalFullData() throws Exception { byte[] valBytes1 = marshaller.marshal("val1"); byte[] valBytes2 = marshaller.marshal("val2"); byte[] valBytes3 = marshaller.marshal("val3"); bridge.write("key3", valBytes3); bridge.write("key2", valBytes2); bridge.write("key1", valBytes1); DistributedMetaStorageKeyValuePair[] exp = { new DistributedMetaStorageKeyValuePair("key1", valBytes1), new DistributedMetaStorageKeyValuePair("key2", valBytes2), new DistributedMetaStorageKeyValuePair("key3", valBytes3) }; assertArrayEquals(exp, bridge.localFullData()); }