private Optional<ExternalContext> buildExternalContext(Config config) {
    /*
     * By default, use an empty ExternalContext here. In a custom fork of Samza, this can be implemented to pass
     * a non-empty ExternalContext. Only config should be used to build the external context. In the future, components
     * like the application descriptor may not be available.
     */
    return Optional.empty();
  }
Provides helpers for configuring an in-memory system to be used for tests and executing those tests.

This is somewhat based on {@link IntegrationTestHarness}, but it avoids using Kafka/Zookeeper.
samza-test/src/test/java/org/apache/samza/test/harness/InMemoryIntegrationTestHarness.java