GeosupportServiceImpl implements GeosupportService { @Override public 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) { return new Call(serviceConfiguration.function3(), serviceConfiguration.latLongEnhancer()) { @Override public Map<String, Object> userArguments() { Map<String, Object> params = new HashMap<String, Object>(); params.put(STREET_NAME, onStreet); params.put(STREET_NAME2, crossStreetOne); params.put(STREET_NAME3, crossStreetTwo); params.put(BOROUGH_CODE, Boroughs.parseInt(boroughOnStreet)); if (boroughCrossStreetOne != null) { params.put(BOROUGH_CODE2, Boroughs.parseInt(boroughCrossStreetOne)); } if (boroughCrossStreetTwo != null) { params.put(BOROUGH_CODE3, 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 testCallFunction3() { Map<String, Object> arguments = new HashMap<>(); arguments.put(STREET_NAME, "RSD"); arguments.put(STREET_NAME2, "W 100 ST"); arguments.put(STREET_NAME3, "AMSTERDAM AV"); arguments.put(BOROUGH_CODE, 1); arguments.put(BOROUGH_CODE2, 2); arguments.put(BOROUGH_CODE3, 3); arguments.put(COMPASS_DIRECTION, "E"); mockFunctionCall(F3, arguments); Map<String, Object> actualResult = geosupportServiceImpl.callFunction3("RSD", "Manhattan", "W 100 ST", "Bronx", "AMSTERDAM AV", "BROOKLYN", "E"); verifyMocks(actualResult); }