class ProxyBuilder {

    public void build(Filer filer) throws IOException {
        JavaFile javaFile = JavaFile.builder(mPackagePath, createTargetClass())
                .addFileComment("Generated code from RxBus. Do not modify!")
                .build();
        javaFile.writeTo(filer);
    }

}

class ProxyBuilderTest {

    @Test
    public void testCreateClass() {

        File file = new File("/home/trs/AndroidStudioProjects/RxBus/exampleTest");
        File DemoTestClass = new File(file.getAbsolutePath() + "/vite/demo/MainActivity$$Proxy.java");
        ProxyBuilder builder = new ProxyBuilder(ClassName.get("vite.demo", "MainActivity"));
        builder.build(file);

        assertTrue(file.exists());
        assertTrue(DemoTestClass.exists());
    }

}