ReportBuilderUtils { public static String emptyWhenNull(String value) { return value != null ? value : valueNotPresent(); }  static String emptyWhenNull(String value); static String valueNotPresent(); static String valueNotKnown(); static SimpleDateFormat getDateFormatterWithGMTZone(); static Policy createReportPolicy(ValidationPolicy validationPolicy); static ValidatedDocument createValidatedDocument(boolean reportSignatureEnabled, String filename, byte[] document); static void processSignatureIndications(ValidationConclusion validationConclusion, String policyName); static String getValidationTime(); static final String FORMAT_NOT_FOUND; }
@Test public void givenNullValueWillReturnEmptyString() throws Exception { assertThat(ReportBuilderUtils.emptyWhenNull(null)).isEqualTo(""); }
@Test public void givenNotEmptyStringWillReturnItUnchanged() throws Exception { assertThat(ReportBuilderUtils.emptyWhenNull("random")).isEqualTo("random"); }