@Test public void clearingLowPrioDoesntAffectHighPrioMappings() { mc.setHighPrio(true); mc.put("k", "v"); mc.clearLowPrio(); assertEquals(mc.get("k"), "v"); }
@Test public void clearingLowPrioDeletesLowPrioMappings() { mc.setHighPrio(false); mc.put("k", "v"); mc.clearLowPrio(); assertEquals(mc.get("k"), null); }
@Test public void removeLowPrioMapping() { mc.setHighPrio(false); mc.put("k", "v"); mc.removeLowPrio("k"); assertEquals(mc.get("k"), null); }
@Test public void gettingNotExistingMapping() { mc.setHighPrio(false); mc.put("k", "vlow"); mc.setHighPrio(true); mc.put("k", "vhigh"); assertEquals(mc.get("k"), "vhigh"); }
@Test public void enable() { mc.setHighPrio(true); mc.put("khigh", "vhigh"); mc.setHighPrio(false); mc.put("klow", "vlow"); mc.disable("khigh"); mc.disable("klow"); mc.enable("khigh"); mc.enable("klow"); assertEquals(mc.get("khigh"), "vhigh"); assertEquals(mc.get("klow"), "vlow"); }
@Test public void gettingOverwrittenMapping() { assertEquals(mc.get("k"), null); }
@Test public void gettingLowPrioMapping() { mc.setHighPrio(false); mc.put("k", "v"); assertEquals(mc.get("k"), "v"); }