@Override
    public boolean deleteMaintenanceAssociation(MdId mdName, MaIdShort maName) throws CfmConfigException {
        log.info("Deleting MA {} of MD {} from distributed store", maName, mdName);
        MaintenanceDomain.MdBuilder builder = DefaultMaintenanceDomain
                .builder(store.getMaintenanceDomain(mdName)
                .orElseThrow(() -> new IllegalArgumentException("Unknown MD: " + mdName)));

        //Check the MA is present
        if (!builder.checkMaExists(maName)) {
            return false;
        }

        builder = builder.deleteFromMaList(maName);

        store.createUpdateMaintenanceDomain(builder.build());
        return true;
    }
@Test
    public void testDeleteMaintenanceAssociation() throws CfmConfigException {
        assertTrue(service.deleteMaintenanceAssociation(
                MdIdCharStr.asMdId("test-md-1"),
                MaIdCharStr.asMaId("test-ma-1-2")));

        //Now check it has actually been removed
        Collection<MaintenanceAssociation> maListUpdated =
                service.getAllMaintenanceAssociation(
                        MdIdCharStr.asMdId("test-md-1"));
        assertEquals(1, maListUpdated.size());
        maListUpdated.stream().findFirst().ifPresent(ma ->
                assertEquals("test-ma-1-1", ma.maId().maName())
        );

        //Now try with an invalid mdName
        try {
            service.deleteMaintenanceAssociation(
                    MdIdCharStr.asMdId("test-md-2"),
                    MaIdCharStr.asMaId("test-ma-1-2"));
        } catch (IllegalArgumentException e) {
            assertEquals("Unknown MD: test-md-2", e.getMessage());
        }

        //Now try with an invalid maName
        try {
            assertFalse(service.deleteMaintenanceAssociation(
                            MdIdCharStr.asMdId("test-md-1"),
                            MaIdCharStr.asMaId("test-ma-1-3")));
        } catch (IllegalArgumentException e) {
            fail("Should not throw exception: " + e.getMessage());
        }
    }