@Test
  public void testGetSystemKeySerde() {
    String system1KeySerde = "system1-key-serde";
    String defaultStreamPrefixSystem1 = buildDefaultStreamPropertiesPrefix(MOCK_SYSTEM_NAME1);

    // value specified explicitly
    Config config =
        new MapConfig(ImmutableMap.of(defaultStreamPrefixSystem1 + StreamConfig.KEY_SERDE, system1KeySerde));
    SystemConfig systemConfig = new SystemConfig(config);
    assertEquals(system1KeySerde, systemConfig.getSystemKeySerde(MOCK_SYSTEM_NAME1).get());

    // default stream property is unspecified, try fall back config key
    config = new MapConfig(
        ImmutableMap.of(String.format(SystemConfig.SYSTEM_ID_PREFIX, MOCK_SYSTEM_NAME1) + StreamConfig.KEY_SERDE,
            system1KeySerde));
    systemConfig = new SystemConfig(config);
    assertEquals(system1KeySerde, systemConfig.getSystemKeySerde(MOCK_SYSTEM_NAME1).get());

    // default stream property is empty string, try fall back config key
    config = new MapConfig(ImmutableMap.of(
        // default stream property is empty
        defaultStreamPrefixSystem1 + StreamConfig.KEY_SERDE, "",
        // fall back entry
        String.format(SystemConfig.SYSTEM_ID_PREFIX, MOCK_SYSTEM_NAME1) + StreamConfig.KEY_SERDE, system1KeySerde));
    systemConfig = new SystemConfig(config);
    assertEquals(system1KeySerde, systemConfig.getSystemKeySerde(MOCK_SYSTEM_NAME1).get());

    // default stream property is unspecified, fall back is also empty
    config = new MapConfig(
        ImmutableMap.of(String.format(SystemConfig.SYSTEM_ID_PREFIX, MOCK_SYSTEM_NAME1) + StreamConfig.KEY_SERDE,
            ""));
    systemConfig = new SystemConfig(config);
    assertFalse(systemConfig.getSystemKeySerde(MOCK_SYSTEM_NAME1).isPresent());

    // default stream property is unspecified, fall back is also unspecified
    config = new MapConfig();
    systemConfig = new SystemConfig(config);
    assertFalse(systemConfig.getSystemKeySerde(MOCK_SYSTEM_NAME1).isPresent());
  }
Placeholder to help make sure the correct {@link SystemAdmin} is returned by {@link MockSystemFactory}. Do not mock
any methods of this mock.
samza-core/src/test/java/org/apache/samza/config/TestSystemConfig.java