@Test
public void verifyProgramFailsValidation()
{

    ProgramInstanceQueryParams programInstanceQueryParams = new ProgramInstanceQueryParams();
    programInstanceQueryParams.setProgram( programA );
    programInstanceQueryParams.setProgramStatus( ProgramStatus.ACTIVE );
    when( programInstanceService.getProgramInstances( programA, ProgramStatus.ACTIVE ) )
        .thenReturn( Lists.newArrayList( new ProgramInstance(), new ProgramInstance() ) );
    List<ErrorReport> errors = subject.validate( programA, null );
    assertEquals( 1, errors.size() );
    assertEquals( errors.get( 0 ).getErrorCode(), ErrorCode.E6000 );
    assertEquals( errors.get( 0 ).getMessage(), "Program `ProgramA` has more than one Program Instances" );
}