ForwardingBigQueryFileOutputCommitter extends OutputCommitter { @Override public boolean needsTaskCommit(TaskAttemptContext context) throws IOException { return delegate.needsTaskCommit(context); } ForwardingBigQueryFileOutputCommitter(TaskAttemptContext context, OutputCommitter delegate); @Override void commitJob(JobContext context); @Override void abortJob(JobContext context, State state); @Override void abortTask(TaskAttemptContext context); @Override void commitTask(TaskAttemptContext context); @Override boolean needsTaskCommit(TaskAttemptContext context); @Override void setupJob(JobContext context); @Override void setupTask(TaskAttemptContext context);  }
@Test public void testNeedsTaskCommit() throws IOException { when(mockCommitter.needsTaskCommit(mockTaskAttemptContext)).thenReturn(false); boolean result = committer.needsTaskCommit(mockTaskAttemptContext); verify(mockCommitter).needsTaskCommit(eq(mockTaskAttemptContext)); assertThat(result).isFalse(); }