package com.fasterxml.jackson.databind.introspect;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;

import com.fasterxml.jackson.annotation.*;
import com.fasterxml.jackson.databind.ObjectMapper;

/* Tests mostly for [JACKSON-754]: ability to create "annotation bundles"
 */
public class TestAnnotionBundles extends com.fasterxml.jackson.databind.BaseMapTest
{
    @Retention(RetentionPolicy.RUNTIME)
    @JacksonAnnotationsInside
    @JsonIgnore
    private @interface MyIgnoral { }

    @Retention(RetentionPolicy.RUNTIME)
    @JacksonAnnotationsInside
    @JsonProperty("foobar")
    private @interface MyRename { }

    protected final static class Bean {
        @MyIgnoral
        public String getIgnored() { return "foo"; }
 
        @MyRename
        public int renamed = 13;
    }
    
    /*
    /**********************************************************
    /* Test methods
    /**********************************************************
     */

    private final ObjectMapper mapper = new ObjectMapper();
    
    public void testBundledIgnore() throws Exception
    {
        assertEquals("{\"foobar\":13}", mapper.writeValueAsString(new Bean()));
    }
}

@@ -173,16 +173,83 @@
 tion.*;%0A
+import com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility;%0A
 import c
@@ -292,16 +292,16 @@
 Mapper;%0A
-
 %0A/* Test
@@ -886,16 +886,431 @@
 3;%0A    %7D
+%0A%0A    @Retention(RetentionPolicy.RUNTIME)%0A    @JsonAutoDetect(fieldVisibility=Visibility.NONE,%0A            getterVisibility=Visibility.NONE, isGetterVisibility=Visibility.NONE)%0A    @JacksonAnnotationsInside%0A    public @interface JsonAutoDetectOff %7B%7D%0A%0A    @JsonAutoDetectOff%0A    public class NoAutoDetect %7B%0A      public int getA() %7B return 13; %7D%0A      %0A      @JsonProperty%0A      public int getB() %7B return 5; %7D%0A    %7D
 %0A    %0A  
@@ -1502,22 +1502,22 @@
 tMapper 
-mapper
+MAPPER
  = new O
@@ -1639,14 +1639,157 @@
 %7D%22, 
-mapper
+MAPPER.writeValueAsString(new Bean()));%0A    %7D%0A%0A    public void testVisibilityBundle() throws Exception%0A    %7B%0A        assertEquals(%22%7B%5C%22b%5C%22:5%7D%22, MAPPER
 .wri
@@ -1800,34 +1800,42 @@
 lueAsString(new 
-Bean
+NoAutoDetect
 ()));%0A    %7D%0A%7D%0A
@@ -1832,10 +1832,15 @@
 ;%0A    %7D%0A
+    %0A
 %7D%0A

Add a unit test...