@@ -0,0 +1,2608 @@
+/*%0A * Copyright (c) 2011-2018 Nexmo Inc%0A *%0A * Permission is hereby granted, free of charge, to any person obtaining a copy%0A * of this software and associated documentation files (the %22Software%22), to deal%0A * in the Software without restriction, including without limitation the rights%0A * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell%0A * copies of the Software, and to permit persons to whom the Software is%0A * furnished to do so, subject to the following conditions:%0A *%0A * The above copyright notice and this permission notice shall be included in%0A * all copies or substantial portions of the Software.%0A *%0A * THE SOFTWARE IS PROVIDED %22AS IS%22, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR%0A * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,%0A * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE%0A * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER%0A * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,%0A * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN%0A * THE SOFTWARE.%0A */%0Apackage com.nexmo.client.verify;%0A%0Aimport com.nexmo.client.AbstractClient;%0Aimport com.nexmo.client.HttpWrapper;%0Aimport com.nexmo.client.auth.TokenAuthMethod;%0Aimport org.apache.http.HttpEntity;%0Aimport org.apache.http.HttpResponse;%0Aimport org.apache.http.StatusLine;%0Aimport org.apache.http.client.HttpClient;%0Aimport org.apache.http.client.methods.HttpUriRequest;%0Aimport org.junit.Before;%0A%0Aimport java.io.ByteArrayInputStream;%0A%0Aimport static org.mockito.ArgumentMatchers.any;%0Aimport static org.mockito.Mockito.mock;%0Aimport static org.mockito.Mockito.when;%0A%0Apublic abstract class ClientTest%3CT extends AbstractClient%3E %7B%0A    protected HttpWrapper wrapper;%0A    protected T client;%0A%0A    @Before%0A    public void setupWrapper() %7B%0A        wrapper = new HttpWrapper(new TokenAuthMethod(%22not-an-api-key%22, %22secret%22));%0A    %7D%0A%0A    protected HttpClient stubHttpClient(int statusCode, String content) throws Exception %7B%0A        HttpClient result = mock(HttpClient.class);%0A%0A        HttpResponse response = mock(HttpResponse.class);%0A        StatusLine sl = mock(StatusLine.class);%0A        HttpEntity entity = mock(HttpEntity.class);%0A%0A        when(result.execute(any(HttpUriRequest.class))).thenReturn(response);%0A        when(entity.getContent()).thenReturn(new ByteArrayInputStream(content.getBytes(%22UTF-8%22)));%0A        when(sl.getStatusCode()).thenReturn(statusCode);%0A        when(response.getStatusLine()).thenReturn(sl);%0A        when(response.getEntity()).thenReturn(entity);%0A%0A        return result;%0A    %7D%0A%7D%0A

Add abstract client test for shared functionality.