Advanced Verify With Mockito

        verify(mock).method(eq("someStringArg"), argThat(complexArg -> {
            
            assertThat(complexArg.getValue1(), is(equalTo("Value 1")));
            assertThat(complexArg.getValue2(), is(equalTo("Value 2")));
            assertThat(complexArg.getValue3(), is(equalTo("Value 3")));
           
            // required for predicate
            return true;
        }));
Written on June 13, 2018
Licence Creative Commons
Ce(tte) œuvre est mise à disposition selon les termes de la Licence Creative Commons Attribution 4.0 International.