public void testAllArtifacts() {
   assertNotNull(batchProject);
   Collection<IBatchArtifact> cs = batchProject.getAllArtifacts();
   assertFalse(cs.isEmpty());
   int total = cs.size();
   int total2 = 0;
   for (BatchArtifactType t : BatchArtifactType.values()) {
     cs = batchProject.getArtifacts(t);
     total2 += cs.size();
   }
   assertEquals(total, total2);
 }
 public void testBatchJobs() {
   Set<IFile> batchJobs = batchProject.getDeclaredBatchJobs();
   assertFalse(batchJobs.isEmpty());
   for (IFile batchJob : batchJobs) {
     assertTrue(batchJob.exists());
   }
 }
 Collection<IBatchArtifact> assertArtifactsByType(BatchArtifactType type) {
   Collection<IBatchArtifact> cs = batchProject.getArtifacts(type);
   assertFalse(cs.isEmpty());
   for (IBatchArtifact a : cs) {
     assertTrue(a.getArtifactType() == type);
   }
   return cs;
 }
  IBatchArtifact assertArtifactByNameAndType(
      String name, BatchArtifactType type, boolean checkNamedDeclaration) {
    Collection<IBatchArtifact> cs = batchProject.getArtifacts(name);
    assertEquals(1, cs.size());

    IBatchArtifact b = cs.iterator().next();
    if (checkNamedDeclaration) {
      assertNotNull(b.getNamedDeclaration());
    }
    assertEquals(name, b.getName());
    assertTrue(b.getArtifactType() == type);
    return b;
  }
 public void testTypeReferences() {
   String typeName = "java.lang.ArrayIndexOutOfBoundsException";
   IType type = ((BatchProject) batchProject).getType(typeName);
   assertNotNull(type);
   assertTextSourceReferences(batchProject.getReferences(type), typeName);
 }