@@ -0,0 +1,1544 @@
+package com.jerrychin.util;%0D%0A%0D%0Aimport java.io.IOException;%0D%0Aimport java.util.HashMap;%0D%0Aimport java.util.Map;%0D%0Aimport org.junit.BeforeClass;%0D%0Aimport org.junit.Test;%0D%0Aimport junit.framework.Assert;%0D%0A%0D%0Apublic class LookupAPITest %7B%0D%0A%0D%0A%09public static String addr;%0D%0A%09public static Map%3CString, String%3E headers;%0D%0A%0D%0A%09@BeforeClass%0D%0A%09public static void setUpBeforeClass() throws Exception %7B%0D%0A%09%09// plainURI = new URI(%22http://www.google.com/?q=%3C%3E%22);%0D%0A%09%09addr = %22http://apis.baidu.com/apistore/mobilenumber/mobilenumber?phone=15210011578%22;%0D%0A%09%09headers = new HashMap%3C%3E();%0D%0A%09%09headers.put(%22apikey%22, %22f64842b48cad4fbee57ebc1c7135cf44%22);%0D%0A%09%7D%0D%0A%0D%0A%09@Test%0D%0A%09public void testRequestOutcome() throws IOException, Exception %7B%0D%0A%09%09WebService lookup = new WebServiceProvider(addr, headers);%0D%0A%09%09Assert.assertNotNull(lookup.get());%0D%0A%09%7D%0D%0A%09%0D%0A%09@Test(expected=Exception.class)%0D%0A%09public void testNullURLShouldThrowException() throws Exception %7B%0D%0A%09%09new WebServiceProvider(null, headers);%0D%0A%09%7D%0D%0A%09%0D%0A%09@Test(expected=Exception.class)%0D%0A%09public void testEmptyURLShouldThrowException() throws Exception %7B%0D%0A%09%09new WebServiceProvider(%22%22, headers);%0D%0A%09%7D%0D%0A%09%0D%0A%09@Test%0D%0A%09public void testNullHeadersShouldNoException() throws IOException, Exception %7B%0D%0A%09%09WebService lookup = new WebServiceProvider(addr, null);%0D%0A%09%09try %7B%0D%0A%09%09%09lookup.get();%0D%0A%09%09%7D catch(Exception e) %7B%0D%0A%09%09%09Assert.fail(%22Unexcepted exception!%22);%0D%0A%09%09%7D%0D%0A%09%7D%0D%0A%09%0D%0A%09@Test(expected=Exception.class)%0D%0A%09public void testPostShouldThrowException() throws Exception %7B%0D%0A%09%09WebService lookup = new WebServiceProvider(addr, headers);%0D%0A%09%09lookup.post();%0D%0A%09%7D%0D%0A%7D

add more tests, mainly verify the robust of the framework.