public class DiscoJobPackTest {
@Test
public void testDiscoJobPack() throws URISyntaxException {
final DiscoJobPack jobPack = new DiscoJobPack("jobName", new File("jobPackFile.txt"), true, true, new File("jobHome"), new byte[] {
1, 2, 3, 4 });
jobPack.addEnvVar("env1", "value1");
jobPack.addEnvVar("env2", "value2");
jobPack.addInput(new URI("raw://therawuriinput"));
jobPack.addInput(new URI("raw://therawuriinput2"));
final ByteBuffer buffer = ByteBuffer.allocate(1024);
jobPack.write(buffer);
buffer.flip();
buffer.getInt(); // magic!
final int jobDictOffset = buffer.getInt();
final int jobEnvsOffset = buffer.getInt();