GeosupportServiceImpl implements GeosupportService { @Override public Map<String, Object> callFunction2(final String crossStreetOne, final String boroughCrossStreetOne, final String crossStreetTwo, final String boroughCrossStreetTwo, final String compassDirection) { return new Call(serviceConfiguration.function2(), serviceConfiguration.latLongEnhancer()) { @Override public Map<String, Object> userArguments() { Map<String, Object> params = newMap(); params.put(STREET_NAME, crossStreetOne); params.put(STREET_NAME2, crossStreetTwo); params.put(BOROUGH_CODE, Boroughs.parseInt(boroughCrossStreetOne)); if (boroughCrossStreetTwo != null) { params.put(BOROUGH_CODE2, Boroughs.parseInt(boroughCrossStreetTwo)); } if (compassDirection != null) { params.put(COMPASS_DIRECTION, compassDirection); } return params; } }.execute(); } GeosupportServiceImpl(AppConfig serviceConfiguration); @Override Map<String, Object> callFunctionAP(String houseNumber, String street, String borough, String zip); @Override Map<String, Object> callFunction1B(final String houseNumber, final String street, final String borough,
            final String zip); @Override Map<String, Object> callFunction2(final String crossStreetOne, final String boroughCrossStreetOne,
            final String crossStreetTwo, final String boroughCrossStreetTwo, final String compassDirection); @Override Map<String, Object> callFunction3(final String onStreet, final String boroughOnStreet,
            final String crossStreetOne, final String boroughCrossStreetOne, final String crossStreetTwo,
            final String boroughCrossStreetTwo, final String compassDirection); @Override Map<String, Object> callFunctionBL(final String borough, final String block, final String lot); @Override Map<String, Object> callFunctionBN(final String bin); @Override Map<String, Object> callFunctionHR(); @Override Map<String, Object> callGeosupport(final Map<String, Object> clientParams); @Override Map<String, Object> callFunctionN(String streetName, Integer length, String format); @Override Map<String, Object> callStreetNameFunction(String codeOne, String codeTwo, String codeThree, Integer length, String format); @Override Map<String, Object> callFunctionD(String streetCodeOne, String streetCodeTwo, String streetCodeThree,
            Integer length, String format); @Override Map<String, Object> callFunctionDG(String streetCodeOne, String streetCodeTwo, String streetCodeThree,
            Integer length, String format); @Override Map<String, Object> callFunctionDN(String streetCodeOne, String streetCodeTwo, String streetCodeThree,
            Integer length, String format); Documentation getDocumentation(); @Override Version version();  }
@Test public void testCallFunction2() { Map<String, Object> arguments = new HashMap<String, Object>(); arguments.put(STREET_NAME, "RSD"); arguments.put(STREET_NAME2, "W 100 ST"); arguments.put(BOROUGH_CODE, 1); arguments.put(BOROUGH_CODE2, 2); arguments.put(COMPASS_DIRECTION, "N"); mockFunctionCall(F2, arguments); Map<String, Object> actualResult = geosupportServiceImpl.callFunction2("RSD", "Manhattan","W 100 ST", "BRONX", "N"); verifyMocks(actualResult); }
@Test public void testCallFunction2_HD01971827() { Map<String, Object> arguments = new HashMap<String, Object>(); arguments.put(STREET_NAME, "RSD"); arguments.put(STREET_NAME2, "W 100 ST"); arguments.put(BOROUGH_CODE, 1); arguments.put(BOROUGH_CODE2, 2); arguments.put(COMPASS_DIRECTION, "N"); mockFunctionCall(F2, arguments); Map<String, Object> actualResult = geosupportServiceImpl.callFunction2("RSD", "Manhattan", "W 100 ST", "BRONX", "N"); verifyMocks(actualResult); Map<String, Object> arguments2 = new HashMap<String, Object>(); arguments2.put(STREET_NAME, "RSD"); arguments2.put(STREET_NAME2, "W 100 ST"); arguments2.put(BOROUGH_CODE, 1); arguments2.put(BOROUGH_CODE2, 2); mockFunctionCall(F2, arguments2); Map<String, Object> actualResult2 = geosupportServiceImpl.callFunction2("RSD", "Manhattan", "W 100 ST", "BRONX", null); verifyMocks(actualResult2); }