### Question:
Sol003PackageManagementSubscriptionController { @GetMapping(value = "/subscriptions/{subscriptionId}") public ResponseEntity<?> getSubscription(@PathVariable("subscriptionId") final String subscriptionId) { logger.info(LOG_REQUEST_RECEIVED, " Getting Subscription: ", subscriptionId); final Optional<InlineResponse201> optional = subscriptionManager.getSubscription(subscriptionId); if (optional.isPresent()) { logger.debug("Return subscription with id {} and body {}", subscriptionId, optional); return new ResponseEntity<>(optional.get(), HttpStatus.OK); } final String errorMessage = "The requested subscription: " + subscriptionId + " was not found on call getSubscription"; logger.error(errorMessage); return ResponseEntity.status(HttpStatus.NOT_FOUND).body(new ProblemDetails().detail(errorMessage)); } @Autowired  Sol003PackageManagementSubscriptionController(final SubscriptionManager subscriptionManager); @PostMapping(value = "/subscriptions") ResponseEntity<?> postSubscriptionRequest(@RequestBody final PkgmSubscriptionRequest pkgmSubscriptionRequest); @GetMapping(value = "/subscriptions") ResponseEntity<List<InlineResponse201>> getSubscriptions(); @GetMapping(value = "/subscriptions/{subscriptionId}") ResponseEntity<?> getSubscription(@PathVariable("subscriptionId") final String subscriptionId); @DeleteMapping(value = "/subscriptions/{subscriptionId}") ResponseEntity<?> deleteSubscription(@PathVariable("subscriptionId") final String subscriptionId);  }### Answer:
@Test public void testFailGetSubscriptionWithInvalidSubscriptionId() { final String invalidId = "invalidSubscriptionId"; mockRestServiceServer.expect(requestTo(msbEndpoint + "/" + invalidId)).andExpect(method(HttpMethod.GET)) .andRespond(withStatus(HttpStatus.NOT_FOUND)); final ResponseEntity<?> response = sol003PackageManagementSubscriptionController.getSubscription(invalidId); assertEquals(HttpStatus.NOT_FOUND, response.getStatusCode()); assertTrue(response.getBody() instanceof ProblemDetails); }