public static List<Method> extractValidMethods(Class contract) {
        return Arrays.stream(contract.getDeclaredMethods())
                .filter(
                        m ->
                                !m.isSynthetic()
                                        && parametersAreMatching(m)
                                        && !m.getName().toLowerCase().contains("event")
                                        && !m.getName().equals("load")
                                        && !m.getName().equals("kill")
                                        && !m.getName().equals("linkLibraries"))
                .collect(Collectors.toList());
    }
@Test
    public void testThatTheCorrectDeployMethodWasExtracted() {
        List<Method> filteredMethods = MethodFilter.extractValidMethods(greeterContractClass);
        List<Method> deployMethod =
                filteredMethods.stream()
                        .filter(m -> m.getName().equals("deploy"))
                        .collect(Collectors.toList());
        List<Class<?>> deployMethodParameterTypes =
                Arrays.asList(deployMethod.get(0).getParameterTypes());
        assertTrue(
                deployMethodParameterTypes.containsAll(
                        Arrays.asList(
                                Web3j.class, TransactionManager.class, ContractGasProvider.class)));
    }