LinkedInAdapter implements ApiAdapter<LinkedIn> { public void updateStatus(LinkedIn linkedin, String message) { linkedin.networkUpdateOperations().createNetworkUpdate(message); }  boolean test(LinkedIn linkedin); void setConnectionValues(LinkedIn linkedin, ConnectionValues values); UserProfile fetchUserProfile(LinkedIn linkedin); void updateStatus(LinkedIn linkedin, String message);  }
@Test public void updateStatus() { NetworkUpdateOperations networkOperations = Mockito.mock(NetworkUpdateOperations.class); Mockito.when(linkedin.networkUpdateOperations()).thenReturn(networkOperations); apiAdapter.updateStatus(linkedin, "Hello world!"); Mockito.verify(networkOperations).createNetworkUpdate("Hello world!"); }