### Question:
SpanUtils { public static String resolveMessageType(Message<?> message) { Class<?> clazz = Message.class; if (message instanceof QueryMessage) { clazz = QueryMessage.class; } else if (message instanceof CommandMessage) { clazz = CommandMessage.class; } else if (message instanceof EventMessage) { clazz = EventMessage.class; } return clazz.getSimpleName(); }  static Tracer.SpanBuilder withMessageTags(Tracer.SpanBuilder spanBuilder, Message<?> message); static Tracer.SpanBuilder withQueryMessageTags(Tracer.SpanBuilder spanBuilder,
                                                          Message<?> queryMessage,
                                                          String queryName); static String resolveMessageType(Message<?> message); static String messageName(Message<?> message);  }### Answer:
@Test void testResolveMessageType() { assertEquals("Message", SpanUtils.resolveMessageType(TEST_MESSAGE)); assertEquals("CommandMessage", SpanUtils.resolveMessageType(TEST_COMMAND)); assertEquals("QueryMessage", SpanUtils.resolveMessageType(TEST_QUERY)); assertEquals("EventMessage", SpanUtils.resolveMessageType(TEST_EVENT)); assertEquals("EventMessage", SpanUtils.resolveMessageType(TEST_DOMAIN_EVENT)); }