@Override
    public NodeId getMasterFor(DeviceId deviceId) {
        checkNotNull(deviceId, DEVICE_ID_NULL);

        return store.getMaster(networkId, deviceId);
    }
@Test
    public void getMasterFor() {
        mastershipMgr1.setRole(NID_LOCAL, VDID1, MASTER);
        mastershipMgr1.setRole(NID_OTHER, VDID2, MASTER);
        assertEquals("wrong master:", NID_LOCAL, mastershipMgr1.getMasterFor(VDID1));
        assertEquals("wrong master:", NID_OTHER, mastershipMgr1.getMasterFor(VDID2));

        //have NID_OTHER hand over VDID2 to NID_LOCAL
        mastershipMgr1.setRole(NID_LOCAL, VDID2, MASTER);
        assertEquals("wrong master:", NID_LOCAL, mastershipMgr1.getMasterFor(VDID2));
    }