AddAttributeTransformToSummaryOfImportedFields extends Processor { @Override public void process(boolean validate, boolean documentsOnly) { search.allImportedFields() .forEach(field -> setTransform(field)); } AddAttributeTransformToSummaryOfImportedFields(Search search,
                                                          DeployLogger deployLogger,
                                                          RankProfileRegistry rankProfileRegistry,
                                                          QueryProfiles queryProfiles); @Override void process(boolean validate, boolean documentsOnly);  }
@Test public void attribute_summary_transform_applied_to_summary_field_of_imported_field() { Search search = createSearchWithDocument(DOCUMENT_NAME); search.setImportedFields(createSingleImportedField(IMPORTED_FIELD_NAME)); search.addSummary(createDocumentSummary(IMPORTED_FIELD_NAME)); AddAttributeTransformToSummaryOfImportedFields processor = new AddAttributeTransformToSummaryOfImportedFields( search,null,null,null); processor.process(true, false); SummaryField summaryField = search.getSummaries().get(SUMMARY_NAME).getSummaryField(IMPORTED_FIELD_NAME); SummaryTransform actualTransform = summaryField.getTransform(); assertEquals(SummaryTransform.ATTRIBUTE, actualTransform); }