import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

import java.util.Collections;


public class MUC_Sample {

    public void testMUC() {
        List<String> l = getImmutableList();
        
        l.add("Uhoh");
    }
    
    public void testPossiblyMUC() {
        Set<String> s = getPossiblyImmutableSet(Math.random() > 0.5);
        
        s.add("Yowsers");
    }
    
    public List<String> getImmutableList() {
        return Arrays.asList("foo");
    }
    
    public Set<String> getPossiblyImmutableSet(boolean b) {
        if (b)
            return Collections.unmodifiableSet(new HashSet<String>());
        
        return new HashSet<String>();
    }
    
    
}

@@ -409,32 +409,162 @@
 s%22);%0A    %7D%0A    %0A
+    public void testMUCChained() %7B%0A        List%3CString%3E l = getImmutableListChained();%0A        %0A        l.add(%22Uhoh%22);%0A    %7D%0A    %0A
     public List%3C
@@ -840,19 +840,117 @@
 %0A    %7D%0A    %0A
+    public List%3CString%3E getImmutableListChained() %7B%0A        return getImmutableList();%0A    %7D%0A    %0A
     %0A%7D%0A

add test for chained MUC