Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

spring mock Streamble of object

Answer<Stream> answer = new Answer<Stream>() {
    public Stream answer(InvocationOnMock invocation) throws Throwable {
        return Stream.of("A", "B");
    }
};


when(mock.streamMethod()).thenAnswer(answer);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #spring #mock #Streamble #object
ADD COMMENT
Topic
Name
6+8 =