// =====================================================================
// Create Mocks
// =====================================================================
StatefulPseudoClass hover = StatefulPseudoClasses.HOVER;
// =====================================================================
// Set Expectations
// =====================================================================
pseudoEntityProviderMock.expects.getStatefulPseudoClass("hover").returns(hover);
factoryMock.expects.createUniversalMatcher().returns(universalMock);
// Set the expectations on the specificity calculator.
specificityCalculatorMock.expects.addPseudoClassSelector();
// =====================================================================
// Test Expectations
// =====================================================================
PseudoClassSelector themeSelector =
themeModelFactory.createPseudoClassSelector("hover");
SelectorSequence sequence = createSelectorSequence(themeSelector);
MatcherBuilder builder = createMatcherBuilder();
Matcher matcher = builder.getMatcher(sequence);
assertSame("Constructed matcher not as expected",
universalMock, matcher);
List entities = builder.getPseudoStyleEntities();
assertEquals("List should contain one item", 1, entities.size());
StatefulPseudoClassSet actual = (StatefulPseudoClassSet) entities.get(0);
assertEquals("Pseudo class set not as expected", hover.getSet(), actual);
}