String css,
StyleValue[] expectedValues,
Priority expectedPriority,
final DeviceValuesMock deviceValuesMock) {
MutableStyleProperties outputValues =
ThemeFactory.getDefaultInstance().createMutableStyleProperties();
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);