### Question:
DMNSVGShapeDefImpl implements DMNSVGShapeDef<DMNViewDefinition, DMNSVGViewFactory> { @Override public Glyph getGlyph(final Class<? extends DMNViewDefinition> type, final String defId) { return GLYPHS_TOOLBOX.computeIfAbsent(type, (t) -> ShapeGlyph.create()); }  @Override Class<DMNSVGViewFactory> getViewFactoryType(); @Override SVGShapeView<?> newViewInstance(final DMNSVGViewFactory factory,
                                           final DMNViewDefinition bean); @Override Glyph getGlyph(final Class<? extends DMNViewDefinition> type,
                          final String defId); @Override Glyph getGlyph(final Class<? extends DMNViewDefinition> type,
                          final Class<? extends ShapeFactory.GlyphConsumer> consumer,
                          final String defId); static final SVGShapeViewResources<DMNDefinition, DMNSVGViewFactory> VIEW_RESOURCES; static final Map<Class<? extends DMNDefinition>, Glyph> GLYPHS_TOOLBOX; static final Map<Class<? extends DMNDefinition>, Glyph> GLYPHS_PALETTE; }### Answer:
@Test public void testGetToolboxGlyph() { assertEquals(DMNSVGGlyphFactory.BUSINESS_KNOWLEDGE_MODEL_TOOLBOX, shapeDef.getGlyph(BusinessKnowledgeModel.class, DEFINITION_ID)); assertEquals(DMNSVGGlyphFactory.DECISION_TOOLBOX, shapeDef.getGlyph(Decision.class, DEFINITION_ID)); assertEquals(DMNSVGGlyphFactory.INPUT_DATA_TOOLBOX, shapeDef.getGlyph(InputData.class, DEFINITION_ID)); assertEquals(DMNSVGGlyphFactory.KNOWLEDGE_SOURCE_TOOLBOX, shapeDef.getGlyph(KnowledgeSource.class, DEFINITION_ID)); assertEquals(DMNSVGGlyphFactory.TEXT_ANNOTATION_TOOLBOX, shapeDef.getGlyph(TextAnnotation.class, DEFINITION_ID)); assertTrue(shapeDef.getGlyph(DMNViewDefinition.class, DEFINITION_ID) instanceof ShapeGlyph); }
@Test public void testGetPaletteGlyphWithConsumer() { assertEquals(DMNSVGGlyphFactory.BUSINESS_KNOWLEDGE_MODEL_PALETTE, shapeDef.getGlyph(BusinessKnowledgeModel.class, PaletteGlyphConsumer.class, DEFINITION_ID)); assertEquals(DMNSVGGlyphFactory.DECISION_PALETTE, shapeDef.getGlyph(Decision.class, PaletteGlyphConsumer.class, DEFINITION_ID)); assertEquals(DMNSVGGlyphFactory.DECISION_SERVICE_PALETTE, shapeDef.getGlyph(DecisionService.class, PaletteGlyphConsumer.class, DEFINITION_ID)); assertEquals(DMNSVGGlyphFactory.INPUT_DATA_PALETTE, shapeDef.getGlyph(InputData.class, PaletteGlyphConsumer.class, DEFINITION_ID)); assertEquals(DMNSVGGlyphFactory.KNOWLEDGE_SOURCE_PALETTE, shapeDef.getGlyph(KnowledgeSource.class, PaletteGlyphConsumer.class, DEFINITION_ID)); assertEquals(DMNSVGGlyphFactory.TEXT_ANNOTATION_PALETTE, shapeDef.getGlyph(TextAnnotation.class, PaletteGlyphConsumer.class, DEFINITION_ID)); assertEquals(true, shapeDef.getGlyph(DMNViewDefinition.class, PaletteGlyphConsumer.class, DEFINITION_ID) instanceof ShapeGlyph); }