@Test
public void invalid() throws Exception
{
when(mockTemplate.validateMessage()).thenReturn(false);
new ValidationPhase().runPhase(mockTemplate, mockContext, mockPhaseResultNotifier);
verify(mockTemplate,times(1)).discardInvalidMessage();
verify(mockPhaseResultNotifier, Mockito.times(1)).phaseConsumedMessage();
}