1 package com.fasterxml.jackson.databind.introspect; 2 3 import com.fasterxml.jackson.annotation.JsonClassDescription; 4 import com.fasterxml.jackson.databind.*; 5 6 public class BeanDescriptionTest extends BaseMapTest 7 { 8 private final ObjectMapper MAPPER = objectMapper(); 9 10 private final static String CLASS_DESC = "Description, yay!"; 11 12 @JsonClassDescription(CLASS_DESC) 13 static class DocumentedBean { 14 public int x; 15 } 16 testClassDesc()17 public void testClassDesc() throws Exception 18 { 19 BeanDescription beanDesc = MAPPER.getDeserializationConfig().introspect(MAPPER.constructType(DocumentedBean.class)); 20 assertEquals(CLASS_DESC, beanDesc.findClassDescription()); 21 } 22 } 23