### Question:
IssueLoader extends AbstractCloudPipelineEntityLoader<Issue> { @Override protected String getOwner(final Issue entity) { return entity.getAuthor(); } IssueLoader(final CloudPipelineAPIClient apiClient); @Override Issue fetchEntity(final Long id);  }### Answer:
@Test void shouldLoadIssueTest() throws EntityNotFoundException { Attachment attachment = new Attachment(); attachment.setPath(TEST_PATH); attachment.setOwner(USER_NAME); IssueComment comment = IssueComment .builder() .author(USER_NAME) .text(TEST_DESCRIPTION) .build(); EntityVO entity = new EntityVO(1L, AclClass.TOOL); Issue expectedIssue = Issue .builder() .id(1L) .name(TEST_NAME) .text(TEST_DESCRIPTION) .status(IssueStatus.OPEN) .labels(Collections.singletonList(TEST_LABEL)) .attachments(Collections.singletonList(attachment)) .comments(Collections.singletonList(comment)) .entity(entity) .author(TEST_NAME) .build(); IssueLoader issueLoader = new IssueLoader(apiClient); when(apiClient.loadIssue(anyLong())).thenReturn(expectedIssue); Optional<EntityContainer<Issue>> container = issueLoader.loadEntity(1L); EntityContainer<Issue> issueEntityContainer = container.orElseThrow(AssertionError::new); Issue actualIssue = issueEntityContainer.getEntity(); assertNotNull(actualIssue); verifyIssue(expectedIssue, actualIssue); verifyPipelineUser(issueEntityContainer.getOwner()); verifyPermissions(PERMISSIONS_CONTAINER_WITH_OWNER, issueEntityContainer.getPermissions()); verifyMetadata(EXPECTED_METADATA, new ArrayList<>(issueEntityContainer.getMetadata().values())); }