DetailsEditGrid extends BaseDetailsEditGrid<Collection<T>, ID, T> { @Override protected DataProvider<T, SerializablePredicate<T>> getDataProvider() { return provider; } DetailsEditGrid(EntityModel<T> entityModel, AttributeModel attributeModel, boolean viewMode, FormOptions formOptions); Comparator<T> getComparator(); int getItemCount(); @Override Collection<T> getValue(); void setComparator(Comparator<T> comparator);  }
@Test @SuppressWarnings({ "unchecked" }) public void testReadOnlyWithSearch() { EntityModel<TestEntity> em = factory.getModel(TestEntity.class); DetailsEditGrid<Integer, TestEntity> grid = createGrid(em, null, false, true, new FormOptions().setDetailsGridSearchMode(true)); grid.setService(service); ListDataProvider<TestEntity> lep = (ListDataProvider<TestEntity>) grid.getGrid().getDataProvider(); assertEquals(0, lep.getItems().size()); assertFalse(grid.getAddButton().isVisible()); assertTrue(grid.getSearchDialogButton().isVisible()); }