### Question:
LabelApplier { public void applyLabel(final FeatureVisualizationStyle style, final boolean containsLabelAction, final FeatureVisualizationStyle defaultStyleCopy) { if (style != null && !containsLabelAction && defaultStyleCopy instanceof AbstractPathVisualizationStyle) { final AbstractPathVisualizationStyle toCopy = (AbstractPathVisualizationStyle)defaultStyleCopy; style.setParameter(AbstractFeatureVisualizationStyle.LABEL_ENABLED_PROPERTY_KEY, Boolean.valueOf(toCopy.isLabelEnabled()), this); style.setParameter(AbstractFeatureVisualizationStyle.LABEL_COLOR_PROPERTY_KEY, toCopy.getLabelColor(), this); style.setParameter(AbstractFeatureVisualizationStyle.LABEL_COLUMN_KEY_PROPERTY_KEY, toCopy.getLabelColumnPropertyName(), this); style.setParameter(AbstractFeatureVisualizationStyle.LABEL_SIZE_PROPERTY_KEY, Integer.valueOf(toCopy.getLabelSize()), this); } else if (style != null && !containsLabelAction && defaultStyleCopy instanceof AbstractFeatureVisualizationStyle) { final AbstractFeatureVisualizationStyle toCopy = (AbstractFeatureVisualizationStyle)defaultStyleCopy; style.setParameter(AbstractFeatureVisualizationStyle.LABEL_ENABLED_PROPERTY_KEY, Boolean.valueOf(toCopy.isLabelEnabled()), this); style.setParameter(AbstractFeatureVisualizationStyle.LABEL_COLOR_PROPERTY_KEY, toCopy.getLabelColor(), this); style.setParameter(AbstractFeatureVisualizationStyle.LABEL_COLUMN_KEY_PROPERTY_KEY, toCopy.getLabelColumnPropertyName(), this); style.setParameter(AbstractFeatureVisualizationStyle.LABEL_SIZE_PROPERTY_KEY, Integer.valueOf(toCopy.getLabelSize()), this); } }  void applyLabel(final FeatureVisualizationStyle style, final boolean containsLabelAction,
            final FeatureVisualizationStyle defaultStyleCopy);  }### Answer:
@Test public void testApplyLabelFeature() { EasyMockSupport support = new EasyMockSupport(); PointFeatureVisualizationStyle defaultStyle = createStyle(support); PointFeatureVisualizationStyle iconStyle = createStyleToSet(support); support.replayAll(); LabelApplier applier = new LabelApplier(); applier.applyLabel(iconStyle, false, defaultStyle); support.verifyAll(); }
@Test public void testApplyLabelFeatureLabelAction() { EasyMockSupport support = new EasyMockSupport(); PointFeatureVisualizationStyle defaultStyle = support.createMock(PointFeatureVisualizationStyle.class); PointFeatureVisualizationStyle iconStyle = support.createMock(PointFeatureVisualizationStyle.class); support.replayAll(); LabelApplier applier = new LabelApplier(); applier.applyLabel(iconStyle, true, defaultStyle); support.verifyAll(); }
@Test public void testApplyLabelFeatureNull() { EasyMockSupport support = new EasyMockSupport(); PointFeatureVisualizationStyle defaultStyle = support.createMock(PointFeatureVisualizationStyle.class); support.replayAll(); LabelApplier applier = new LabelApplier(); applier.applyLabel(null, false, defaultStyle); support.verifyAll(); }
@Test public void testApplyLabelPath() { EasyMockSupport support = new EasyMockSupport(); PolylineFeatureVisualizationStyle defaultStyle = createTrackStyle(support); PolylineFeatureVisualizationStyle iconStyle = createTrackStyleToSet(support); support.replayAll(); LabelApplier applier = new LabelApplier(); applier.applyLabel(iconStyle, false, defaultStyle); support.verifyAll(); }
@Test public void testApplyLabelPathLabelAction() { EasyMockSupport support = new EasyMockSupport(); PolylineFeatureVisualizationStyle defaultStyle = support.createMock(PolylineFeatureVisualizationStyle.class); PolylineFeatureVisualizationStyle iconStyle = support.createMock(PolylineFeatureVisualizationStyle.class); support.replayAll(); LabelApplier applier = new LabelApplier(); applier.applyLabel(iconStyle, true, defaultStyle); support.verifyAll(); }
@Test public void testApplyLabelPathNull() { EasyMockSupport support = new EasyMockSupport(); PolylineFeatureVisualizationStyle defaultStyle = support.createMock(PolylineFeatureVisualizationStyle.class); support.replayAll(); LabelApplier applier = new LabelApplier(); applier.applyLabel(null, false, defaultStyle); support.verifyAll(); }