@Test
public void testParseStyles_OnlyOneWithLegendStyle()
                        throws Exception {

    StyleStore store = mockStyleStoreWithThreeStyles_DifferentDefaultAndSimple();
    Workspace workspace = mockWorkspace( store );
    List<StyleRefType> styles = singletonList( readStyleRef( "styleRefs_OnlyOneWithLegendStyle.xml" ) );
    Pair<Map<String, Style>, Map<String, Style>> selectedStyles = parseStyles( workspace, "layer", styles );
    Map<String, Style> styleMap = selectedStyles.getFirst();
    Map<String, Style> legendStyleMap = selectedStyles.getSecond();
    assertThat( styleMap.size(), is( 3 ) );
    assertThat( legendStyleMap.size(), is( 2 ) );
    Style defaultLegendStyle = legendStyleMap.get( "default" );
    assertThat( defaultLegendStyle.getName(), is( "legendStyle" ) );
    assertThat( defaultLegendStyle.getLegendURL(), nullValue() );
}