public void removeInstanceMetadata(Service service, String metadataId) {
        ConcurrentMap<String, InstanceMetadata> instanceMetadataMapForService = instanceMetadataMap.get(service);
        if (null != instanceMetadataMapForService) {
            instanceMetadataMapForService.remove(metadataId);
            if (instanceMetadataMapForService.isEmpty()) {
                serviceMetadataMap.remove(service);
            }
        }
        expiredMetadataInfos.remove(ExpiredMetadataInfo.newExpiredInstanceMetadata(service, metadataId));
    }
@Test
    void testRemoveInstanceMetadata() {
        
        namingMetadataManager.removeInstanceMetadata(service, METADATA_ID);
        
        Optional<InstanceMetadata> instanceMetadata = namingMetadataManager.getInstanceMetadata(service, METADATA_ID);
        
        assertFalse(instanceMetadata.isPresent());
    }