@Test
  public void testGetSSPMetadataMissingPartition() {
    SystemStreamPartition streamPartition0 = new SystemStreamPartition(SYSTEM, STREAM, new Partition(0));
    SystemStreamPartition streamPartition1 = new SystemStreamPartition(SYSTEM, STREAM, new Partition(1));
    SystemAdmin systemAdmin = mock(MySystemAdmin.class);
    SystemStreamMetadata.SystemStreamPartitionMetadata streamPartition0Metadata =
        new SystemStreamMetadata.SystemStreamPartitionMetadata("1", "2", "3");
    when(systemAdmin.getSystemStreamMetadata(ImmutableSet.of(STREAM))).thenReturn(ImmutableMap.of(
        STREAM, new SystemStreamMetadata(STREAM, ImmutableMap.of(new Partition(0), streamPartition0Metadata))));
    Set<SystemStreamPartition> ssps = ImmutableSet.of(streamPartition0, streamPartition1);
    when(systemAdmin.getSSPMetadata(ssps)).thenCallRealMethod();
    Map<SystemStreamPartition, SystemStreamMetadata.SystemStreamPartitionMetadata> expected =
        ImmutableMap.of(streamPartition0, streamPartition0Metadata);
    assertEquals(expected, systemAdmin.getSSPMetadata(ssps));
    verify(systemAdmin).getSystemStreamMetadata(ImmutableSet.of(STREAM));
  }
Given some SSPs, but missing metadata for one of the SSPs, getSSPMetadata should delegate to
getSystemStreamMetadata and only fill in results for the SSPs that have metadata.
samza-api/src/test/java/org/apache/samza/system/TestSystemAdmin.java