@Test
public void verifyUpdateProgramStage()
{

    ProgramStage programStage = createProgramStage( 'A', 1 );
    programA.getProgramStages().add( programStage );
    ArgumentCaptor<Program> argument = ArgumentCaptor.forClass( Program.class );
    ArgumentCaptor<ProgramStage> argPS = ArgumentCaptor.forClass( ProgramStage.class );
    programService.addProgram( programA );
    subject.postCreate( programA, null );
    verify( programService ).updateProgram( argument.capture() );
    verify( programStageService ).saveProgramStage( argPS.capture() );
    assertThat( argPS.getValue().getName(), is( equalToIgnoringCase( "ProgramStageA" ) ) );
    assertThat( argPS.getValue().getProgram(), is( programA ) );
    assertThat( argument.getValue().getName(), is( equalToIgnoringCase( "ProgramA" ) ) );
    assertThat( argument.getValue().getProgramStages().size(), is( 1 ) );
    assertThat( argument.getValue().getProgramStages().iterator().next().getName(),
        is( equalToIgnoringCase( "ProgramStageA" ) ) );
}