EnumMarshaller implements DynamoDBMarshaller<Enum> { @Override public String marshall(Enum getterReturnResult) { if (getterReturnResult == null) { return null; } return getterReturnResult.toString(); }  @Override String marshall(Enum getterReturnResult); @Override Enum unmarshall(Class clazz, String obj);  }
@Test public void marshall() throws Exception { EnumMarshaller m = new EnumMarshaller(); Assert.assertEquals(TestEnum.EnumValue1.toString(), m.marshall(TestEnum.EnumValue1)); Assert.assertEquals(TestEnum.ENUMVALUE2.toString(), m.marshall(TestEnum.ENUMVALUE2)); }
@Test public void marshallNull() throws Exception { EnumMarshaller m = new EnumMarshaller(); Assert.assertNull(m.marshall(null)); }