markap14 commented on code in PR #7874: URL: https://github.com/apache/nifi/pull/7874#discussion_r1367031263
########## 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<>(); Review Comment: I think I would disagree on this one. I believe that the order in which properties are removed, renamed, updated, etc. is not something that should be relied upon in a test. Tests should verify that "given this input, the expected output is produced." They should not attempt to assert the order in which the operations were performed in order to obtain that output - doing so would make the test very brittle. -- 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