### Question:
MtasApiServiceImpl implements MtasApiService { protected ResponseEntity<List<Mta>> getMtasByNamespace(String spaceGuid, String namespace) { List<DeployedMta> deployedMtas = deployedMtaDetector.detectDeployedMtasByNamespace(namespace, getCloudFoundryClient(spaceGuid)); if (deployedMtas.isEmpty()) { throw new NotFoundException(Messages.MTAS_NOT_FOUND_BY_NAMESPACE, namespace); } return ResponseEntity.ok() .body(getMtas(deployedMtas)); }  @Override ResponseEntity<List<Mta>> getMtas(String spaceGuid); @Override ResponseEntity<Mta> getMta(String spaceGuid, String mtaId); @Override ResponseEntity<List<Mta>> getMtas(String spaceGuid, String namespace, String name);  }### Answer:
@Test void testGetMtasByNamespace() { Mta mtaToGet = mtas.get(0); Mockito.when(deployedMtaDetector.detectDeployedMtasByNamespace(mtaToGet.getMetadata() .getNamespace(), client)) .thenReturn(List.of(getDeployedMta(mtaToGet))); ResponseEntity<List<Mta>> response = testedClass.getMtas(SPACE_GUID, mtaToGet.getMetadata() .getNamespace(), null); assertEquals(HttpStatus.OK, response.getStatusCode()); List<Mta> responseMtas = response.getBody(); assertEquals(List.of(mtaToGet), responseMtas); }