@Test
  public void testZeroLengthFile() throws IOException {
    File zeroFile = tempFolder.newFile("JarDeployerDUnitZLF.jar");
    zeroFile.createNewFile();

    JarDeploymentService jarDeploymentService =
        ClassPathLoader.getLatest().getJarDeploymentService();
    assertThatThrownBy(() -> {
      Deployment deployment =
          new Deployment("JarDeployerDUnitZLF.jar", "test", Instant.now().toString());
      deployment.setFile(zeroFile);
      jarDeploymentService.deploy(
          deployment);
    }).isInstanceOf(IllegalArgumentException.class);

    byte[] validBytes = new ClassBuilder().createJarFromName("JarDeployerDUnitZLF1");
    File validFile = tempFolder.newFile("JarDeployerDUnitZLF1.jar");
    IOUtils.copy(new ByteArrayInputStream(validBytes), new FileOutputStream(validFile));

    Set<File> files = new HashSet<>();
    files.add(validFile);
    files.add(zeroFile);

    assertThatThrownBy(() -> {
      for (File file : files) {
        Deployment deployment = new Deployment(file.getName(), "test", Instant.now().toString());
        deployment.setFile(file);
        jarDeploymentService.deploy(deployment);
      }
    }).isInstanceOf(IllegalArgumentException.class);

    // clean up the deployed files
    jarDeploymentService.listDeployed()
        .forEach(deployment -> jarDeploymentService.undeployByFileName(deployment.getFileName()));
  }
Verifies that {@link ClassPathLoader#getLatest()} is always initialized and returns a
<tt>ClassPathLoader</tt> instance.
geode-core/src/test/java/org/apache/geode/internal/classloader/ClassPathLoaderTest.java