use of org.pentaho.di.engine.api.events.StatusEvent in project pentaho-kettle by pentaho.
the class MessageEncoderDecoderTest method testTransformationRemoteSource.
@Test
public void testTransformationRemoteSource() throws Exception {
RemoteSource step = new RemoteSource(ModelType.TRANSFORMATION);
Metrics metrics = new Metrics(1, 2, 3, 4);
Message statusEvent = new StatusEvent<>(step, Status.FAILED);
String sMessage = encoder.encode(statusEvent);
Message decodeMessage = decoder.decode(sMessage);
assertTrue(((RemoteSource) step).getModelType() == ((RemoteSource) ((StatusEvent) decodeMessage).getSource()).getModelType());
assertNull(((RemoteSource) ((StatusEvent) decodeMessage).getSource()).getId());
}
Aggregations