elementDetails.setStyles(StylesBuilder.getCompleteStyles(
"mcs-menu-link-style: numeric-shortcut"));
// Create a test menu
ConcreteMenu testMenu = new ConcreteMenu(elementDetails);
// Test renderer returned
MenuRenderer renderer = selector.selectMenuRenderer(testMenu);
// Check the renderer exists. JavaDoc on MenuRendererSelector
// says it may not be null.
assertNotNull("Should be a renderer here (1)", renderer);
// Check appropriate renderer returned
assertTrue("Wrong renderer returned (1)",
renderer instanceof OpenwaveMenuRenderer);
// Set styles to force WML
elementDetails = new ConcreteElementDetails();
elementDetails.setStyles(StylesBuilder.getCompleteStyles(
"mcs-menu-link-style: default"));
// Create a test menu
testMenu = new ConcreteMenu(elementDetails);
// Test renderer returned
renderer = selector.selectMenuRenderer(testMenu);
// Check the renderer exists. JavaDoc on MenuRendererSelector