public Organization getOrganizationById(Long id) {
        Optional<Organization> conf = organizationRepository.findById(id);
        if (!conf.isPresent()) {
            throw new NotFoundException("Could not find organization with id: " + id);
        }
        return conf.get();
    }
@Test
    public void getOrganizationById() {
        Optional<Organization> organizationOptional = Optional.of(newOrganization());
        when(repositoryMock.findById(anyLong())).thenReturn(organizationOptional);

        Organization result = organizationServiceMock.getOrganizationById(1L);

        verify(repositoryMock, times(1)).findById(anyLong());
        assertEquals(organizationOptional.get().getId(), result.getId());
    }