StringType implements Type<StringHolder> { @Override public StringHolder decode(String text) { return new StringHolder(text); }  @Override String encode(StringHolder holder); @Override StringHolder decode(String text); @Override StringHolder convert(Object obj); @Override StringHolder[] newArray(int size); static final String TYPE_NAME; }
@Test public void testDecode() { Object[][] testCases = { {"abc", new StringHolder("abc")}, {"", new StringHolder("")}, {null, new StringHolder(null)} }; for (Object[] testCase : testCases) { String text = (String) testCase[0]; StringHolder expectedHolder = (StringHolder) testCase[1]; StringHolder holder = type.decode(text); assertEquals(expectedHolder.getValue(), holder.getValue()); } }