public SystemAdmin getAdmin(String systemName, Config config) {
    return new SystemAdmin() {

      @Override
      public Map<SystemStreamPartition, String> getOffsetsAfter(Map<SystemStreamPartition, String> offsets) {
        return null;
      }

      @Override
      public Map<String, SystemStreamMetadata> getSystemStreamMetadata(Set<String> streamNames) {
        Map<String, SystemStreamMetadata> metadataMap = new HashMap<>();
        Map<String, Set<Partition>> partitionMap = MSG_QUEUES.entrySet()
            .stream()
            .filter(entry -> streamNames.contains(entry.getKey().getSystemStream().getStream()))
            .map(e -> e.getKey())
            .<Map<String, Set<Partition>>>collect(HashMap::new,
              (m, ssp) -> {
                if (m.get(ssp.getStream()) == null) {
                  m.put(ssp.getStream(), new HashSet<>());
                }
                m.get(ssp.getStream()).add(ssp.getPartition());
              }, (m1, m2) -> {
                m2.forEach((k, v) -> {
                  if (m1.get(k) == null) {
                    m1.put(k, v);
                  } else {
                    m1.get(k).addAll(v);
                  }
                });
              });

        partitionMap.forEach((k, v) -> {
          Map<Partition, SystemStreamMetadata.SystemStreamPartitionMetadata> partitionMetaMap =
              v.stream().<Map<Partition, SystemStreamMetadata.SystemStreamPartitionMetadata>>collect(HashMap::new,
                (m, p) -> {
                  m.put(p, new SystemStreamMetadata.SystemStreamPartitionMetadata("0", "0", "1"));
                }, (m1, m2) -> m1.putAll(m2));

          metadataMap.put(k, new SystemStreamMetadata(k, partitionMetaMap));
        });

        return metadataMap;
      }

      @Override
      public Integer offsetComparator(String offset1, String offset2) {
        return offset1.compareTo(offset2);
      }

      @Override
      public Map<String, SystemStreamMetadata> getSystemStreamPartitionCounts(Set<String> streamNames, long cacheTTL) {
        return getSystemStreamMetadata(streamNames);
      }

      @Override
      public boolean createStream(StreamSpec streamSpec) {
        return true;
      }

      @Override
      public void validateStream(StreamSpec streamSpec) throws StreamValidationException {

      }
    };
  }
A mock system backed by a set of in-memory queues. Used for testing w/o actual external messaging systems.
samza-core/src/test/java/org/apache/samza/system/MockSystemFactory.java