public MastershipInfo() {
        this(0, Optional.empty(), ImmutableMap.of());
    }
@Test
    public void testMastershipInfo() throws Exception {
        assertEquals(1, mastershipInfo.term());
        assertEquals(node1, mastershipInfo.master().get());
        assertEquals(Lists.newArrayList(node1), mastershipInfo.getRoles(MastershipRole.MASTER));
        assertEquals(Lists.newArrayList(node2, node3), mastershipInfo.backups());
        assertEquals(Lists.newArrayList(node2, node3), mastershipInfo.getRoles(MastershipRole.STANDBY));
        assertEquals(Lists.newArrayList(node4), mastershipInfo.getRoles(MastershipRole.NONE));
    }