SearchContextModel implements IModel<SearchContext>, SearchContext { @Override public SearchContext getObject() { return this; } SearchContextModel(IModel<QueryFacetsSelection> selectionModel);  SearchContextModel(Long index, Long resultCount, IModel<QueryFacetsSelection> selectionModel); IModel<QueryFacetsSelection> getSelectionModel(); @Override QueryFacetsSelection getSelection(); @Override Long getResultCount(); @Override Long getIndex(); @Override SearchContext getObject(); @Override void detach(); static SearchContextModel next(SearchContext current); static SearchContextModel previous(SearchContext current); @Override boolean hasPrevious(); @Override boolean hasNext();  }
@Test public void testGetObject() { SearchContext result = instance.getObject(); assertEquals(index, result.getIndex()); assertEquals(resultCount, result.getResultCount()); assertEquals(selection, result.getSelection()); }