@Test public void testGetMultiMediaGatheringEvent() throws Exception { ETLStatistics etlStatistics = new ETLStatistics(); CSVRecordInfo<BrahmsCsvField> record = mock(CSVRecordInfo.class); when(record.get(BrahmsCsvField.CONTINENT)).thenReturn("Europe"); when(record.get(BrahmsCsvField.COUNTRY)).thenReturn("Netherlands"); when(record.get(BrahmsCsvField.MAJORAREA)).thenReturn(""); when(record.get(BrahmsCsvField.LOCNOTES)).thenReturn("Io een rotsachtige rij vochtige berghelling bij het Kolmhans."); when(record.get(BrahmsCsvField.YEAR)).thenReturn(" 0.000000"); when(record.get(BrahmsCsvField.MONTH)).thenReturn(" 8.000000"); when(record.get(BrahmsCsvField.DAY)).thenReturn(" 3.000000"); when(record.get(BrahmsCsvField.LATITUDE)).thenReturn(" 0.000000"); when(record.get(BrahmsCsvField.LONGITUDE)).thenReturn(" 0.000000"); when(record.get(BrahmsCsvField.BRAHMS)).thenReturn("1993139.000000"); when(record.get(BrahmsCsvField.COLLECTOR, false)).thenReturn("Plabon"); BrahmsMultiMediaTransformer brahmsMultiMediaTransformer = new BrahmsMultiMediaTransformer(etlStatistics); CommonReflectionUtil.setField(AbstractTransformer.class, brahmsMultiMediaTransformer, "objectID", "L.3355550"); CommonReflectionUtil.setField(AbstractTransformer.class, brahmsMultiMediaTransformer, "input", record); Object obj = CommonReflectionUtil.callMethod(record, CSVRecordInfo.class, brahmsMultiMediaTransformer, "getMultiMediaGatheringEvent"); MultiMediaGatheringEvent multiMediaGatheringEvent = (MultiMediaGatheringEvent) obj; assertNotNull(multiMediaGatheringEvent); assertEquals("Europe", multiMediaGatheringEvent.getContinent()); assertEquals("Netherlands", multiMediaGatheringEvent.getCountry()); }
private MultiMediaGatheringEvent getMultiMediaGatheringEvent( CSVRecordInfo<BrahmsCsvField> record) { MultiMediaGatheringEvent ge = new MultiMediaGatheringEvent(); populateGatheringEvent(ge, record); return ge; }
BrahmsMultiMediaTransformer extends BrahmsTransformer<MultiMediaObject> { private MultiMediaGatheringEvent getMultiMediaGatheringEvent( CSVRecordInfo<BrahmsCsvField> record) { MultiMediaGatheringEvent ge = new MultiMediaGatheringEvent(); populateGatheringEvent(ge, record); return ge; } }
BrahmsMultiMediaTransformer extends BrahmsTransformer<MultiMediaObject> { private MultiMediaGatheringEvent getMultiMediaGatheringEvent( CSVRecordInfo<BrahmsCsvField> record) { MultiMediaGatheringEvent ge = new MultiMediaGatheringEvent(); populateGatheringEvent(ge, record); return ge; } BrahmsMultiMediaTransformer(ETLStatistics stats); }
BrahmsMultiMediaTransformer extends BrahmsTransformer<MultiMediaObject> { private MultiMediaGatheringEvent getMultiMediaGatheringEvent( CSVRecordInfo<BrahmsCsvField> record) { MultiMediaGatheringEvent ge = new MultiMediaGatheringEvent(); populateGatheringEvent(ge, record); return ge; } BrahmsMultiMediaTransformer(ETLStatistics stats);  }
BrahmsMultiMediaTransformer extends BrahmsTransformer<MultiMediaObject> { private MultiMediaGatheringEvent getMultiMediaGatheringEvent( CSVRecordInfo<BrahmsCsvField> record) { MultiMediaGatheringEvent ge = new MultiMediaGatheringEvent(); populateGatheringEvent(ge, record); return ge; } BrahmsMultiMediaTransformer(ETLStatistics stats);   }