@Test public void testConvert() { Ninja ninja = new Ninja(); ninja.setId(100l); String actual = converter.convert(ninja); assertEquals("100", actual); ninja.setId(null); actual = converter.convert(ninja); assertNull(actual); }
public String convert(S source) { if(source.getId() == null) return null; return (String) source.getId().toString(); }
BaseEntityToStringConverter implements Converter<S, String> { public String convert(S source) { if(source.getId() == null) return null; return (String) source.getId().toString(); } }
BaseEntityToStringConverter implements Converter<S, String> { public String convert(S source) { if(source.getId() == null) return null; return (String) source.getId().toString(); }  }
BaseEntityToStringConverter implements Converter<S, String> { public String convert(S source) { if(source.getId() == null) return null; return (String) source.getId().toString(); }  String convert(S source); }
BaseEntityToStringConverter implements Converter<S, String> { public String convert(S source) { if(source.getId() == null) return null; return (String) source.getId().toString(); }  String convert(S source);  }