DefaultCRestConfig implements CRestConfig { public int getMaxAttempts(){ return get(CREST_MAX_ATTEMPTS, 1); } DefaultCRestConfig(Map<String, Object> m); CRestConfig merge(Map<String, Object> m); T get(String key); T get(String propName, T defaultIfNotFound); T get(Class<?> key); T get(Class<?> key, T defaultIfNotFound); int getMaxAttempts(); String getDateFormat(); String getBooleanTrue(); String getBooleanFalse(); int getConcurrencyLevel();  }
@Test public void getMaxAttemptsShouldTryToLookUpInMapAndReturnDefault(){ assertEquals(1, toTest.getMaxAttempts()); verify(config).containsKey(CRestConfig.CREST_MAX_ATTEMPTS); }