DefaultContext extends BaseParamContext { public Object get(String key) { return userContext != null ? userContext.get(lowercase(key)) : null; } DefaultContext(Object... args);  DefaultContext(); final DefaultContext with(String key, Object value); final DefaultContext with(String key, Object value, boolean allowOverwrite); final DefaultContext set(Object value); Object get(String key); @SuppressWarnings("unchecked") T get(String key, Class<T> targetClass); String getString(String key); @SuppressWarnings("unchecked") T get(Class<T> clazz); void setLocale(Locale locale); DefaultContext withLevelValues(String... levelValues); DefaultContext withLevelValues(Object... levelValues); @Override String toString();  }
@Test public void shouldReturnNullIfSearchByClassDidNotFindAnything() { DefaultContext context = new DefaultContext(); BigDecimal value = context.get(BigDecimal.class); assertThat(value).isNull(); }