List<PAMRasterBand> pamRasterBands = merged.getPAMRasterBand();
PAMRasterBand sampleBand = samplePamRasterBands.get(0);
List<MDI> sampleMetadata = sampleBand.getMetadata().getMDI();
for (int i = 0; i<numBands; i++) {
final PAMRasterBand band = new PAMRasterBand();
final Metadata metadata = new Metadata();
List<MDI> mdiList = metadata.getMDI();
for (MDI mdi: sampleMetadata) {
MDI addedMdi = new MDI();
addedMdi.setKey(mdi.getKey());
mdiList.add(addedMdi);
}