@Override
    public Optional<MaintenanceAssociation> getMaintenanceAssociation(
                                                MdId mdName, MaIdShort maName) {
        log.debug("Retrieving MA {} of MD {} from distributed store", maName, mdName);
        return store.getMaintenanceDomain(mdName)
                .orElseThrow(() -> new IllegalArgumentException("Unknown MD " + mdName))
                .maintenanceAssociationList()
                .stream().filter(ma -> ma.maId().equals(maName))
                .findFirst();
    }
@Test
    public void testGetMaintenanceAssociation() {
        Optional<MaintenanceAssociation> ma =
                service.getMaintenanceAssociation(
                        MdIdCharStr.asMdId("test-md-1"),
                        MaIdCharStr.asMaId("test-ma-1-2"));

        assertTrue(ma.isPresent());

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

        //Now try an invalid MA Name with a valid MD Name
        try {
            Optional<MaintenanceAssociation> maInvalid =
                    service.getMaintenanceAssociation(
                    MdIdCharStr.asMdId("test-md-1"),
                    MaIdCharStr.asMaId("test-ma-1-3"));
            assertFalse(maInvalid.isPresent());
        } catch (IllegalArgumentException e) {
            fail("Should not throw exception: " + e.getMessage());
        }
    }