public void updateServiceMetadata(Service service, ServiceMetadata serviceMetadata) {
        service.incrementRevision();
        serviceMetadataMap.put(service, serviceMetadata);
    }
@Test
    void testUpdateServiceMetadata() throws NoSuchFieldException, IllegalAccessException {
        
        ServiceMetadata serviceMetadata = new ServiceMetadata();
        Class<ServiceMetadata> serviceMetadataClass = ServiceMetadata.class;
        Field ephemeral = serviceMetadataClass.getDeclaredField("ephemeral");
        ephemeral.setAccessible(true);
        ephemeral.set(serviceMetadata, false);
        
        namingMetadataManager.updateServiceMetadata(service, serviceMetadata);
        
        Optional<ServiceMetadata> optional = namingMetadataManager.getServiceMetadata(service);
        assertTrue(optional.isPresent());
        assertNotNull(optional.get());
        assertFalse(optional.get().isEphemeral());
    }