@Test
public void testTransformUpcoming() throws Exception {

    try( BufferedReader bufferedReader = new BufferedReader( new InputStreamReader( getClass().getClassLoader().getResourceAsStream( "org/mythtv/android/data/entity/mapper/Dvr_GetUpcomingList.json" ) ) ) ) {
        String line = null;
        String message = new String();
        final StringBuffer buffer = new StringBuffer( 2048 );
        while( ( line = bufferedReader.readLine()) != null ) {
            // buffer.append(line);
            message += line;
        }
        List<ProgramEntity> programEntities = programEntityJsonMapper.transformProgramEntityCollection( message );
        assertThat( programEntities, not(nullValue() ) );
        List<MediaItemEntity> mediaItems = MediaItemEntityDataMapper.transformPrograms( programEntities );
        assertThat( mediaItems, not( nullValue()) );
        assertThat( mediaItems, hasSize(equalTo( 40 ) ) );
        for( MediaItemEntity mediaItem : mediaItems ) {
            assertThat( mediaItem.isValid(), is( true ) );
            assertThat( mediaItem.validationErrors(), hasSize( 0 ) );
        }
    }
}