@Test
public void testDefaultWriterRoleAssignment() {

    BatchJobTask task = JobGenerator.oneBatchTask();
    when(logStorageInfo.getS3LogLocation(task, false)).thenReturn(Optional.of(DEFAULT_S3_LOG_LOCATION));
    when(configuration.getDefaultS3WriterRole()).thenReturn("defaultWriter");
    when(configuration.isDefaultS3WriterRoleEnabled()).thenReturn(true);
    ContainerInfo.Builder containerInfoBuilder = ContainerInfo.newBuilder();
    converter.appendS3WriterRole(containerInfoBuilder, JobGenerator.oneBatchJob(), task);
    assertThat(containerInfoBuilder.getPassthroughAttributesMap()).containsEntry(S3_WRITER_ROLE, "defaultWriter");
    assertThat(containerInfoBuilder.getPassthroughAttributesMap()).containsEntry(S3_BUCKET_NAME, "defaultBucket");
}