Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package io.a2a.server.events;

import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,8 @@ public void testOnMessageNewMessageSuccessMocks() {
SendMessageResponse response;
try (MockedConstruction<EventConsumer> mocked = Mockito.mockConstruction(
EventConsumer.class,
(mock, context) -> {Mockito.doReturn(ZeroPublisher.fromItems(wrapEvent(MINIMAL_TASK))).when(mock).consumeAll();})){
(mock, context) -> {Mockito.doReturn(ZeroPublisher.fromItems(wrapEvent(MINIMAL_TASK))).when(mock).consumeAll();
Mockito.doCallRealMethod().when(mock).createAgentRunnableDoneCallback();})){
Comment on lines +189 to +190
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For better readability, it's good practice to format lambda bodies with multiple statements on separate lines with proper indentation. This makes the code easier to read and maintain.

                (mock, context) -> {
                    Mockito.doReturn(ZeroPublisher.fromItems(wrapEvent(MINIMAL_TASK))).when(mock).consumeAll();
                    Mockito.doCallRealMethod().when(mock).createAgentRunnableDoneCallback();
                })){

response = handler.onMessageSend(request, callContext);
}
assertNull(response.getError());
Expand Down