markap14 commented on code in PR #7874:
URL: https://github.com/apache/nifi/pull/7874#discussion_r1367034467


##########
nifi-mock/src/main/java/org/apache/nifi/util/MockPropertyConfiguration.java:
##########
@@ -0,0 +1,138 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.nifi.util;
+
+import org.apache.nifi.migration.PropertyConfiguration;
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Optional;
+import java.util.Set;
+import java.util.UUID;
+
+public class MockPropertyConfiguration implements PropertyConfiguration {
+    private final Map<String, String> propertyRenames = new HashMap<>();
+    private final Set<String> propertiesRemoved = new HashSet<>();
+    private final Set<String> propertiesUpdated = new HashSet<>();
+    private final Map<String, String> rawProperties;
+    private final Set<CreatedControllerService> createdControllerServices = 
new HashSet<>();
+
+
+    public MockPropertyConfiguration(final Map<String, String> propertyValues) 
{
+        this.rawProperties = new HashMap<>(propertyValues);

Review Comment:
   There is, in general, no expectation of ordering of elements in the map. If 
there were, we would want to require a `SequencedMap` rather than a `Map`. In 
general, the List of Property Descriptors is ordered, so that we can provide a 
better user experience via the UI. However, the order in which elements are 
iterated over need not be maintained.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@nifi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to