PosSdk { public static @NonNull PosClient createClient(@NonNull Context context, @NonNull String clientId) { context = PosSdkHelper.nonNull(context, "context").getApplicationContext(); PosSdkHelper.nonNull(clientId, "clientId"); return new RealPosClient(context, clientId); } private  PosSdk(); static @NonNull PosClient createClient(@NonNull Context context,
      @NonNull String clientId);  }
@Test(expected = NullPointerException.class) public void nullContextThrows() { PosSdk.createClient(null, "clientId"); }
@Test(expected = NullPointerException.class) public void nullClientIdThrows() { PosSdk.createClient(mock(Context.class), null); }
@Test public void extractsApplicationContext() { Context context = mock(Context.class); when(context.getApplicationContext()).thenReturn(context); PosSdk.createClient(context, "clientId"); verify(context).getApplicationContext(); }