@Test public void parseReturnsTheFromYearAsAStringFromAValidDatable() { String validDatableString = "\"2015-05-01\""; String result = instance.parse(validDatableString); assertThat(result, is("2015")); }
@Override public String parse(String value) { if (value == null) { return null; } Datable datable = deserializeDatable(value); return datable.isValid() ? String.valueOf(datable.getFromYear()) : null; }
DatableFromYearPropertyParser implements PropertyParser { @Override public String parse(String value) { if (value == null) { return null; } Datable datable = deserializeDatable(value); return datable.isValid() ? String.valueOf(datable.getFromYear()) : null; } }
DatableFromYearPropertyParser implements PropertyParser { @Override public String parse(String value) { if (value == null) { return null; } Datable datable = deserializeDatable(value); return datable.isValid() ? String.valueOf(datable.getFromYear()) : null; }  }
DatableFromYearPropertyParser implements PropertyParser { @Override public String parse(String value) { if (value == null) { return null; } Datable datable = deserializeDatable(value); return datable.isValid() ? String.valueOf(datable.getFromYear()) : null; }  @Override String parse(String value); @Override Comparable<?> parseForSort(String value); }
DatableFromYearPropertyParser implements PropertyParser { @Override public String parse(String value) { if (value == null) { return null; } Datable datable = deserializeDatable(value); return datable.isValid() ? String.valueOf(datable.getFromYear()) : null; }  @Override String parse(String value); @Override Comparable<?> parseForSort(String value);  }