@Test public void testMappingOfAllFields() throws Exception { final List<String> arguments = Arrays.asList("arg-1", "arg-2"); final Date now = new Date(); final URI uri = new URI("http: final List<Long> blockedJobs = Arrays.asList(5L, 6L); final JaxbJob jaxb = new JaxbJob( new JobImpl(3L, "test", "test_org", 0L, "simple", "do", arguments, DISPATCHING, "localhost", "remotehost", now, now, now, 100L, 200L, "result", 1L, 3L, true, uri, 1.5F)); final Job job = jaxb.toJob(); assertEquals(3L, job.getId()); assertEquals("test", job.getCreator()); assertEquals("test_org", job.getOrganization()); assertEquals(0L, job.getVersion()); assertEquals("simple", job.getJobType()); assertEquals("do", job.getOperation()); assertEquals(arguments, job.getArguments()); assertEquals(DISPATCHING, job.getStatus()); assertEquals("localhost", job.getCreatedHost()); assertEquals("remotehost", job.getProcessingHost()); assertEquals(now, job.getDateStarted()); assertEquals(now, job.getDateCreated()); assertEquals(now, job.getDateCompleted()); assertEquals((Long) 100L, job.getQueueTime()); assertEquals((Long) 200L, job.getRunTime()); assertEquals("result", job.getPayload()); assertEquals((Long) 1L, job.getParentJobId()); assertEquals((Long) 3L, job.getRootJobId()); assertTrue(job.isDispatchable()); assertEquals(uri, job.getUri()); assertEquals((Float) 1.5F, job.getJobLoad()); }
public Job toJob() { return new JobImpl(id, creator, organization, version, jobType, operation, arguments, status, createdHost, processingHost, dateCreated, dateStarted, dateCompleted, queueTime, runTime, payload, parentJobId, rootJobId, dispatchable, uri, jobLoad); }
JaxbJob { public Job toJob() { return new JobImpl(id, creator, organization, version, jobType, operation, arguments, status, createdHost, processingHost, dateCreated, dateStarted, dateCompleted, queueTime, runTime, payload, parentJobId, rootJobId, dispatchable, uri, jobLoad); } }
JaxbJob { public Job toJob() { return new JobImpl(id, creator, organization, version, jobType, operation, arguments, status, createdHost, processingHost, dateCreated, dateStarted, dateCompleted, queueTime, runTime, payload, parentJobId, rootJobId, dispatchable, uri, jobLoad); } JaxbJob();  JaxbJob(Job job); }
JaxbJob { public Job toJob() { return new JobImpl(id, creator, organization, version, jobType, operation, arguments, status, createdHost, processingHost, dateCreated, dateStarted, dateCompleted, queueTime, runTime, payload, parentJobId, rootJobId, dispatchable, uri, jobLoad); } JaxbJob();  JaxbJob(Job job); Job toJob(); static Fn<Job, JaxbJob> fnFromJob(); @Override boolean equals(Object o); @Override int hashCode(); }
JaxbJob { public Job toJob() { return new JobImpl(id, creator, organization, version, jobType, operation, arguments, status, createdHost, processingHost, dateCreated, dateStarted, dateCompleted, queueTime, runTime, payload, parentJobId, rootJobId, dispatchable, uri, jobLoad); } JaxbJob();  JaxbJob(Job job); Job toJob(); static Fn<Job, JaxbJob> fnFromJob(); @Override boolean equals(Object o); @Override int hashCode();  }