assertEquals(FILENAME_MET_VAL, clientSetMetadata.getMetadata(FILENAME_MET_KEY));
assertEquals(NOMINAL_DATE_MET_VAL, clientSetMetadata.getMetadata(NOMINAL_DATE_MET_KEY));
}
public void testClientTransTrueAndHierProduct() throws CmdLineActionException, IOException {
ActionMessagePrinter printer = new ActionMessagePrinter();
MockIngestProductCliAction cliAction = new MockIngestProductCliAction();
cliAction.setProductName(PRODUCT_NAME);
cliAction.setProductStructure(Product.STRUCTURE_HIERARCHICAL);
cliAction.setProductTypeName(PRODUCT_TYPE_NAME);
cliAction.setMetadataFile(metadataFile.getAbsolutePath());
cliAction.setDataTransferer(DATA_TRANSFERER_FACTORY);
cliAction.setReferences(Lists.newArrayList(hierRefFile.getAbsolutePath()));
cliAction.execute(printer);
assertEquals(2, printer.getPrintedMessages().size());
assertEquals("ingestProduct: Result: " + PRODUCT_ID, printer.getPrintedMessages().get(0));
assertEquals("\n", printer.getPrintedMessages().get(1));
assertEquals(PRODUCT_NAME, clientSetProduct.getProductName());
assertEquals(Product.STRUCTURE_HIERARCHICAL, clientSetProduct.getProductStructure());
assertEquals(PRODUCT_TYPE_NAME, clientSetProduct.getProductType().getName());
assertEquals(3, clientSetProduct.getProductReferences().size());
Collections.sort(clientSetProduct.getProductReferences(), new Comparator<Reference>() {