Answers for "mock service when with void java"

0

mock a service when the method returning void

doAnswer((i) -> {
	System.out.println("Employee setName Argument = " + i.getArgument(0));
	assertTrue("Pankaj".equals(i.getArgument(0)));
	return null;
}).when(emp).setName(anyString());
Posted by: Guest on May-12-2020

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language