1212import static junit .framework .TestCase .assertEquals ;
1313import static org .junit .Assert .assertThrows ;
1414
15+ import com .google .common .collect .ImmutableSet ;
1516import com .google .common .collect .Lists ;
16- import com .google .common .collect .Sets ;
1717import java .util .HashSet ;
1818import java .util .List ;
1919import java .util .Set ;
@@ -39,12 +39,12 @@ public void init() {
3939
4040 @ Test
4141 public void testEnumerationDeclaration () {
42- Set <String > colors = Sets . newHashSet ("Blue" , "White" );
42+ Set <String > colors = ImmutableSet . of ("Blue" , "White" );
4343 EnumerationFormulaType colorType = emgr .declareEnumeration ("Color" , "Blue" , "White" );
4444 assertEquals ("Color" , colorType .getName ());
4545 assertEquals (colors , colorType .getElements ());
4646
47- Set <String > shapes = Sets . newHashSet ("Circle" , "Square" , "Triangle" );
47+ Set <String > shapes = ImmutableSet . of ("Circle" , "Square" , "Triangle" );
4848 EnumerationFormulaType shapeType = emgr .declareEnumeration ("Shape" , shapes );
4949 assertEquals ("Shape" , shapeType .getName ());
5050 assertEquals (shapes , shapeType .getElements ());
@@ -64,8 +64,8 @@ public void testType() {
6464
6565 @ Test
6666 public void testRepeatedEnumerationDeclaration () {
67- Set <String > colors = Sets . newHashSet ("Blue" , "White" );
68- Set <String > otherColors = Sets . newHashSet ("Blue" , "White" , "Red" );
67+ Set <String > colors = ImmutableSet . of ("Blue" , "White" );
68+ Set <String > otherColors = ImmutableSet . of ("Blue" , "White" , "Red" );
6969 EnumerationFormulaType colorType = emgr .declareEnumeration ("Color" , colors );
7070
7171 // same type again is allowed
0 commit comments