use of com.hazelcast.nio.serialization.PortableWriter in project hazelcast by hazelcast.
the class ClientPartitionLostListenerTest method test_portableMapPartitionLostEvent_serialization.
@Test
public void test_portableMapPartitionLostEvent_serialization() throws IOException {
final Address source = new Address();
final PortablePartitionLostEvent event = new PortablePartitionLostEvent(1, 2, source);
final PortableWriter writer = mock(PortableWriter.class);
final ObjectDataOutput output = mock(ObjectDataOutput.class);
when(writer.getRawDataOutput()).thenReturn(output);
event.writePortable(writer);
verify(writer).writeInt("p", 1);
verify(writer).writeInt("l", 2);
verify(output).writeObject(source);
}
Aggregations