Skip to content

Commit

Permalink
Added unit test
Browse files Browse the repository at this point in the history
Signed-off-by: Guian Gumpac <[email protected]>
  • Loading branch information
GumpacG committed Mar 18, 2023
1 parent 88b7d6b commit 66ae9aa
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@

package org.opensearch.sql.planner.physical;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;

import java.util.List;
import org.junit.jupiter.api.Test;
Expand Down Expand Up @@ -50,4 +52,12 @@ void addSplitToChildByDefault() {
testPlan.add(split);
verify(child).add(split);
}

@Test
void testGetRawResponse() {
when(child.getRawResponse()).thenReturn("not empty", "", null);
assertEquals("not empty", testPlan.getRawResponse());
assertEquals("", testPlan.getRawResponse());
assertEquals("", testPlan.getRawResponse());
}
}

0 comments on commit 66ae9aa

Please sign in to comment.