@Test
public void checkCopyThreddsMetadataBuilderVariables()
{
ThreddsBuilderFactory fac = new ThreddsBuilderFactoryImpl();
ThreddsMetadataBuilder srcTmBldr = fac.newThreddsMetadataBuilder();
ThreddsMetadataBuilder.VariableGroupBuilder srcVarGrpBldr = srcTmBldr.addVariableGroupBuilder();
String vocabAuthId = "vocabAuthId";
srcVarGrpBldr.setVocabularyAuthorityId( vocabAuthId );
String name = "name";
srcVarGrpBldr.addVariableBuilder( name, "descrip", "units", "vocabId", "vocabName" );
ThreddsMetadataBuilder recipientTmBldr = fac.newThreddsMetadataBuilder();
assertNotNull( recipientTmBldr);
assertTrue( recipientTmBldr.getVariableGroupBuilders().isEmpty());
ThreddsMetadataBuilderUtils.copyThreddsMetadataBuilder( srcTmBldr, recipientTmBldr );
List<ThreddsMetadataBuilder.VariableGroupBuilder> recipientVarGrpBldrs = recipientTmBldr.getVariableGroupBuilders();
assertFalse( recipientVarGrpBldrs.isEmpty() );
assertEquals( 1, recipientVarGrpBldrs.size());
ThreddsMetadataBuilder.VariableGroupBuilder recipientVarGrpBldr = recipientVarGrpBldrs.get( 0);
assertEquals( vocabAuthId, recipientVarGrpBldr.getVocabularyAuthorityId());