@Test
public void copy() throws Exception{
Filter f = new FilterImpl(null, "SELECT * FROM [nt:file]", new QueryEngineSettings());
IndexPlan.Builder b = new IndexPlan.Builder();
IndexPlan plan1 = b.setEstimatedEntryCount(10).setFilter(f).setDelayed(true).build();
IndexPlan plan2 = plan1.copy();
plan2.setFilter(new FilterImpl(null, "SELECT * FROM [oak:Unstructured]", new QueryEngineSettings()));
assertEquals(plan1.getEstimatedEntryCount(), 10);
assertEquals(plan2.getEstimatedEntryCount(), 10);
assertTrue(plan1.isDelayed());
assertTrue(plan2.isDelayed());
assertEquals(plan1.getFilter().getQueryStatement(), "SELECT * FROM [nt:file]");
assertEquals(plan2.getFilter().getQueryStatement(), "SELECT * FROM [oak:Unstructured]");
}