@Test void convertToDatabaseColumn() { assertThat(durationConverter.convertToDatabaseColumn(threeDaysDuration)).isEqualTo(threeDaysInHoursString); assertThat(durationConverter.convertToDatabaseColumn(threeHoursDuration)).isEqualTo(threeHoursString); assertThat(durationConverter.convertToDatabaseColumn(threeMinutesDuration)).isEqualTo(threeMinutesString); assertThat(durationConverter.convertToDatabaseColumn(threeSecondsDuration)).isEqualTo(threeSecondsString); assertThat(durationConverter.convertToDatabaseColumn(null)).isNull(); }
@Override public String convertToDatabaseColumn(Duration duration) { if (duration != null) { return duration.toString(); } else { return null; } }
DurationConverter implements AttributeConverter<Duration, String> { @Override public String convertToDatabaseColumn(Duration duration) { if (duration != null) { return duration.toString(); } else { return null; } } }
DurationConverter implements AttributeConverter<Duration, String> { @Override public String convertToDatabaseColumn(Duration duration) { if (duration != null) { return duration.toString(); } else { return null; } }  }
DurationConverter implements AttributeConverter<Duration, String> { @Override public String convertToDatabaseColumn(Duration duration) { if (duration != null) { return duration.toString(); } else { return null; } }  @Override String convertToDatabaseColumn(Duration duration); @Override Duration convertToEntityAttribute(String durationString); }
DurationConverter implements AttributeConverter<Duration, String> { @Override public String convertToDatabaseColumn(Duration duration) { if (duration != null) { return duration.toString(); } else { return null; } }  @Override String convertToDatabaseColumn(Duration duration); @Override Duration convertToEntityAttribute(String durationString);  }