public FunSpec getFunSpec() {
        return methodNeedsInjection()
                ? new FunSpecGenerator(
                                uniqueFunctionName,
                                BeforeAll.class,
                                defaultParameterSpecsForEachUnitTest(),
                                generateStatementBody())
                        .generate()
                : new FunSpecGenerator(uniqueFunctionName, generateStatementBody()).generate();
    }
@Test
    public void testThatNewGreetingMethodWasGenerated() {
        Optional<Method> deployFun =
                filteredMethods.stream().filter(m -> m.getName().equals("newGreeting")).findAny();
        FunSpec deployFunSpec =
                new FunParser(deployFun.get(), greeterContractClass, "newGreeting").getFunSpec();
        assertEquals(
                deployFunSpec.toString(),
                "@org.junit.jupiter.api.Test\n"
                        + "public fun newGreeting() {\n"
                        + "  val transactionReceiptVar = greeter.newGreeting(\"REPLACE_ME\").send()\n"
                        + "  org.junit.jupiter.api.Assertions.assertTrue(transactionReceiptVar.isStatusOK())\n"
                        + "}\n");
    }