GroupByImpl extends BaseFinishedSelectStatement implements GroupBy { @NotNull @Override public OrderBy orderBy(@NotNull final String... terms) { return new OrderByImpl(terms, this); } GroupByImpl(@NotNull final String expression, @NotNull final SqlPart previous); @NotNull @Override OrderBy orderBy(@NotNull final String... terms); @NotNull @Override Limit limit(final long limit); @Override void prependTo(@NotNull final RawSqlBuilder builder); @Nullable @Override SqlPart previous();  }
@Test public void orderBy_returnsNotNullValue() { GroupByImpl groupBy = new GroupByImpl("a", mock(SqlPart.class)); OrderBy result = groupBy.orderBy("a"); assertThat(result, is(notNullValue())); }