+ " --productName " + productName + " --productStructure "
+ structure + " --productTypeName " + productTypeName
+ " --metadataFile " + metadataFile + " --refs " + ref
+ " --clientTransfer --dataTransfer " + dataTransferer)
.split(" "));
MethodCallDetails methodCallDetails = client.getLastMethodCallDetails();
assertEquals("ingestProduct", methodCallDetails.getMethodName());
assertEquals(productName,
((Product) methodCallDetails.getArgs().get(0)).getProductName());
assertEquals(structure,
((Product) methodCallDetails.getArgs().get(0))
.getProductStructure());
assertEquals(productTypeName,
((Product) methodCallDetails.getArgs().get(0)).getProductType()
.getName());
assertTrue(((Product) methodCallDetails.getArgs().get(0))
.getProductReferences().get(0).getOrigReference().endsWith(ref));
assertEquals("test.txt",
((Metadata) methodCallDetails.getArgs().get(1))
.getMetadata("Filename"));
assertEquals("GenericFile", ((Metadata) methodCallDetails.getArgs()
.get(1)).getMetadata("ProductType"));
assertEquals(true, methodCallDetails.getArgs().get(2));
}