### Question:
GreetingController { @RequestMapping(value = {"/greeting/{name}", "/greeting"}) Greeting greeting(@PathVariable(required = false) String name) { String object = name != null ? name : "world"; if (object.equalsIgnoreCase("jack griffin")) { return new Greeting("I don't know who you are."); } else { return new Greeting("Hello, " + object + "!"); } }    }### Answer:
@Test(dataProvider = "greetingData") public void testDirectGreeting(String name, String greeting) { assertEquals( greetingController.greeting(name).getMessage(), greeting); }