@Override
    public void writeClass() throws IOException {
        ClassName EVM_ANNOTATION = ClassName.get("org.web3j", "EVMTest");
        AnnotationSpec.Builder annotationSpec = AnnotationSpec.builder(EVM_ANNOTATION);
        if (JavaVersion.getJavaVersionAsDouble() < 11) {
            ClassName GethContainer = ClassName.get("org.web3j", "NodeType");
            annotationSpec.addMember("value", "type = $T.GETH", GethContainer);
        }
        TypeSpec testClass =
                TypeSpec.classBuilder(theContract.getSimpleName() + "Test")
                        .addMethods(MethodFilter.generateMethodSpecsForEachTest(theContract))
                        .addAnnotation((annotationSpec).build())
                        .addField(
                                theContract,
                                toCamelCase(theContract),
                                Modifier.PRIVATE,
                                Modifier.STATIC)
                        .build();
        JavaFile javaFile = JavaFile.builder(packageName, testClass).build();
        javaFile.writeTo(new File(writePath));
    }
@Test
    public void testThatExceptionIsThrownWhenAClassIsNotWritten() {
        assertThrows(
                NullPointerException.class,
                () -> new JavaClassGenerator(null, "org.com", temp.toString()).writeClass());
    }