package fi.vincit.multiusertest.rule;

import fi.vincit.multiusertest.annotation.TestUsers;

/**
 * Util class to make parameter name easy to read
 */
class Identifiers {

    private String[] identifiers;

    public static Identifiers of(String... identifiers) {
        Identifiers self = new Identifiers();
        self.identifiers = identifiers;
        return self;
    }

    public String[] getIdentifiers() {
        return identifiers;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        for (String identifier : this.identifiers) {
            sb.append(identifierToString(identifier)).append(", ");
        }
        final String s = sb.toString();
        return s.substring(0, s.length() - 2);
    }

    private String identifierToString(String identifier) {
        switch (identifier) {
            case TestUsers.CREATOR: return "creator";
            case TestUsers.NEW_USER: return "new user";
            default: return identifier;
        }
    }
}

@@ -182,24 +182,30 @@
     private 
+final 
 String%5B%5D ide
@@ -215,16 +215,16 @@
 fiers;%0D%0A
-
 %0D%0A    pu
@@ -288,32 +288,32 @@
     
-Identifiers self = new I
+return new Identifiers(i
 dent
@@ -318,25 +318,24 @@
 ntifiers
-(
 );%0D%0A    
     self
@@ -330,18 +330,26 @@
     
-    self.i
+%7D%0D%0A%0D%0A    private I
 dent
@@ -354,18 +354,25 @@
 ntifiers
- =
+(String%5B%5D
  identif
@@ -371,25 +371,27 @@
  identifiers
-;
+) %7B
 %0D%0A        re
@@ -392,19 +392,38 @@
     
-return self
+this.identifiers = identifiers
 ;%0D%0A 

Add final to Identifiers private field