EnumGenerator { public void generatePackage(Classifier clazz, AST ast, CompilationUnit cu) { PackageDeclaration pd = ast.newPackageDeclaration(); String fullPackageName = getFullPackageName(clazz); pd.setName(ast.newName(fullPackageName)); Date now = new Date(); String commentDate = "Generation date: " + now.toString() + "."; interfaceGenerator.generatePackageJavadoc(ast, pd, PackageComment.CONTENT_1.getValue(), PackageComment.CONTENT_2.getValue(), " ", PackageComment.CONTENT_3.getValue(), " ", commentDate); cu.setPackage(pd); }  void setConstructorParameterNames(
			ArrayList<String> constructorParameterNames); CompilationUnit generateEnum(Classifier clazz,
			String sourceDirectoryPackageName); @SuppressWarnings("unchecked") void generateAttributes(Classifier clazz, AST ast, EnumDeclaration ed); FieldDeclaration generateAttribute(Classifier clazz, AST ast,
			Property property); @SuppressWarnings("unchecked") void generateGetterMethod(Classifier clazz, AST ast,
			EnumDeclaration ed); void generateGetterMethod(Classifier clazz, AST ast,
			EnumDeclaration ed, String sourceDirectoryPackageName); @SuppressWarnings("unchecked") void generateConstructor(Classifier clazz, AST ast,
			EnumDeclaration ed); @SuppressWarnings("unchecked") EnumDeclaration generateEnum(Classifier clazz, AST ast,
			CompilationUnit cu); void generateClassJavadoc(Element clazz, AST ast, BodyDeclaration td); void generatePackage(Classifier clazz, AST ast, CompilationUnit cu); @SuppressWarnings("unchecked") void generateConstants(Classifier clazz, AST ast, EnumDeclaration ed);  }
@Test public void testGeneratePackage() { AST ast = AST.newAST(AST.JLS3); CompilationUnit cu = ast.newCompilationUnit(); enumGenerator.generatePackage(clazz, ast, cu); String onlyPackage = cu.toString(); String expectedResult = "package de.crowdcode.kissmda.testapp.components;\n"; boolean isInside = onlyPackage.contains(expectedResult); assertTrue(isInside); }