@@ -0,0 +1,2243 @@
+package org.ccci.gto.android.common.util;%0A%0Aimport android.os.Bundle;%0A%0Aimport org.junit.Test;%0A%0Aimport static org.ccci.gto.android.common.util.BundleUtils.getEnum;%0Aimport static org.ccci.gto.android.common.util.BundleUtils.putEnum;%0Aimport static org.ccci.gto.android.common.util.BundleUtilsTest.TestEnum.DEFVALUE;%0Aimport static org.ccci.gto.android.common.util.BundleUtilsTest.TestEnum.VALUE1;%0Aimport static org.ccci.gto.android.common.util.BundleUtilsTest.TestEnum.VALUE2;%0Aimport static org.hamcrest.CoreMatchers.is;%0Aimport static org.hamcrest.CoreMatchers.nullValue;%0Aimport static org.junit.Assert.assertThat;%0A%0Apublic final class BundleUtilsTest %7B%0A    private static final String KEY1 = %22key1%22;%0A    private static final String KEY2 = %22key2%22;%0A    private static final String KEY3 = %22key3%22;%0A%0A    enum TestEnum %7B%0A        VALUE1,%0A        VALUE2,%0A        DEFVALUE%0A    %7D%0A%0A    @Test%0A    public void verifyPutEnum() throws Exception %7B%0A        final Bundle bundle = new Bundle();%0A        putEnum(bundle, KEY1, VALUE1);%0A        putEnum(bundle, KEY2, VALUE2);%0A        putEnum(bundle, KEY3, null);%0A%0A        assertThat(bundle.size(), is(3));%0A        assertThat(bundle.getString(KEY1), is(VALUE1.name()));%0A        assertThat(bundle.getString(KEY2), is(VALUE2.name()));%0A        assertThat(bundle.getString(KEY3), is(nullValue()));%0A    %7D%0A%0A    @Test%0A    public void verifyGetEnum() throws Exception %7B%0A        final Bundle bundle = new Bundle();%0A        putEnum(bundle, KEY1, VALUE1);%0A        putEnum(bundle, KEY2, VALUE2);%0A        bundle.putString(KEY3, VALUE1.name() + %22-3%22);%0A%0A        assertThat(getEnum(bundle, TestEnum.class, KEY1), is(VALUE1));%0A        assertThat(getEnum(bundle, TestEnum.class, KEY2), is(VALUE2));%0A        assertThat(getEnum(bundle, TestEnum.class, KEY3), nullValue());%0A    %7D%0A%0A    @Test%0A    public void verifyGetEnumDefault() throws Exception %7B%0A        final Bundle bundle = new Bundle();%0A        putEnum(bundle, KEY1, VALUE1);%0A        bundle.putString(KEY2, VALUE2.name() + %22-3%22);%0A%0A        assertThat(getEnum(bundle, TestEnum.class, KEY1, DEFVALUE), is(VALUE1));%0A        assertThat(getEnum(bundle, TestEnum.class, KEY2, DEFVALUE), is(DEFVALUE));%0A        assertThat(getEnum(bundle, TestEnum.class, KEY3, DEFVALUE), is(DEFVALUE));%0A    %7D%0A%7D%0A

add tests for enum BundleUtils