### Question:
ToolLoader extends AbstractCloudPipelineEntityLoader<ToolWithDescription> { @Override protected String getOwner(final ToolWithDescription entity) { return entity.getTool().getOwner(); } ToolLoader(final CloudPipelineAPIClient apiClient);   }### Answer:
@Test void shouldLoadToolTest() throws EntityNotFoundException { Tool expectedTool = new Tool(); expectedTool.setId(1L); expectedTool.setOwner(TEST_NAME); expectedTool.setRegistry(TEST_NAME); expectedTool.setRegistryId(1L); expectedTool.setImage(TEST_PATH); expectedTool.setDescription(TEST_DESCRIPTION); expectedTool.setDefaultCommand(TEST_CMD); expectedTool.setToolGroupId(1L); expectedTool.setLabels(Collections.singletonList(TEST_LABEL)); ToolLoader toolLoader = new ToolLoader(apiClient); when(apiClient.loadTool(anyString())).thenReturn(expectedTool); Optional<EntityContainer<ToolWithDescription>> container = toolLoader.loadEntity(1L); EntityContainer<ToolWithDescription> toolEntityContainer = container.orElseThrow(AssertionError::new); Tool actualTool = toolEntityContainer.getEntity().getTool(); assertNotNull(actualTool); verifyTool(expectedTool, actualTool); verifyPipelineUser(toolEntityContainer.getOwner()); verifyPermissions(PERMISSIONS_CONTAINER_WITH_OWNER, toolEntityContainer.getPermissions()); verifyMetadata(EXPECTED_METADATA, new ArrayList<>(toolEntityContainer.getMetadata().values())); }