@Test
    public void putAndGetBinaryFromCluster() throws Exception {
        final String cacheKey = "cacheKeyBinary";
        final String cacheHead = "cacheHead";
        final String cacheBody = "cacheBody";

        final ISignalWriteStream writeStream = component.putBinary(cacheKey, cacheHead, 120);
        writeStream.write(new ByteBuffer(cacheBody));
        writeStream.end();

        component.getBinary(cacheKey, String.class, result -> {
            assertFalse("Result should be retrieved successfully from initial member", result.isError());

            final ISignalReadStream<String> readStream = result.getResult();
            readStream.bodyHandler(bodyResult -> assertEquals(cacheBody, new String(bodyResult.getBytes())));
            readStream.endHandler(endResult -> { /* no op */});
            readStream.transmit();

            assertEquals(cacheHead, readStream.getHead());
        });
    }
Tests for {@link HazelcastCacheStoreComponent}.

@author Pete Cornish
gateway/engine/hazelcast/src/test/java/io/apiman/gateway/engine/hazelcast/HazelcastCacheStoreComponentTest.java