### Question:
InstanceIdentifierCodec extends AbstractModuleStringInstanceIdentifierCodec implements EffectiveModelContextListener { public String serialize(InstanceIdentifier<?> iid) { YangInstanceIdentifier normalizedIid = bindingNormalizedNodeSerializer.toYangInstanceIdentifier(iid); return serialize(normalizedIid); } InstanceIdentifierCodec(DOMSchemaService schemaService,
            BindingNormalizedNodeSerializer bindingNormalizedNodeSerializer); @Override void onModelContextUpdated(EffectiveModelContext schemaContext); String serialize(InstanceIdentifier<?> iid); YangInstanceIdentifier getYangInstanceIdentifier(InstanceIdentifier<?> iid); InstanceIdentifier<?> bindingDeserializer(String iidString); InstanceIdentifier<?> bindingDeserializer(YangInstanceIdentifier yangIID); InstanceIdentifier<?> bindingDeserializerOrNull(String iidString);  }### Answer:
@Test public void testSerialize() { InstanceIdentifier<?> iid = mock(InstanceIdentifier.class); YangInstanceIdentifier yiid = mock(YangInstanceIdentifier.class); when(bindingNormalizedNodeSerializer.toYangInstanceIdentifier(iid)).thenReturn(yiid); assertEquals("Error, did not return correct string", "", instanceIdCodec.serialize(iid)); }