Skip to content

Commit e63a8b9

Browse files
spotless
Signed-off-by: rithin-pullela-aws <rithinp@amazon.com>
1 parent 17a0f7a commit e63a8b9

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

ml-algorithms/src/test/java/org/opensearch/ml/engine/tools/QueryPlanningToolTests.java

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -269,8 +269,6 @@ public void testFactoryCreateWithInvalidType() {
269269
assertEquals("Invalid generation type: invalid. The current supported types are llmGenerated.", exception.getMessage());
270270
}
271271

272-
273-
274272
@Test
275273
public void testAllParameterProcessing() {
276274
QueryPlanningTool tool = new QueryPlanningTool("llmGenerated", queryGenerationTool);
@@ -279,29 +277,29 @@ public void testAllParameterProcessing() {
279277
parameters.put("index_mapping", "{\"properties\":{\"title\":{\"type\":\"text\"}}}");
280278
parameters.put("query_fields", "[\"title\", \"content\"]");
281279
// No system_prompt - should use default
282-
280+
283281
@SuppressWarnings("unchecked")
284282
ActionListener<String> listener = mock(ActionListener.class);
285-
283+
286284
doAnswer(invocation -> {
287285
ActionListener<String> modelListener = invocation.getArgument(1);
288286
modelListener.onResponse("{\"query\":{\"match\":{\"title\":\"test\"}}}");
289287
return null;
290288
}).when(queryGenerationTool).run(any(), any());
291-
289+
292290
tool.run(parameters, listener);
293-
291+
294292
ArgumentCaptor<Map<String, String>> captor = ArgumentCaptor.forClass(Map.class);
295293
verify(queryGenerationTool).run(captor.capture(), any());
296-
294+
297295
Map<String, String> capturedParams = captor.getValue();
298-
296+
299297
// All parameters should be processed
300298
assertTrue(capturedParams.containsKey("query_text"));
301299
assertTrue(capturedParams.containsKey("index_mapping"));
302300
assertTrue(capturedParams.containsKey("query_fields"));
303301
assertTrue(capturedParams.containsKey(SYSTEM_PROMPT_FIELD));
304-
302+
305303
// Processed parameters should be JSON strings
306304
assertTrue(capturedParams.get("index_mapping").startsWith("\""));
307305
assertTrue(capturedParams.get("query_fields").startsWith("\""));

0 commit comments

Comments
 (0)