LicenseNameWithTextUtils { public static boolean isEmpty(LicenseNameWithText licenseNameWithText) { return isNullOrEmpty(nullToEmpty(licenseNameWithText.getLicenseName()).trim()) && isNullOrEmpty(nullToEmpty(licenseNameWithText.getLicenseText()).trim()) && isNullOrEmpty(nullToEmpty(licenseNameWithText.getAcknowledgements()).trim()); }  static LicenseNameWithText sanitize(LicenseNameWithText licenseNameWithText); static boolean isEmpty(LicenseNameWithText licenseNameWithText); static boolean licenseNameWithTextEquals(LicenseNameWithText lnwt1, LicenseNameWithText lnwt2);  }
@Test public void testIsEmpty() { Assert.assertTrue(LicenseNameWithTextUtils.isEmpty(createLicense(null, null, null))); Assert.assertTrue(LicenseNameWithTextUtils.isEmpty(createLicense("", null, null))); Assert.assertTrue(LicenseNameWithTextUtils.isEmpty(createLicense(null, "", null))); Assert.assertTrue(LicenseNameWithTextUtils.isEmpty(createLicense(null, null, ""))); Assert.assertTrue(LicenseNameWithTextUtils.isEmpty(createLicense("", "", ""))); Assert.assertTrue(LicenseNameWithTextUtils.isEmpty(createLicense(" ", "\n", "\t"))); Assert.assertFalse(LicenseNameWithTextUtils.isEmpty(createLicense("name", null, null))); Assert.assertFalse(LicenseNameWithTextUtils.isEmpty(createLicense(null, "text", null))); Assert.assertFalse(LicenseNameWithTextUtils.isEmpty(createLicense(null, null, "acks"))); }