@Test public void javaFileShouldHaveCorrectPackageName() { JavaFile javaFile = entanglingClass.brewJava(); assertThat(javaFile.packageName, is(PACKAGE_NAME)); }
JavaFile brewJava() { TypeSpec classTypeSpec = createTypeSpec(); return JavaFile.builder(classPackage, classTypeSpec) .addFileComment(GENERATED_CODE_COMMENT) .build(); }
EntanglingClass { JavaFile brewJava() { TypeSpec classTypeSpec = createTypeSpec(); return JavaFile.builder(classPackage, classTypeSpec) .addFileComment(GENERATED_CODE_COMMENT) .build(); } }
EntanglingClass { JavaFile brewJava() { TypeSpec classTypeSpec = createTypeSpec(); return JavaFile.builder(classPackage, classTypeSpec) .addFileComment(GENERATED_CODE_COMMENT) .build(); } EntanglingClass(String classPackage, String className, String targetClass, String fieldName, String connectionId); }
EntanglingClass { JavaFile brewJava() { TypeSpec classTypeSpec = createTypeSpec(); return JavaFile.builder(classPackage, classTypeSpec) .addFileComment(GENERATED_CODE_COMMENT) .build(); } EntanglingClass(String classPackage, String className, String targetClass, String fieldName, String connectionId);  }
EntanglingClass { JavaFile brewJava() { TypeSpec classTypeSpec = createTypeSpec(); return JavaFile.builder(classPackage, classTypeSpec) .addFileComment(GENERATED_CODE_COMMENT) .build(); } EntanglingClass(String classPackage, String className, String targetClass, String fieldName, String connectionId);   }