use of org.openkilda.messaging.command.discovery.HealthCheckCommandData in project open-kilda by telstra.
the class AbstractSerializerTest method dumpNetworkCommandTest.
@Test
public void dumpNetworkCommandTest() throws IOException, ClassNotFoundException {
HealthCheckCommandData data = new HealthCheckCommandData("requester");
System.out.println(data);
CommandMessage command = new CommandMessage(data, System.currentTimeMillis(), CORRELATION_ID, DESTINATION);
command.setData(data);
serialize(command);
Message message = (Message) deserialize();
assertTrue(message instanceof CommandMessage);
CommandMessage resultCommand = (CommandMessage) message;
assertTrue(resultCommand.getData() != null);
HealthCheckCommandData resultData = (HealthCheckCommandData) resultCommand.getData();
System.out.println(resultData);
assertEquals(data, resultData);
assertEquals(data.hashCode(), resultData.hashCode());
}
Aggregations