    @Test
    public void registerByMetadataThrowsExceptionWhenExistingMetadataForSameNameIsDifferent_NotSameMetadata() {

        assertException("Metadata ['DefaultMetadata{name='%s', type=counter, unit='unit', reusable=true, description='description', displayName='display'}'] already registered, does not match provided ['DefaultMetadata{name='%s', type=counter, unit='unit', reusable=true, description='description', displayName='other'}']",
            name -> registry.register(withName(name), new CounterImpl()),
            name -> registry.register(withNameAnd(name).withDisplayName("other").build(), new CounterImpl()));
    }