### Question:
SearchOptions { public SearchOptions withSortOrder(final SortOrder order) { if (order == null) { throw new IllegalArgumentException("SortOrder cannot be null"); } sortOrder = order; return this; } SearchOptions(); SortOrder getSortOrder(); void setSortOrder(final SortOrder order); Map<String, String> getExpressions(); void setExpressions(final Map<String, String> expressions); SearchOptions withSortOrder(final SortOrder order); SearchOptions withExpressions(final Map<String, String> expressions); @Override int hashCode(); @Override boolean equals(final Object obj); static final SearchOptions DEFAULT; }### Answer:
@Test(expected = IllegalArgumentException.class) public void shouldFailCreateDefaultSearchOptionsWithNullSortOrder() { new SearchOptions().withSortOrder(null); }