📅  最后修改于: 2022-03-11 14:52:45.699000             🧑  作者: Mango
Answer answer = new Answer() {
public Stream answer(InvocationOnMock invocation) throws Throwable {
return Stream.of("A", "B");
}
};
when(mock.streamMethod()).thenAnswer(answer);