| Test "hudson.util.ArgumentListBuilderTest#assertKeyValuePairsWithMask" creates an ArgumentListBuilder, add several key value pairs, and mask the second key ("key2"). Following is key part of the implementation of "ArgumentListBuilder.addKeyValuePairs"
...
for (Entry<String,String> e : props.entrySet()) {
addKeyValuePair(prefix, e.getKey(), e.getValue(), (propsToMask != null) && propsToMask.contains(e.getKey()));
}
...
The loop here iterates using props.entrySet, where props in this test is a HashMap. However, HashMap's entrySet does not have a deterministic iteration order and thus, test fails if the order of iteration is not as expected in the test, which is actually the insertion order. |