@Test public void testEncode() { Object[][] testCases = { {new StringHolder("ABC"), "ABC"}, {new StringHolder(""), ""}, {new StringHolder(null), null} }; for (Object[] testCase : testCases) { StringHolder holder = (StringHolder) testCase[0]; String expectedResult = (String) testCase[1]; String result = type.encode(holder); assertEquals(expectedResult, result); } }
@Override public String encode(StringHolder holder) { return holder.getValue(); }
StringType implements Type<StringHolder> { @Override public String encode(StringHolder holder) { return holder.getValue(); } }
StringType implements Type<StringHolder> { @Override public String encode(StringHolder holder) { return holder.getValue(); }  }
StringType implements Type<StringHolder> { @Override public String encode(StringHolder holder) { return holder.getValue(); }  @Override String encode(StringHolder holder); @Override StringHolder decode(String text); @Override StringHolder convert(Object obj); @Override StringHolder[] newArray(int size); }
StringType implements Type<StringHolder> { @Override public String encode(StringHolder holder) { return holder.getValue(); }  @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; }