diff --git a/src/test/java/org/opensearch/neuralsearch/processor/NeuralQueryEnricherProcessorTests.java b/src/test/java/org/opensearch/neuralsearch/processor/NeuralQueryEnricherProcessorTests.java index b811766f6..05d7298ee 100644 --- a/src/test/java/org/opensearch/neuralsearch/processor/NeuralQueryEnricherProcessorTests.java +++ b/src/test/java/org/opensearch/neuralsearch/processor/NeuralQueryEnricherProcessorTests.java @@ -50,9 +50,11 @@ public void testProcessRequest_whenVisitingEmptyQueryBody_thenSuccess() throws E NeuralQueryEnricherProcessor.Factory factory = new NeuralQueryEnricherProcessor.Factory(); SearchRequest searchRequest = new SearchRequest(); searchRequest.source(new SearchSourceBuilder()); + assertNull(searchRequest.source().query()); NeuralQueryEnricherProcessor processor = createTestProcessor(factory); SearchRequest processSearchRequest = processor.processRequest(searchRequest); - assert (processSearchRequest == searchRequest); + // should do nothing + assertNull(processSearchRequest.source().query()); } public void testType() throws Exception {