### Question:
Database implements DatabaseDistribution, QueryProvider { @Override public DatabaseDistribution orderBy(OrderByMode orderByMode, String argument) { orderByClause = new OrderByClause(orderByMode, argument); return this; } Database(); @Override ListenerPromise<ConnectionStatus> onConnect(); @Override DatabaseDistribution inReference(String databasePath); @Override Promise<Void> setValue(final Object value); @Override @SuppressWarnings("unchecked") Promise<E> readValue(final Class<T> dataType); @Override @SuppressWarnings("unchecked") ListenerPromise<R> onDataChange(final Class<T> dataType); @Override ListenerPromise<R> onChildChange(final Class<T> dataType, final ChildEventType... eventsType); @Override @SuppressWarnings("unchecked") DatabaseDistribution filter(FilterType filterType, V... filterArguments); @Override DatabaseDistribution orderBy(OrderByMode orderByMode, String argument); @Override DatabaseDistribution orderBy(OrderByMode orderByMode); @Override DatabaseDistribution push(); @Override Promise<Void> removeValue(); @Override Promise<Void> updateChildren(final Map<String, Object> data); @Override @SuppressWarnings("unchecked") Promise<Void> transaction(final Class<T> dataType, final Function<R, R> transaction); @Override void setPersistenceEnabled(boolean enabled); @Override void keepSynced(boolean synced); @Override String getReferencePath(); @Override Array<Filter> getFilters(); @Override OrderByClause getOrderByClause(); @Override void terminateOperation();  }### Answer:
@Test public void orderBy() { Database database = new Database(); database.orderBy(OrderByMode.ORDER_BY_KEY, "test"); Assert.assertEquals(OrderByMode.ORDER_BY_KEY, ((OrderByClause) Whitebox.getInternalState(database, "orderByClause")).getOrderByMode()); Assert.assertEquals("test", ((OrderByClause) Whitebox.getInternalState(database, "orderByClause")).getArgument()); }