@Test public void enumImplements() throws Exception { TypeSpec typeSpec = TypeSpec.enumBuilder("Food") .addSuperinterface(Serializable.class) .addSuperinterface(Cloneable.class) .addEnumConstant("LEAN_GROUND_BEEF") .addEnumConstant("SHREDDED_CHEESE") .build(); assertThat(toString(typeSpec)).isEqualTo("" + "package com.squareup.tacos;\n" + "\n" + "import java.io.Serializable;\n" + "import java.lang.Cloneable;\n" + "\n" + "enum Food implements Serializable, Cloneable {\n" + " LEAN_GROUND_BEEF,\n" + "\n" + " SHREDDED_CHEESE\n" + "}\n"); }
public void dummy() { new Cloneable() {}; }