@Before
  public void setUp() throws Exception {
    final CatalogManager catalogManager = CatalogManager.getInstance();

    final Catalog catalog = catalogManager.createCatalog("PartOfTest");
    srcCatalogVersion = catalogManager.createCatalogVersion(catalog, "ver1", null);
    srcCatalogVersion.setLanguages(Collections.singletonList(getOrCreateLanguage("de")));
    tgtCatalogVersion = catalogManager.createCatalogVersion(catalog, "ver2", null);
    tgtCatalogVersion.setLanguages(Collections.singletonList(getOrCreateLanguage("de")));

    LOG.info("Creating  product");
    final ComposedType composedType = TypeManager.getInstance().getComposedType(Product.class);

    final Product productOne = createProduct("Product-One", composedType);
    final Product productTwo = createProduct("Product-Two", composedType);

    LOG.info("Creating  product reference ");

    catalogManager.createProductReference("foo", productOne, productTwo, Integer.valueOf(1));

    LOG.info("Done catalog creation.");

    final Europe1PriceFactory europe1 = Europe1PriceFactory.getInstance();
    final Currency currency = C2LManager.getInstance().createCurrency("europe1/dr");
    final Unit unit = ProductManager.getInstance().createUnit(null, "europe1/u", "typ");
    final EnumerationValue enumValue =
        EnumerationManager.getInstance()
            .createEnumerationValue(Europe1Constants.TYPES.DISCOUNT_USER_GROUP, "test");

    priceRowSpy =
        Mockito.spy(
            europe1.createPriceRow(
                productTwo, null, null, enumValue, 0, currency, unit, 1, true, null, 0));
  }
  @Test
  public void testFindEnumerationTypeForCode() {
    final EnumerationType enumType1 = mock(EnumerationType.class);
    final EnumerationMetaTypeModel enumModel1 = mock(EnumerationMetaTypeModel.class);

    when(enumerationManager.getEnumerationType("one")).thenReturn(enumType1);
    when(modelService.get(enumType1)).thenReturn(enumModel1);

    final EnumerationMetaTypeModel actualModel = typeService.getEnumerationTypeForCode("one");
    Assert.assertEquals("Got unexpected enumeration type model", enumModel1, actualModel);
  }
 @Override
 public ActionResult perform(final ActionEvent event) throws JaloBusinessException {
   final Item item = getItem(event);
   if (item instanceof Consignment) {
     ((Consignment) item)
         .setStatus(
             EnumerationManager.getInstance()
                 .getEnumerationValue(
                     ConsignmentStatus._TYPECODE, ConsignmentStatus.PICKUP_COMPLETE.getCode()));
     for (final ConsignmentProcess process : ((Consignment) item).getConsignmentProcesses()) {
       getBusinessProcessService().triggerEvent(process.getCode() + "_ConsignmentPickup");
     }
     return new ActionResult(ActionResult.OK, true, false);
   }
   return new ActionResult(ActionResult.FAILED, false, false);
 }