DefaultBaggageRestrictionManager implements BaggageRestrictionManager { @Override public Restriction getRestriction(String service, String key) { return restriction; } DefaultBaggageRestrictionManager();   DefaultBaggageRestrictionManager(int maxValueLength); @Override Restriction getRestriction(String service, String key);  }
@Test public void testGetRestriction() { final DefaultBaggageRestrictionManager undertest = new DefaultBaggageRestrictionManager(); final String key = "key"; Restriction actual = undertest.getRestriction("", key); Restriction expected = Restriction.of(true, 2048); assertEquals(expected, actual); expected = actual; actual = undertest.getRestriction("", key); assertSame(actual, expected); }