### Question:
OAuthService { public static String get(final String url, final String accessToken) throws Exception { final HttpURLConnection httpURLConnection = (HttpURLConnection) new URL(url).openConnection(); httpURLConnection.setRequestMethod("GET"); httpURLConnection.setRequestProperty("User-Agent", "Mozilla/5.0"); httpURLConnection.setRequestProperty("Authorization", "token " + accessToken); return IOUtils.toString(httpURLConnection.getInputStream()); }  static String requestOAuthLocationUri(final SiteContext context); static User processOAuthRedirect(final SiteContext context, final Company company, String code); static String capitalizeFirstLetter(String original); static String getEmail(String accessToken); static String get(final String url, final String accessToken);  }### Answer:
@Test @Ignore public void testGet() throws Exception { final String response = OAuthService.get("https: ObjectMapper objectMapper = new ObjectMapper(); final ArrayList<Map<String, Object>> emailList = (ArrayList<Map<String, Object>>) objectMapper.readValue(response, ArrayList.class); System.out.println(emailList); Assert.assertEquals(1, emailList.size()); Assert.assertEquals("tommi.s.e.laukkanen@gmail.com", emailList.get(0).get("email")); Assert.assertTrue((Boolean) emailList.get(0).get("primary")); Assert.assertTrue((Boolean) emailList.get(0).get("verified")); }