AbstractParameters extends AbstractMap<String, V> implements Parameters<V> { public V get(String key, V defValue) { V value = get(key); return value == null ? defValue : value; }  String getString(String key); String getString(String key, String defValue); String[] getStringArray(String key); String[] getStringArray(String key, String[] defValue); boolean getBoolean(String key); boolean getBoolean(String key, boolean defValue); int getInt(String key); int getInt(String key, int defValue); int[] getIntArray(String key); int[] getIntArray(String key, int[] defValue); double getDouble(String key); double getDouble(String key, double defValue); long getLong(String key); long getLong(String key, long defValue); V get(String key, V defValue); Object[] getArray(String key); Object[] getArray(String key, Object[] defValue); static Parameters<V> toParameters(Map value); List<String> getStringList(String key); @Override List<T> getList(String key); Date getDate(String key); Date getDate(String key, Date defaultValue); T getEnum(Class<T> clazz, String key); T getEnum(Class<T> clazz, String key, T defaultValue); Map<String, V> toMap();  }
@Test public void get() throws Exception { assertEquals(parameters.get("test"), null); assertEquals(parameters.get("test", 1), 1); }