cadonna commented on code in PR #10881: URL: https://github.com/apache/kafka/pull/10881#discussion_r895663246
########## streams/src/test/java/org/apache/kafka/streams/kstream/internals/graph/TableSourceNodeTest.java: ########## @@ -23,43 +23,32 @@ import org.apache.kafka.streams.kstream.internals.MaterializedInternal; import org.apache.kafka.streams.kstream.internals.graph.TableSourceNode.TableSourceNodeBuilder; import org.apache.kafka.streams.processor.internals.InternalTopologyBuilder; -import org.easymock.EasyMock; import org.junit.Test; -import org.junit.runner.RunWith; -import org.powermock.api.easymock.PowerMock; -import org.powermock.core.classloader.annotations.PrepareForTest; -import org.powermock.modules.junit4.PowerMockRunner; import java.util.Properties; -@RunWith(PowerMockRunner.class) -@PrepareForTest({InternalTopologyBuilder.class}) +import static org.mockito.Mockito.mock; + public class TableSourceNodeTest { private static final String STORE_NAME = "store-name"; private static final String TOPIC = "input-topic"; - private final InternalTopologyBuilder topologyBuilder = PowerMock.createNiceMock(InternalTopologyBuilder.class); + private final InternalTopologyBuilder topologyBuilder = mock(InternalTopologyBuilder.class); @Test public void shouldConnectStateStoreToInputTopicIfInputTopicIsUsedAsChangelog() { final boolean shouldReuseSourceTopicForChangelog = true; topologyBuilder.connectSourceStoreAndTopic(STORE_NAME, TOPIC); - EasyMock.replay(topologyBuilder); buildTableSourceNode(shouldReuseSourceTopicForChangelog); - - EasyMock.verify(topologyBuilder); Review Comment: @wycccccc I do not agree. You have to add `verify(topologyBuilder).connecSourceStoreAndTopic(STORE_NAME, TOPIC);`. How should Mockito know what to verify? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org