@Test
  public void testNitroSpecificFields() {
    Film film = createNitroFilm(false);
    ItemOnDemandHierarchy hierarchy = hierarchyFrom(film);
    String versionCrid = idGenerator.generateVersionCrid(hierarchy.item(), hierarchy.version());
    String onDemandImi =
        idGenerator.generateOnDemandImi(
            hierarchy.item(), hierarchy.version(), hierarchy.encoding(), hierarchy.location());

    ExtendedOnDemandProgramType onDemand =
        (ExtendedOnDemandProgramType) generator.generate(hierarchy, onDemandImi);

    assertEquals("http://nitro.bbc.co.uk/services/youview", onDemand.getServiceIDRef());
    assertEquals(versionCrid, onDemand.getProgram().getCrid());
    assertEquals(onDemandImi, onDemand.getInstanceMetadataId());

    InstanceDescriptionType instanceDesc = onDemand.getInstanceDescription();

    AVAttributesType avAttributes = instanceDesc.getAVAttributes();
    List<AudioAttributesType> audioAttributes = avAttributes.getAudioAttributes();
    AudioAttributesType audioAttribute = Iterables.getOnlyElement(audioAttributes);
    AudioLanguageType audioLanguage = audioAttribute.getAudioLanguage();

    assertEquals("urn:tva:metadata:cs:AudioPurposeCS:2007:1", audioLanguage.getPurpose());
    assertEquals(true, audioLanguage.isSupplemental());
    assertEquals("dubbed", audioLanguage.getType());
  }
 private ExtendedOnDemandProgramType onDemandFor(Item item) {
   ItemOnDemandHierarchy hierarchy = hierarchyFrom(item);
   String onDemandImi =
       idGenerator.generateOnDemandImi(
           hierarchy.item(), hierarchy.version(), hierarchy.encoding(), hierarchy.location());
   return (ExtendedOnDemandProgramType) generator.generate(hierarchy, onDemandImi);
 }