### Question:
B2BoundedLruMap extends LinkedHashMap<K,V> { @SuppressWarnings("SameParameterValue") static <K,V> B2BoundedLruMap<K,V> withMax(int maxEntries) { B2BoundedLruMap<K,V> map = new B2BoundedLruMap<>(); map.setMaxEntries(maxEntries); return map; } private  B2BoundedLruMap();   }### Answer:
@Test public void testOrderingAndMax() { final B2BoundedLruMap<String,Integer> map = B2BoundedLruMap.withMax(3); assertEquals(0, map.size()); map.put("a", 1); map.put("b", 2); map.put("c", 3); checkContents(map, "a", "b", "c"); map.put("d", 4); checkContents(map, "b", "c", "d"); map.get("b"); checkContents(map, "c", "d", "b"); map.put("e", 5); checkContents(map, "d", "b", "e"); }