@Test
  public void basicTest() {
    DiagnosticsStreamMessage diagnosticsStreamMessage =
        getDiagnosticsStreamMessage(Optional.of(SAMZA_EPOCH_ID));
    Collection<DiagnosticsExceptionEvent> exceptionEventList = getExceptionList();
    diagnosticsStreamMessage.addDiagnosticsExceptionEvents(exceptionEventList);
    diagnosticsStreamMessage.addProcessorStopEvents(getProcessorStopEventList());
    diagnosticsStreamMessage.addContainerModels(getSampleContainerModels());

    Assert.assertEquals(1024, (int) diagnosticsStreamMessage.getContainerMb());
    Assert.assertEquals(2, (int) diagnosticsStreamMessage.getContainerNumCores());
    Assert.assertEquals(3, (int) diagnosticsStreamMessage.getNumPersistentStores());
    Assert.assertEquals(config, diagnosticsStreamMessage.getConfig());
    Assert.assertEquals(exceptionEventList, diagnosticsStreamMessage.getExceptionEvents());
    Assert.assertEquals(getSampleContainerModels(), diagnosticsStreamMessage.getContainerModels());
    Assert.assertEquals(diagnosticsStreamMessage.getProcessorStopEvents(), getProcessorStopEventList());
  }
Tests basic operations on {@link DiagnosticsStreamMessage}.
samza-core/src/test/java/org/apache/samza/diagnostics/TestDiagnosticsStreamMessage.java