### Question:
MetadataKey { static MDSKey createIndexRowKey(MetadataEntity targetId, String key, @Nullable String index) { MDSKey.Builder builder = getMDSKeyPrefix(targetId, INDEX_ROW_PREFIX); builder.add(key); if (index != null) { builder.add(index); } return builder.build(); } private  MetadataKey();   }### Answer:
@Test public void testGetMDSIndexKey() { MDSKey mdsIndexKey = MetadataKey.createIndexRowKey(new ApplicationId("ns1", "app1").toMetadataEntity(), "key1", "value1"); MDSKey.Splitter split = mdsIndexKey.split(); split.skipBytes(); Assert.assertEquals(MetadataEntity.APPLICATION, split.getString()); Assert.assertEquals(MetadataEntity.NAMESPACE, split.getString()); Assert.assertEquals("ns1", split.getString()); Assert.assertEquals(MetadataEntity.APPLICATION, split.getString()); Assert.assertEquals("app1", split.getString()); Assert.assertEquals("key1", split.getString()); Assert.assertEquals("value1", split.getString()); Assert.assertFalse(split.hasRemaining()); }