ImmutableSortOption implements SortOption { public static ImmutableSortOption of(final List<SortOptionEntry> entries) { return new ImmutableSortOption(checkNotNull(entries, "entries")); } private  ImmutableSortOption(final List<SortOptionEntry> theEntries); static ImmutableSortOption of(final List<SortOptionEntry> entries); @Override void accept(final OptionVisitor visitor); @Override List<SortOptionEntry> getEntries(); @Override SortOption add(final SortOptionEntry entry); @Override SortOption add(final CharSequence propertyPath, final SortOptionEntry.SortOrder order); @Override int getSize(); @Override boolean isEmpty(); @Override Stream<SortOptionEntry> stream(); @Override Iterator<SortOptionEntry> iterator(); @Override boolean equals(final Object o); @Override int hashCode(); @Override String toString();  }
@Test(expected = NullPointerException.class) public void tryToCreateNewInstanceWithNullEntries() { ImmutableSortOption.of(null); }