@Test
public void testNeedsTaskCommit() throws IOException {

  // Mock sample return.
  when(mockCommitter.needsTaskCommit(mockTaskAttemptContext)).thenReturn(false);
  boolean result = committer.needsTaskCommit(mockTaskAttemptContext);
  // Verify the delegate is being called and returns the correct data.
  verify(mockCommitter).needsTaskCommit(eq(mockTaskAttemptContext));
  assertThat(result).isFalse();
}