Direct unit test
@Test void weather_returnsCurrent() {
var tool = new WeatherTool(mockHttp);
var result = (Map) tool.call(Map.of("city", "Bangalore"));
assertThat(result).containsKey("temperature_c");
} Advertisement
Schema validation test
Assert the schema rejects bad args before call() runs.
Advertisement
Integration with agent
Wire tool into a MockLLM-driven agent, assert the agent calls it with the right args.