@Test public void testCreateAssociationErrorMap() { HashMap map = new HashMap(); Map<String, String> returnedMap = associationMappingErrorService.createAssociationErrorMap(associationReport); assertEquals(returnedMap, map); when(associationReport.getSnpError()).thenReturn("Snp error"); assertEquals("Snp error", associationReport.getSnpError()); verify(associationReport, atLeastOnce()).getSnpError(); when(associationReport.getSnpGeneOnDiffChr()).thenReturn("Snp gene on different chromosome"); assertEquals("Snp gene on different chromosome", associationReport.getSnpGeneOnDiffChr()); verify(associationReport, atLeastOnce()).getSnpGeneOnDiffChr(); when(associationReport.getNoGeneForSymbol()).thenReturn("No gene for symbol"); assertEquals("No gene for symbol", associationReport.getNoGeneForSymbol()); verify(associationReport, atLeastOnce()).getNoGeneForSymbol(); when(associationReport.getRestServiceError()).thenReturn("Rest service error"); assertEquals("Rest service error", associationReport.getRestServiceError()); verify(associationReport, atLeastOnce()).getRestServiceError(); when(associationReport.getSuspectVariationError()).thenReturn("Suspect variation error"); assertEquals("Suspect variation error", associationReport.getSuspectVariationError()); verify(associationReport, atLeastOnce()).getSuspectVariationError(); when(associationReport.getGeneError()).thenReturn("Gene error"); assertEquals("Gene error", associationReport.getGeneError()); verify(associationReport, atLeastOnce()).getGeneError(); }
public Map<String, String> createAssociationErrorMap(AssociationReport associationReport) { Map<String, String> associationErrorMap = new HashMap<>(); if (associationReport != null) { if (associationReport.getSnpError() != null && !associationReport.getSnpError().isEmpty()) { associationErrorMap.put("SNP Error", associationReport.getSnpError()); } if (associationReport.getSnpGeneOnDiffChr() != null && !associationReport.getSnpGeneOnDiffChr().isEmpty()) { associationErrorMap.put("Snp Gene On Diff Chr", associationReport.getSnpGeneOnDiffChr()); } if (associationReport.getNoGeneForSymbol() != null && !associationReport.getNoGeneForSymbol().isEmpty()) { associationErrorMap.put("No Gene For Symbol", associationReport.getNoGeneForSymbol()); } if (associationReport.getRestServiceError() != null && !associationReport.getRestServiceError().isEmpty()) { associationErrorMap.put("Rest Service Error", associationReport.getRestServiceError()); } if (associationReport.getSuspectVariationError() != null && !associationReport.getSuspectVariationError().isEmpty()) { associationErrorMap.put("Suspect variation", associationReport.getSuspectVariationError()); } if (associationReport.getGeneError() != null && !associationReport.getGeneError().isEmpty()) { associationErrorMap.put("Gene Error", associationReport.getGeneError()); } } return associationErrorMap; }
AssociationMappingErrorService { public Map<String, String> createAssociationErrorMap(AssociationReport associationReport) { Map<String, String> associationErrorMap = new HashMap<>(); if (associationReport != null) { if (associationReport.getSnpError() != null && !associationReport.getSnpError().isEmpty()) { associationErrorMap.put("SNP Error", associationReport.getSnpError()); } if (associationReport.getSnpGeneOnDiffChr() != null && !associationReport.getSnpGeneOnDiffChr().isEmpty()) { associationErrorMap.put("Snp Gene On Diff Chr", associationReport.getSnpGeneOnDiffChr()); } if (associationReport.getNoGeneForSymbol() != null && !associationReport.getNoGeneForSymbol().isEmpty()) { associationErrorMap.put("No Gene For Symbol", associationReport.getNoGeneForSymbol()); } if (associationReport.getRestServiceError() != null && !associationReport.getRestServiceError().isEmpty()) { associationErrorMap.put("Rest Service Error", associationReport.getRestServiceError()); } if (associationReport.getSuspectVariationError() != null && !associationReport.getSuspectVariationError().isEmpty()) { associationErrorMap.put("Suspect variation", associationReport.getSuspectVariationError()); } if (associationReport.getGeneError() != null && !associationReport.getGeneError().isEmpty()) { associationErrorMap.put("Gene Error", associationReport.getGeneError()); } } return associationErrorMap; } }
AssociationMappingErrorService { public Map<String, String> createAssociationErrorMap(AssociationReport associationReport) { Map<String, String> associationErrorMap = new HashMap<>(); if (associationReport != null) { if (associationReport.getSnpError() != null && !associationReport.getSnpError().isEmpty()) { associationErrorMap.put("SNP Error", associationReport.getSnpError()); } if (associationReport.getSnpGeneOnDiffChr() != null && !associationReport.getSnpGeneOnDiffChr().isEmpty()) { associationErrorMap.put("Snp Gene On Diff Chr", associationReport.getSnpGeneOnDiffChr()); } if (associationReport.getNoGeneForSymbol() != null && !associationReport.getNoGeneForSymbol().isEmpty()) { associationErrorMap.put("No Gene For Symbol", associationReport.getNoGeneForSymbol()); } if (associationReport.getRestServiceError() != null && !associationReport.getRestServiceError().isEmpty()) { associationErrorMap.put("Rest Service Error", associationReport.getRestServiceError()); } if (associationReport.getSuspectVariationError() != null && !associationReport.getSuspectVariationError().isEmpty()) { associationErrorMap.put("Suspect variation", associationReport.getSuspectVariationError()); } if (associationReport.getGeneError() != null && !associationReport.getGeneError().isEmpty()) { associationErrorMap.put("Gene Error", associationReport.getGeneError()); } } return associationErrorMap; } AssociationMappingErrorService(); }
AssociationMappingErrorService { public Map<String, String> createAssociationErrorMap(AssociationReport associationReport) { Map<String, String> associationErrorMap = new HashMap<>(); if (associationReport != null) { if (associationReport.getSnpError() != null && !associationReport.getSnpError().isEmpty()) { associationErrorMap.put("SNP Error", associationReport.getSnpError()); } if (associationReport.getSnpGeneOnDiffChr() != null && !associationReport.getSnpGeneOnDiffChr().isEmpty()) { associationErrorMap.put("Snp Gene On Diff Chr", associationReport.getSnpGeneOnDiffChr()); } if (associationReport.getNoGeneForSymbol() != null && !associationReport.getNoGeneForSymbol().isEmpty()) { associationErrorMap.put("No Gene For Symbol", associationReport.getNoGeneForSymbol()); } if (associationReport.getRestServiceError() != null && !associationReport.getRestServiceError().isEmpty()) { associationErrorMap.put("Rest Service Error", associationReport.getRestServiceError()); } if (associationReport.getSuspectVariationError() != null && !associationReport.getSuspectVariationError().isEmpty()) { associationErrorMap.put("Suspect variation", associationReport.getSuspectVariationError()); } if (associationReport.getGeneError() != null && !associationReport.getGeneError().isEmpty()) { associationErrorMap.put("Gene Error", associationReport.getGeneError()); } } return associationErrorMap; } AssociationMappingErrorService(); Map<String, String> createAssociationErrorMap(AssociationReport associationReport); }
AssociationMappingErrorService { public Map<String, String> createAssociationErrorMap(AssociationReport associationReport) { Map<String, String> associationErrorMap = new HashMap<>(); if (associationReport != null) { if (associationReport.getSnpError() != null && !associationReport.getSnpError().isEmpty()) { associationErrorMap.put("SNP Error", associationReport.getSnpError()); } if (associationReport.getSnpGeneOnDiffChr() != null && !associationReport.getSnpGeneOnDiffChr().isEmpty()) { associationErrorMap.put("Snp Gene On Diff Chr", associationReport.getSnpGeneOnDiffChr()); } if (associationReport.getNoGeneForSymbol() != null && !associationReport.getNoGeneForSymbol().isEmpty()) { associationErrorMap.put("No Gene For Symbol", associationReport.getNoGeneForSymbol()); } if (associationReport.getRestServiceError() != null && !associationReport.getRestServiceError().isEmpty()) { associationErrorMap.put("Rest Service Error", associationReport.getRestServiceError()); } if (associationReport.getSuspectVariationError() != null && !associationReport.getSuspectVariationError().isEmpty()) { associationErrorMap.put("Suspect variation", associationReport.getSuspectVariationError()); } if (associationReport.getGeneError() != null && !associationReport.getGeneError().isEmpty()) { associationErrorMap.put("Gene Error", associationReport.getGeneError()); } } return associationErrorMap; } AssociationMappingErrorService(); Map<String, String> createAssociationErrorMap(AssociationReport associationReport);  }