@@ -0,0 +1,2029 @@
+package org.commonwl.view.workflow;%0A%0Aimport org.apache.jena.base.Sys;%0Aimport org.commonwl.view.git.GitDetails;%0Aimport org.junit.Rule;%0Aimport org.junit.Test;%0Aimport org.junit.runner.RunWith;%0Aimport org.mockito.Mock;%0Aimport org.springframework.beans.factory.annotation.Autowired;%0Aimport org.springframework.boot.test.autoconfigure.data.mongo.DataMongoTest;%0Aimport org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest;%0Aimport org.springframework.test.context.junit4.SpringRunner;%0A%0Aimport static org.junit.Assert.*;%0A%0A@DataMongoTest%0A@RunWith(SpringRunner.class)%0Apublic class QueuedWorkflowRepositoryTest %7B%0A%0A    @Autowired%0A    public QueuedWorkflowRepository repository;%0A%0A    @Test%0A    public void deleteQueuedWorkflowByRetrievedFromTest() %7B%0A%0A        assertNotNull(repository);%0A%0A        // create stub queued workflow%0A        GitDetails gitDetails = new GitDetails(%22test_repo_url%22, %22test_branch%22, %22test_path%22);%0A        gitDetails.setPackedId(%22test_packedId%22);%0A%0A        Workflow workflow = new Workflow();%0A        workflow.setRetrievedFrom(gitDetails);%0A%0A        QueuedWorkflow queuedWorkflow = new QueuedWorkflow();%0A        queuedWorkflow.setTempRepresentation(workflow);%0A%0A        // save queued workflow%0A        repository.save(queuedWorkflow);%0A%0A        // retrieve saved queued workflow by workflow git details%0A        QueuedWorkflow retrievedQueuedWorkflowAfterSave = repository%0A                .findByRetrievedFrom(queuedWorkflow.getTempRepresentation().getRetrievedFrom());%0A        assertNotNull(retrievedQueuedWorkflowAfterSave);%0A%0A%0A        // delete saved queued workflow by workflow git details%0A        repository.deleteByTempRepresentation_RetrievedFrom(queuedWorkflow.getTempRepresentation().getRetrievedFrom());%0A%0A        // retrieve deleted queued workflow by workflow git details%0A        QueuedWorkflow retrievedQueuedWorkflowAfterDelete = repository%0A                .findByRetrievedFrom(queuedWorkflow.getTempRepresentation().getRetrievedFrom());%0A        assertNull(retrievedQueuedWorkflowAfterDelete);%0A%0A    %7D%0A%0A%7D%0A

Implement unit test for QueuedWorkflow delete by git details functionality