package ex;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;

public class STT_Sample {

    enum Sample {
        Hi, Lo
    };

    Map<String, Object> map = new HashMap<>();

    String val;

    public void testToStringToField() {
        val = Sample.Hi.toString();
    }

    public void testSBWithToStringToField(Date d, Integer i) {
        StringBuilder s = new StringBuilder();
        s.append(d);
        s.append(i);
        val = s.toString();
    }

    public Object testSBToMapField(Date d1, Date d2) {
        map.put("a-v", d1 + ":" + d2);
        return map.get(d1 + "-" + d2);
    }

    public String testParseOfMapResult() {
        String s = (String) map.get("foo");
        int colonPos = s.indexOf(":");
        return s.substring(0, colonPos);
    }

    public void fpTestToStringToFieldSB(String s) {
        val = s + "wow";
    }

    public void fpAllowUUID() {
        val = UUID.randomUUID().toString();
    }
}

@@ -5,16 +5,17 @@
 age ex;%0A
+%0A
 import j
@@ -810,32 +810,223 @@
 lonPos);%0A    %7D%0A%0A
+    public Map%3CString, String%3E testLocalMapKeyedByStringifiedType(String a, String b) %7B%0A        Map%3CString, String%3E s = new HashMap%3C%3E();%0A        s.put(a + b, b + a);%0A        return s;%0A    %7D%0A%0A
     public void 

add bad stt example with local maps