I believe the problem lies in the inner reference to {{some_property1}}.
When the outer {{ }} is encountered, DevTest performs substitution on each of the properties inside the code block. We call this parseInState. The idea is to perform replacement of the DevTest property with the property's value.
So, let's assume that some_property1 key has a value of 123. When the code executes, DevTest performs the key/value replacement. However, the script is unable to determine the data type for 123 because it is not known to be a String object.
In the current logic, the IF statement converts to something like this:
if ( 123.equals("some_value1")
In the above fragment, 123 is not of type String so there is no context on which to locate the 'equals' method.
Alternatives:
1) Encode the {{some_property1}} reference in quotes so the value interprets as String
if ( "{{some_property1}}".equals("some_value1")) {
return "abc";
} else if ( "{{some_property1}}".equals("some_value2")) {
return "def";
} else return "xyz"; }}
Or,
2) In order to protect from potential null pointer exceptions, you could use getStateString
if ( testExec.getStateString("some_property1", "").equals("some_value1")) {
return "abc";
} else if ( testExec.getStateString("some_property1", "").equals("some_value2")) {
return "def";
} else return "xyz"; }}
Also, your original post might have an extra "(" paren in the
} else if (({{some_property1}}.equals("some_value2")) in your logic so check that syntax as well.