File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
streams/src/test/java/org/apache/kafka/streams/state/internals Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -98,19 +98,23 @@ public void before() {
9898 store = new ChangeLoggingKeyValueBytesStore (innerMock );
9999 store .init (context , store );
100100 }
101+
101102 private void mockPosition () {
102103 when (innerMock .getPosition ()).thenReturn (Position .emptyPosition ());
103104 }
105+
104106 private void mockGet (final Map <Bytes , byte []> mockMap ) {
105107 when (innerMock .get (any (Bytes .class ))).thenAnswer (invocation -> mockMap .get (invocation .getArgument (0 )));
106108 }
109+
107110 private void mockPut (final Map <Bytes , byte []> mockMap ) {
108111 doAnswer (invocation -> {
109112 mockMap .put (invocation .getArgument (0 ), invocation .getArgument (1 ));
110113 StoreQueryUtils .updatePosition (innerMock .getPosition (), context );
111114 return null ;
112115 }).when (innerMock ).put (any (Bytes .class ), any (byte [].class ));
113116 }
117+
114118 private void mockPutAll (final Map <Bytes , byte []> mockMap ) {
115119 doAnswer (invocation -> {
116120 final List <KeyValue <Bytes , byte []>> entries = invocation .getArgument (0 );
You can’t perform that action at this time.
0 commit comments