### Question:
LeastRecentlyUsed extends LinkedHashMap<T, V> { public int getMaxSize() { return this.maxSize; } LeastRecentlyUsed(int maxSize); int getMaxSize();  }### Answer:
@Test public void getMaxCacheSize() { final int max = 100; final LeastRecentlyUsed<String, Integer> cache = new LeastRecentlyUsed<String, Integer>(max); final int actualMax = cache.getMaxSize(); assertThat(actualMax).isEqualTo(max); }