@@ -0,0 +1,2141 @@
+/*%0A * The MIT License%0A *%0A * Copyright (c) 2015 Misakura.%0A *%0A * Permission is hereby granted, free of charge, to any person obtaining a copy%0A * of this software and associated documentation files (the %22Software%22), to deal%0A * in the Software without restriction, including without limitation the rights%0A * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell%0A * copies of the Software, and to permit persons to whom the Software is%0A * furnished to do so, subject to the following conditions:%0A *%0A * The above copyright notice and this permission notice shall be included in%0A * all copies or substantial portions of the Software.%0A *%0A * THE SOFTWARE IS PROVIDED %22AS IS%22, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR%0A * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,%0A * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE%0A * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER%0A * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,%0A * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN%0A * THE SOFTWARE.%0A */%0A%0Apackage jp.gr.java_conf.kgd.example.blog.reflectionutil;%0A%0Aimport org.junit.Test;%0A%0Aimport java.util.Arrays;%0Aimport java.util.List;%0A%0Aimport static org.hamcrest.MatcherAssert.assertThat;%0Aimport static org.hamcrest.Matchers.*;%0A%0Apublic class EnumUtilTest %7B%0A%0A    enum Foo %7B%0A        A, B, C%0A    %7D%0A%0A    @Test%0A    public void invokeValuesTest() %7B%0A        %7B%0A            Foo%5B%5D actual = EnumUtil.invokeValues(Foo.class);%0A            assertThat(Arrays.asList(actual), is(contains(Foo.A, Foo.B, Foo.C)));%0A        %7D%0A%0A        %7B%0A            // %E5%9E%8B%E6%8E%A8%E8%AB%96%E7%89%88%0A            Foo%5B%5D actual = EnumUtil.invokeValues();%0A            assertThat(Arrays.asList(actual), is(contains(Foo.A, Foo.B, Foo.C)));%0A        %7D%0A    %7D%0A%0A    @Test%0A    public void enumValueCacheTest() %7B%0A        EnumUtil.EnumValuesCache sut = new EnumUtil.EnumValuesCache();%0A        List%3CFoo%3E a = sut.getValues(Foo.class);%0A        List%3CFoo%3E b = sut.getValues(Foo.class);%0A%0A        // %E3%82%AD%E3%83%A3%E3%83%83%E3%82%B7%E3%83%A5%E3%81%97%E3%81%A6%E3%82%8B%E3%81%AE%E3%81%A7%E5%90%8C%E4%B8%80%E3%82%A4%E3%83%B3%E3%82%B9%E3%82%BF%E3%83%B3%E3%82%B9%E3%81%8C%E8%BF%94%E3%82%8B%E3%81%AF%E3%81%9A%0A        assertThat(a, sameInstance(b));%0A    %7D%0A%7D%0A%0A%0A%0A%0A%0A%0A%0A%0A%0A%0A%0A%0A%0A%0A%0A%0A%0A%0A%0A%0A%0A

add EnumUtilのテストを追加。