*/
@Test
public class JobIdTest {
public void testJobIdEquals() {
JobId one;
JobId two;
one = new JobId("name", "group");
assert one.equals(one);
assert one.getJobName().equals("name");
assert one.getJobGroup().equals("group");
one = new JobId("name", "group");
two = new JobId("name", "group");
assert one != two;
assert one.getJobName().equals(two.getJobName());
assert one.getJobGroup().equals(two.getJobGroup());
assert one.equals(two);
assert one.hashCode() == two.hashCode();
two = new JobId("nameX", "group");
assert one != two;
assert !one.equals(two);
assert one.hashCode() != two.hashCode();
two = new JobId("name", "groupX");
assert one != two;
assert !one.equals(two);
assert one.hashCode() != two.hashCode();
one = new JobId("nameX", "group");
two = new JobId("name", "group");
assert one != two;
assert !one.equals(two);
assert one.hashCode() != two.hashCode();
one = new JobId("name", "groupX");
assert one != two;
assert !one.equals(two);
assert one.hashCode() != two.hashCode();
// cannot compare JobId with a HistoryJobId
one = new HistoryJobId("name", "group", 1);
two = new JobId("name", "group");
assert one != two;
assert !one.equals(two);
assert one.hashCode() != two.hashCode();
one = new JobId("name", "group");
two = new HistoryJobId("name", "group", 1);
assert one != two;
assert !one.equals(two);
assert one.hashCode() != two.hashCode();
}