### Question:
NodeFactoryNeo4j implements NodeFactory { @Override public LocationNode getOrCreateLocation(org.eol.globi.domain.Location location) throws NodeFactoryException { LocationNode locationNode = findLocation(location); if (null == locationNode) { locationNode = createLocation(location); } return locationNode; } NodeFactoryNeo4j(GraphDatabaseService graphDb); GraphDatabaseService getGraphDb(); @Override LocationNode findLocation(Location location); @Override SeasonNode createSeason(String seasonNameLower); @Override SpecimenNode createSpecimen(Interaction interaction, Taxon taxon); @Override SpecimenNode createSpecimen(Study study, Taxon taxon); @Override SpecimenNode createSpecimen(Study study, Taxon taxon, RelTypes... types); @Override StudyNode createStudy(Study study); @Override StudyNode getOrCreateStudy(Study study); @Deprecated @Override StudyNode findStudy(String title); @Override SeasonNode findSeason(String seasonName); @Override LocationNode getOrCreateLocation(org.eol.globi.domain.Location location); @Override void setUnixEpochProperty(Specimen specimen, Date date); @Override Date getUnixEpochProperty(Specimen specimen); @Override List<Environment> getOrCreateEnvironments(Location location, String externalId, String name); @Override List<Environment> addEnvironmentToLocation(Location location, List<Term> terms); @Override Term getOrCreateBodyPart(String externalId, String name); @Override Term getOrCreatePhysiologicalState(String externalId, String name); @Override Term getOrCreateLifeStage(String externalId, String name); @Override TermLookupService getTermLookupService(); void setEnvoLookupService(TermLookupService envoLookupService); void setTermLookupService(TermLookupService termLookupService); @Deprecated void setDoiResolver(DOIResolver doiResolver); @Override AuthorIdResolver getAuthorResolver(); @Override Term getOrCreateBasisOfRecord(String externalId, String name); @Override Dataset getOrCreateDataset(Dataset originatingDataset); @Override Interaction createInteraction(Study study); static final TermImpl NO_MATCH_TERM; }### Answer:
@Test(expected = NodeFactoryException.class) public void createInvalidLocation() throws NodeFactoryException { getNodeFactory().getOrCreateLocation(new LocationImpl(91.3d, -104.0d, -1.0d, null)); getNodeFactory().getOrCreateLocation(new LocationImpl(-100.3d, 104d, -1.0d, null)); getNodeFactory().getOrCreateLocation(new LocationImpl(-10.3d, -200.0d, -1.0d, null)); getNodeFactory().getOrCreateLocation(new LocationImpl(-20.0d, 300.0d, -1.0d, null)); }