    @Test
    public void testMyEnum() throws JClassAlreadyExistsException {

        SmiCodeNamingStrategy namingStrategy = new StraightNamingStrategy("");
        SmiType type = new SmiType(new IdToken(null, "MyEnum"), new SmiModule(new SmiMib(null, null), new IdToken(null, "MyModule")), SmiPrimitiveType.ENUM);
        type.getModule().getMib().setCodeNamingStrategy(new StraightNamingStrategy(settings.getPackageName()));
        type.setEnumValues(Arrays.asList(new SmiNamedNumber(new IdToken(null, "enum1"), new BigIntegerToken(1)),
                new SmiNamedNumber(new IdToken(null, "enum2"), new BigIntegerToken(2))));
        JDefinedClass ec = new EnumBuilder(settings, type, codeModel).build();
        assertEquals("MyEnum", ec.name());
        assertEquals(2, getEnumConstantsByName(ec).size());
    }