PropertyValues inputValues = helper.parseDeclarations(css);
optimizer.optimize(TargetEntity.ELEMENT, inputValues, outputValues,
deviceValuesMock);
ShorthandValue shorthandValue =
outputValues.getShorthandValue(StyleShorthands.MARGIN);
assertNotNull("Shorthand value should be set", shorthandValue);
Priority priority = shorthandValue.getPriority();
assertEquals("Priority mismatch", expectedPriority, priority);
assertEquals("Count mismatch", expectedValues.length,
shorthandValue.getCount());
for (int i = 0; i < expectedValues.length; i++) {
StyleValue expectedValue = expectedValues[i];
StyleValue value = shorthandValue.getValue(i);
assertEquals("Value " + i + " mismatch", expectedValue, value);
}
// todo check that the other properties are cleared.
}