@VisibleForTesting
void printBulkJobs(List<BulkResponse> jobs, String timeZoneId, boolean verbose) throws IOException {
if (jobs != null && jobs.size() > 0) {
for (BulkResponse response : jobs) {
BundleJob bundle = response.getBundle();
CoordinatorJob coord = response.getCoordinator();
CoordinatorAction action = response.getAction();
if (verbose) {
System.out.println();
System.out.println("Bundle Name : " + maskIfNull(bundle.getAppName()));
System.out.println(RULER);
System.out.println("Bundle ID : " + maskIfNull(bundle.getId()));
System.out.println("Coordinator Name : " + maskIfNull(coord.getAppName()));
System.out.println("Coord Action ID : " + maskIfNull(action.getId()));
System.out.println("Action Status : " + action.getStatus());
System.out.println("External ID : " + maskIfNull(action.getExternalId()));
System.out.println("Created Time : " + maskDate(action.getCreatedTime(), timeZoneId, false));
System.out.println("User : " + maskIfNull(bundle.getUser()));
System.out.println("Error Message : " + maskIfNull(action.getErrorMessage()));
System.out.println(RULER);
}
else {
System.out.println(String.format(BULK_RESPONSE_FORMATTER, "Bundle Name", "Bundle ID", "Coord Name",
"Coord Action ID", "Status", "External ID", "Created Time", "Error Message"));
System.out.println(RULER);
System.out
.println(String.format(BULK_RESPONSE_FORMATTER, maskIfNull(bundle.getAppName()),
maskIfNull(bundle.getId()), maskIfNull(coord.getAppName()),
maskIfNull(action.getId()), action.getStatus(), maskIfNull(action.getExternalId()),
maskDate(action.getCreatedTime(), timeZoneId, false),
maskIfNull(action.getErrorMessage())));
System.out.println(RULER);
}