@Test public void activityTest() { IpManager manager = new IpManager(); OldIpManger oldManger = new OldIpManger(); for (int i = 0; i < MAX; i++) { String ip = String.valueOf(i); assertEquals(oldManger.active(ip), manager.active(ip)); } }
public int active(String ip) { return COUNTS.merge(ip, 1, Integer::sum); }
IpManager { public int active(String ip) { return COUNTS.merge(ip, 1, Integer::sum); } }
IpManager { public int active(String ip) { return COUNTS.merge(ip, 1, Integer::sum); }  }
IpManager { public int active(String ip) { return COUNTS.merge(ip, 1, Integer::sum); }  int active(String ip); void inactive(String ip); }
IpManager { public int active(String ip) { return COUNTS.merge(ip, 1, Integer::sum); }  int active(String ip); void inactive(String ip);  }