void (@NotNull BuildController controller, @NotNull Model projectModel, @NotNull ProjectImportModelProvider.ProjectModelConsumer modelConsumer) { ProjectPropertiesTestModelBuilder.ProjectProperties model = controller.getModel(projectModel, ProjectPropertiesTestModelBuilder.ProjectProperties.class); Map<String, String> propertiesMap = new HashMap<>(model.getPropertiesMap()); for (String key : new ArrayList<>(propertiesMap.keySet())) { if (!key.equals("name") && !key.startsWith("prop_loaded_")) { propertiesMap.remove(key); } } modelConsumer.consume(new ProjectLoadedModel(propertiesMap), ProjectLoadedModel.class); }