@@ -0,0 +1,1491 @@
+package ca.corefacility.bioinformatics.irida.repositories.remote.impl;%0A%0Aimport org.apache.el.stream.Optional;%0Aimport org.junit.jupiter.api.BeforeEach;%0Aimport org.junit.jupiter.api.Test;%0A%0Aimport ca.corefacility.bioinformatics.irida.exceptions.LinkNotFoundException;%0Aimport ca.corefacility.bioinformatics.irida.model.project.Project;%0Aimport ca.corefacility.bioinformatics.irida.repositories.remote.ProjectRemoteRepository;%0Aimport ca.corefacility.bioinformatics.irida.service.RemoteAPITokenService;%0Aimport ca.corefacility.bioinformatics.irida.web.controller.api.projects.RESTProjectsController;%0A%0Aimport static org.junit.jupiter.api.Assertions.assertThrows;%0Aimport static org.mockito.Mockito.mock;%0Aimport static org.mockito.Mockito.when;%0A%0Apublic class ProjectRemoteRepositoryImplTest %7B%0A%0A%09private ProjectRemoteRepository projectRemoteRepository;%0A%09private RemoteAPITokenService tokenService;%0A%09private static final String PROJECT_HASH_REL = RESTProjectsController.PROJECT_HASH_REL;%0A%0A%09@BeforeEach%0A%09public void setUp() throws URISyntaxException %7B%0A%09%09tokenService = mock(RemoteAPITokenService.class);%0A%09%09projectRemoteRepository = new ProjectRemoteRepositoryImpl(tokenService);%0A%09%7D%0A%0A%09@Test%0A%09public void testReadProjectHashWithoutProjectHashRel() %7B%0A%09%09Project remoteProject = new Project(%22test project%22);%0A%0A%09%09when(remoteProject.getLink(PROJECT_HASH_REL)).thenReturn(Optional.empty());%0A%0A%09%09assertThrows(LinkNotFoundException.class, () -%3E %7B%0A%09%09%09projectRemoteRepository.readProjectHash(remoteProject);%0A%09%09%7D);%0A%09%7D%0A%7D%0A

Add test for readProjectHash when remote project does not have the hash rel.