@Override
  public S withDefaultSystem(SystemDescriptor<?> defaultSystemDescriptor) {
    Preconditions.checkNotNull(defaultSystemDescriptor, "Provided defaultSystemDescriptor must not be null.");
    Preconditions.checkState(getInputStreamIds().isEmpty() && getOutputStreamIds().isEmpty(),
        "Default system must be set before creating any input or output streams.");
    addSystemDescriptor(defaultSystemDescriptor);

    defaultSystemDescriptorOptional = Optional.of(defaultSystemDescriptor);
    return (S) this;
  }
This is the base class that implements interface {@link ApplicationDescriptor}.
<p>
This base class contains the common objects that are used by both high-level and low-level API applications, such as
{@link Config}, {@link ApplicationContainerContextFactory}, {@link ApplicationTaskContextFactory}, and
{@link ProcessorLifecycleListenerFactory}.

@param <S> the type of {@link ApplicationDescriptor} interface this implements. It has to be either
           {@link StreamApplicationDescriptor} or {@link TaskApplicationDescriptor}
samza-core/src/main/java/org/apache/samza/application/descriptors/ApplicationDescriptorImpl.java