### Question:
TppInfoCheckerService { boolean differsFromTppInRequest(@Nullable TppInfo tppInfo) { if (tppInfo == null || tppInfo.isNotValid()) { return true; } TppInfo tppInRequest = tppService.getTppInfo(); return !tppInfo.equals(tppInRequest); }    }### Answer:
@Test void differsFromTppInRequest_withDifferentTppInRequest_shouldReturnTrue() { TppInfo tppInfoInRequest = buildTppInfo(AUTHORISATION_NUMBER); when(tppService.getTppInfo()).thenReturn(tppInfoInRequest); TppInfo tppInfo = buildTppInfo(DIFFERENT_AUTHORISATION_NUMBER); boolean result = tppInfoCheckerService.differsFromTppInRequest(tppInfo); assertTrue(result); }
@Test void differsFromTppInRequest_withNullValuesInRequest_shouldReturnTrue() { TppInfo tppInfoInRequest = buildTppInfo(null); when(tppService.getTppInfo()).thenReturn(tppInfoInRequest); TppInfo tppInfo = buildTppInfo(DIFFERENT_AUTHORISATION_NUMBER); boolean result = tppInfoCheckerService.differsFromTppInRequest(tppInfo); assertTrue(result); }
@Test void differsFromTppInRequest_withSameTppInRequest_shouldReturnFalse() { TppInfo tppInfo = buildTppInfo(AUTHORISATION_NUMBER); when(tppService.getTppInfo()).thenReturn(tppInfo); boolean result = tppInfoCheckerService.differsFromTppInRequest(tppInfo); assertFalse(result); }
@Test void differsFromTppInRequest_withNullTppInfo_shouldReturnTrue() { boolean result = tppInfoCheckerService.differsFromTppInRequest(null); assertTrue(result); }
@Test void differsFromTppInRequest_withNullTppAuthorisationNumber_shouldReturnTrue() { TppInfo tppInfo = buildTppInfo(null); boolean result = tppInfoCheckerService.differsFromTppInRequest(tppInfo); assertTrue(result); }