### Question:
ContextualPreferenceDao extends NamedParameterJdbcDaoSupport { public Optional<ContextualPreference> load(final String name, final ContextualPreferenceExternalResource externalResource) { return getNamedParameterJdbcTemplate() .query(loadContextualPreferenceQuery, Parameters.getParameters(name, externalResource), Parameters.getRowMapper()) .stream() .findFirst(); }  ContextualPreference upsert(final ContextualPreference preference); Optional<ContextualPreference> load(final String name,
                                               final ContextualPreferenceExternalResource externalResource); List<ContextualPreference> load(final String name); void delete(final String name, final ContextualPreferenceExternalResource externalResource); List<ContextualPreference> loadAll();  }### Answer:
@Test public void loadShouldReturnEmptyOptionalIfPreferenceDoesNotExist() { final ContextualPreferenceExternalResource resource = new ContextualPreferenceExternalResource(LEVEL, RESOURCE_ID); final Optional<ContextualPreference> loadedPreference = contextualPreferenceDao.load(NAME, resource); assertFalse(loadedPreference.isPresent()); }