@Override
    public void open(int taskNumber, int numTasks) throws IOException {
        Preconditions.checkState(
                numTasks == 1, "SavepointOutputFormat should only be executed with parallelism 1");

        targetLocation = createSavepointLocation(savepointPath);
    }
@Test(expected = IllegalStateException.class)
    public void testSavepointOutputFormatOnlyWorksWithParallelismOne() throws Exception {
        Path path = new Path(temporaryFolder.newFolder().getAbsolutePath());
        SavepointOutputFormat format = createSavepointOutputFormat(path);

        format.open(0, 2);
    }