@Test public void extractsApplicationContext() { Context context = mock(Context.class); when(context.getApplicationContext()).thenReturn(context); PosSdk.createClient(context, "clientId"); verify(context).getApplicationContext(); }
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); }
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); } }
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(); }
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); }
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);  }