@BeforeClass
  public static void setUpClass() {
    assumeTrue(
        "To run tests, GOOGLE_CLOUD_TESTS_IN_VPCSC environment variable needs to be set to true",
        IN_VPCSC_TEST != null && IN_VPCSC_TEST.equalsIgnoreCase("true"));

    assertTrue(
        OUT_VPCSC_PROJECT_ENV
            + " environment variable needs to be set to a GCP "
            + "project that is out of the VPC perimeter",
        isNotEmpty(OUT_VPCSC_PROJECT));

    assertTrue(
        OUT_VPCSC_HOSTNAME_ENV + " must be set to a webapp that resides in " + OUT_VPCSC_PROJECT,
        isNotEmpty(OUT_VPCSC_HOSTNAME));

    assertTrue(
        GOOGLE_CREDENTIAL_DEFAULT_ENV
            + " must be set to google application credentials "
            + "that is outside VPCSC perimeter",
        isNotEmpty(OUT_VPCSC_GOOGLE_CREDENTIAL));
  }
Negative Integration tests for VPC-SC.
java-websecurityscanner/google-cloud-websecurityscanner/src/test/java/com/google/cloud/websecurityscanner/it/v1beta/VPCServiceControlNegativeTest.java