### Question:
CmsAspspTppInfoController implements CmsAspspTppInfoApi { @Override public ResponseEntity<TppInfo> getTppInfo(String tppAuthorisationNumber, String instanceId) { return cmsAspspTppService.getTppInfo(tppAuthorisationNumber, instanceId) .map(record -> new ResponseEntity<>(record, HttpStatus.OK)) .orElseGet(() -> new ResponseEntity<>(HttpStatus.NOT_FOUND)); }  @Override ResponseEntity<TppInfo> getTppInfo(String tppAuthorisationNumber, String instanceId);  }### Answer:
@Test void getTppInfo_Success() throws Exception { when(cmsAspspTppService.getTppInfo(tppAuthorisationNumber, INSTANCE_ID)) .thenReturn(Optional.of(tppInfo)); mockMvc.perform(get(GET_TPP_INFO_URL) .contentType(MediaType.APPLICATION_JSON_VALUE) .headers(httpHeaders)) .andExpect(status().is(HttpStatus.OK.value())) .andExpect(content().json(jsonReader.getStringFromFile(TPP_INFO_PATH))); verify(cmsAspspTppService, times(1)).getTppInfo(tppAuthorisationNumber, INSTANCE_ID); }
@Test void getTppInfo_404() throws Exception { when(cmsAspspTppService.getTppInfo(tppAuthorisationNumber, INSTANCE_ID)) .thenReturn(Optional.empty()); mockMvc.perform(get(GET_TPP_INFO_URL) .contentType(MediaType.APPLICATION_JSON_VALUE) .headers(httpHeaders)) .andExpect(status().is(HttpStatus.NOT_FOUND.value())); verify(cmsAspspTppService, times(1)).getTppInfo(tppAuthorisationNumber, INSTANCE_ID); }