@Test public void testGetAssemblageID() throws Exception { CSVRecordInfo<BrahmsCsvField> record = mock(CSVRecordInfo.class); ETLStatistics etlStatistics = new ETLStatistics(); when(record.get(BrahmsCsvField.BRAHMS)).thenReturn("1993139.000000"); BrahmsSpecimenTransformer brahmsSpecimenTransformer = new BrahmsSpecimenTransformer(etlStatistics); CommonReflectionUtil.setField(AbstractTransformer.class, brahmsSpecimenTransformer, "objectID", "L.3355550"); CommonReflectionUtil.setField(AbstractTransformer.class, brahmsSpecimenTransformer, "input", record); Object obj = CommonReflectionUtil.callMethod(null, CSVRecordInfo.class, brahmsSpecimenTransformer, "getAssemblageID"); String assembleId = (String) obj; String expectedAssembleID = "1993139@BRAHMS"; assertNotNull("01",assembleId); assertEquals("02",expectedAssembleID, assembleId); }
private String getAssemblageID() { Float f = getFloat(input, BrahmsCsvField.BRAHMS); if (f == null) { return null; } return ESUtil.getElasticsearchId(BRAHMS, f.intValue()); }
BrahmsSpecimenTransformer extends BrahmsTransformer<Specimen> { private String getAssemblageID() { Float f = getFloat(input, BrahmsCsvField.BRAHMS); if (f == null) { return null; } return ESUtil.getElasticsearchId(BRAHMS, f.intValue()); } }
BrahmsSpecimenTransformer extends BrahmsTransformer<Specimen> { private String getAssemblageID() { Float f = getFloat(input, BrahmsCsvField.BRAHMS); if (f == null) { return null; } return ESUtil.getElasticsearchId(BRAHMS, f.intValue()); } BrahmsSpecimenTransformer(ETLStatistics stats); }
BrahmsSpecimenTransformer extends BrahmsTransformer<Specimen> { private String getAssemblageID() { Float f = getFloat(input, BrahmsCsvField.BRAHMS); if (f == null) { return null; } return ESUtil.getElasticsearchId(BRAHMS, f.intValue()); } BrahmsSpecimenTransformer(ETLStatistics stats);  }
BrahmsSpecimenTransformer extends BrahmsTransformer<Specimen> { private String getAssemblageID() { Float f = getFloat(input, BrahmsCsvField.BRAHMS); if (f == null) { return null; } return ESUtil.getElasticsearchId(BRAHMS, f.intValue()); } BrahmsSpecimenTransformer(ETLStatistics stats);   }