private void maybeReset(Object o) {
		if (mockUtil.isMock(o)) {
			Mockito.reset(o);
		}
	}
Conditional resetting in case the dependency has been overridden and is not actually a mock.
spring-xd-dirt/src/test/java/org/springframework/xd/dirt/rest/AbstractControllerIntegrationTest.java