/** Tests domain population method. */ @Test public void testPopulateDomain() { final RuleElement mockRuleElement = context.mock(RuleElement.class); ActionDTO source = new ActionDTO(); source.setType(RuleElementType.CART_ANY_SKU_AMOUNT_DISCOUNT_ACTION.getPropertyKey()); source.setParameters(null); source.setExceptions(null); context.checking( new Expectations() { { oneOf(mockRuleElement) .setType( with( same( RuleElementType.CART_ANY_SKU_AMOUNT_DISCOUNT_ACTION.getPropertyKey()))); oneOf(mockRuleElement).setParameters(null); oneOf(mockRuleElement).setExceptions(null); } }); actionAdapter.populateDomain(source, mockRuleElement); }