public MethodSpec getMethodSpec() {
        return methodNeedsInjection()
                ? new MethodSpecGenerator(
                                uniqueMethodName,
                                BeforeAll.class,
                                Modifier.STATIC,
                                defaultParameterSpecsForEachUnitTest(),
                                generateStatementBody())
                        .generate()
                : new MethodSpecGenerator(uniqueMethodName, generateStatementBody()).generate();
    }
@Test
    public void testThatNewGreetingMethodWasGenerated() {

        Optional<Method> deployMethod =
                filteredMethods.stream().filter(m -> m.getName().equals("newGreeting")).findAny();
        MethodSpec deployMethodSpec =
                new MethodParser(deployMethod.get(), greeterContractClass, "newGreeting")
                        .getMethodSpec();
        assertEquals(
                "org.web3j.protocol.core.methods.response.TransactionReceipt transactionReceiptVar = greeter.newGreeting(\"REPLACE_ME\").send();\n"
                        + "org.junit.jupiter.api.Assertions.assertTrue(transactionReceiptVar.isStatusOK());\n",
                deployMethodSpec.code.toString());
    }