@@ -0,0 +1,2114 @@
+/**%0A * Copyright 2005-2014 Dozer Project%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *      http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0Apackage org.dozer.functional_tests;%0A%0Aimport org.junit.Test;%0A%0Aimport static org.hamcrest.CoreMatchers.is;%0Aimport static org.junit.Assert.assertThat;%0A%0Apublic class DynamicMethod extends AbstractFunctionalTest %7B%0A%0A    /**%0A     * @see %3Ca href=%22https://github.com/DozerMapper/dozer/issues/153%22%3E%0A     *     Caused by: java.lang.IllegalAccessException - with modifiers %22public%22 #153%0A     *     %3C/a%3E%0A     */%0A    @Test%0A    public void testCanMapAnonymousClass() %7B%0A        // Arrange: Create an anonymous class, overriding the default getter%0A        final String expectedName = %22Helbert Rios%22;%0A%0A        Person anonymousPerson = new Person() %7B%0A            public String getName() %7B%0A                return expectedName;%0A            %7D%0A        %7D;%0A%0A        anonymousPerson.setId(1);%0A%0A        // Act: Map the anonymous class to the base class%0A        Person mappedPerson = mapper.map(anonymousPerson, Person.class);%0A%0A        // Assert: Mapping should work instead of mapper.map throwing an exception%0A        //         (see issue #153)%0A        assertThat(mappedPerson.id, is(1));%0A        assertThat(mappedPerson.name, is(expectedName));%0A    %7D%0A%0A    public static class Person %7B%0A        private int id;%0A        private String name;%0A%0A        public int getId() %7B%0A            return id;%0A        %7D%0A%0A        public void setId(int id) %7B%0A            this.id = id;%0A        %7D%0A%0A        public String getName() %7B%0A            return name;%0A        %7D%0A%0A        public void setName(String name) %7B%0A            this.name = name;%0A        %7D%0A    %7D%0A%7D

Test for issue #153 (Caused by: java.lang.IllegalAccessException - with modifiers "public" #153), confirms that the fix in pull request #174 works