### Question:
PsuDataUpdateAuthorisationChecker { public boolean canPsuUpdateAuthorisation(@NotNull PsuIdData psuIdDataRequest, @Nullable PsuIdData psuIdDataAuthorisation) { return isPsuPresent(psuIdDataAuthorisation) ? psuIdDataRequest.isEmpty() || psuIdDataAuthorisation.contentEquals(psuIdDataRequest) : psuIdDataRequest.isNotEmpty(); }  boolean canPsuUpdateAuthorisation(@NotNull PsuIdData psuIdDataRequest, @Nullable PsuIdData psuIdDataAuthorisation); boolean areBothPsusAbsent(@NotNull PsuIdData psuIdDataRequest, @Nullable PsuIdData psuIdDataAuthorisation);  }### Answer:
@Test void canPsuUpdateAuthorisationPsuAuthorisationNull() { boolean canPsuUpdateAuthorisation = psuDataUpdateAuthorisationChecker.canPsuUpdateAuthorisation(buildPSU(PSU_ID_1), null); assertTrue(canPsuUpdateAuthorisation); }
@Test void canPsuUpdateAuthorisationPsuAuthorisationEmpty() { boolean canPsuUpdateAuthorisation = psuDataUpdateAuthorisationChecker.canPsuUpdateAuthorisation(buildPSU(PSU_ID_1), buildPSU(null)); assertTrue(canPsuUpdateAuthorisation); }
@Test void canPsuUpdateAuthorisationPsuRequestEmpty() { boolean canPsuUpdateAuthorisation = psuDataUpdateAuthorisationChecker.canPsuUpdateAuthorisation(buildPSU(null), buildPSU(PSU_ID_1)); assertTrue(canPsuUpdateAuthorisation); }
@Test void canPsuUpdateAuthorisationPsuRequestEqualsPsuAuthorisation() { boolean canPsuUpdateAuthorisation = psuDataUpdateAuthorisationChecker.canPsuUpdateAuthorisation(buildPSU(PSU_ID_1), buildPSU(PSU_ID_1)); assertTrue(canPsuUpdateAuthorisation); }
@Test void canPsuUpdateAuthorisationPsuRequestNotEqualsPsuAuthorisation() { boolean canPsuUpdateAuthorisation = psuDataUpdateAuthorisationChecker.canPsuUpdateAuthorisation(buildPSU(PSU_ID_1), buildPSU(PSU_ID_2)); assertFalse(canPsuUpdateAuthorisation); }
@Test void canPsuUpdateAuthorisationNoPsuRequestNoPsuAuthorisation() { boolean canPsuUpdateAuthorisation = psuDataUpdateAuthorisationChecker.canPsuUpdateAuthorisation(buildPSU(null), buildPSU(null)); assertFalse(canPsuUpdateAuthorisation); }
@Test void canPsuUpdateAuthorisationNoPsuRequestPsuAuthorisationNull() { boolean canPsuUpdateAuthorisation = psuDataUpdateAuthorisationChecker.canPsuUpdateAuthorisation(buildPSU(null), null); assertFalse(canPsuUpdateAuthorisation); }