Mass conversion to static methods
[netconf.git] / restconf / sal-rest-connector / src / test / java / org / opendaylight / restconf / utils / schema / context / RestconfSchemaUtilTest.java
index c572bb67ce9bfb3fdb1f88053d2e87dbf32285ee..d19c0ab565a46af01919dc437b80c615076e0a5d 100644 (file)
@@ -37,15 +37,15 @@ public class RestconfSchemaUtilTest {
         findSchemaNodeInCollection("bad_key", origSchNode);
     }
 
-    private SchemaNode findSchemaNodeInCollection(final String key, final SchemaNode... origSchNode) {
+    private static SchemaNode findSchemaNodeInCollection(final String key, final SchemaNode... origSchNode) {
         final List<SchemaNode> collection = new ArrayList<>();
-        for (int i = 0; i < origSchNode.length; i++) {
-            collection.add(origSchNode[i]);
+        for (SchemaNode element : origSchNode) {
+            collection.add(element);
         }
         return RestconfSchemaUtil.findSchemaNodeInCollection(collection, key);
     }
 
-    private SchemaNode mockSchemaNode(final String origKey) {
+    private static SchemaNode mockSchemaNode(final String origKey) {
         final SchemaNode mockSchNode = Mockito.mock(SchemaNode.class);
         Mockito.when(mockSchNode.getQName())
                 .thenReturn(QName.create("ns", new SimpleDateFormat("yyyy-MM-dd").format(new Date()), origKey));