diff --git a/.gitignore b/.gitignore index fa35c4dd..12b0a405 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,4 @@ examples/Example.java .vscode sendgrid-java.jar dependency-reduced-pom.xml +prism* diff --git a/.travis.yml b/.travis.yml index db96dad8..7becc3f3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,35 +1,19 @@ language: java before_install: - echo $GPG_SECRET_KEYS | base64 --decode | $GPG_EXECUTABLE --import --batch || true -matrix: - include: - - jdk: openjdk7 - dist: trusty - - jdk: openjdk8 - dist: xenial - - jdk: openjdk11 - dist: xenial - - jdk: oraclejdk7 - dist: precise - - jdk: oraclejdk8 - dist: trusty - - jdk: oraclejdk11 - dist: trusty - allow_failures: - - jdk: openjdk7 - - jdk: oraclejdk7 -before_script: - - "./scripts/startPrism.sh &" - - sleep 20 -install: - - mvn --settings .maven.xml install -DskipTests=true -Dgpg.skip -Dmaven.javadoc.skip=true -B -V +env: + - version=8 + - version=11 +script: + - make test-docker + deploy: - provider: script script: mvn clean deploy --settings .maven.xml -DskipTests=true -B -U -Prelease edge: true on: tags: true - jdk: openjdk8 + condition: $version = 8 branch: master notifications: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 30240905..8367539d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -128,25 +128,9 @@ All test files are in the [`tests`](https://github.com/sendgrid/sendgrid-java/tr For the purposes of contributing to this repo, please update the [`SendGridTest.java`](https://github.com/sendgrid/sendgrid-java/tree/master/src/test/java/com/sendgrid/SendGridTest.java) file with unit tests as you modify the code. -1. Download [prism](http://stoplight.io/platform/prism/) for your platform ([Mac OS X](https://github.com/stoplightio/prism/releases/download/v0.6.21/prism_darwin_amd64), [Linux](https://github.com/stoplightio/prism/releases/download/v0.6.21/prism_linux_amd64), [Windows](https://github.com/stoplightio/prism/releases/download/v0.6.21/prism_windows_amd64.exe)) and save the binary to the sendgrid-java directory (or any directory you would like. The sendgrid-java directory is chosen mostly for convenience.) +The integration tests require a Twilio SendGrid mock API in order to execute. We've simplified setting this up using Docker to run the tests. You will just need [Docker Desktop](https://docs.docker.com/get-docker/) and `make`. -1. Add execute permissions - - ```bash - chmod +x prism - ``` - -1. In a separate terminal, cd into the directory you chose for prism and start the sendgrid local server which the tests will use. - - ```bash - ./prism run --mock --list --spec https://raw.githubusercontent.com/sendgrid/sendgrid-oai/master/oai_stoplight.json - ``` - -1. Now you can run the test suite from the root of the project - - ```bash - ./gradlew test -i - ``` +Once these are available, simply execute the Docker test target to run all tests: `make test-docker`. This command can also be used to open an interactive shell into the container where this library is installed. To start a *bash* shell for example, use this command: `command=bash make test-docker`. ## Style Guidelines & Naming Conventions diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..6587fff8 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,21 @@ +ARG version=latest +FROM openjdk:$version + +# version <= 11 +RUN apt-get update \ + && apt-get install -y make maven || true +COPY prism/prism/nginx/cert.crt /usr/local/share/ca-certificates/cert.crt +RUN update-ca-certificates || true + +# version > 11 +RUN yum update -y \ + && yum install -y make wget || true +RUN wget http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo -O /etc/yum.repos.d/epel-apache-maven.repo \ + && yum install -y maven || true +RUN keytool -import -trustcacerts -cacerts -storepass changeit -noprompt \ + -alias api.sendgrid.com -file /usr/local/share/ca-certificates/cert.crt || true + +WORKDIR /app +COPY . . + +RUN make install diff --git a/Makefile b/Makefile index 36295ba5..a7e6c434 100644 --- a/Makefile +++ b/Makefile @@ -1,17 +1,20 @@ -.PHONY: install test test-integration clean +.PHONY: install test test-integ test-docker clean VERSION := $(shell mvn help:evaluate -Dexpression=project.version --batch-mode | grep -e '^[^\[]') install: @java -version || (echo "Java is not installed, please install Java >= 7"; exit 1); - mvn clean install -DskipTests=true -Dgpg.skip -B + mvn clean install -DskipTests=true -Dgpg.skip -Dmaven.javadoc.skip=true -B cp target/sendgrid-java-$(VERSION)-shaded.jar sendgrid-java.jar test: mvn test -test-integration: - ./scripts/startPrism.sh & - sleep 5 +test-integ: test + +version ?= latest +test-docker: + curl -s https://raw.githubusercontent.com/sendgrid/sendgrid-oai/master/prism/prism.sh -o prism.sh + version=$(version) bash ./prism.sh clean: mvn clean diff --git a/docker/Dockerfile b/docker/Dockerfile deleted file mode 100644 index cc4ce776..00000000 --- a/docker/Dockerfile +++ /dev/null @@ -1,24 +0,0 @@ -FROM store/oracle/serverjre:8 - -ENV OAI_SPEC_URL="https://raw.githubusercontent.com/sendgrid/sendgrid-oai/master/oai_stoplight.json" - -RUN yum install -y git - -WORKDIR /root - -# install Prism -ADD https://raw.githubusercontent.com/stoplightio/prism/master/install install.sh -RUN chmod +x ./install.sh && \ - ./install.sh && \ - rm ./install.sh - -# Set up default Twilio SendGrid env -WORKDIR /root/sources -RUN git clone https://github.com/sendgrid/sendgrid-java.git -WORKDIR /root -RUN ln -s /root/sources/sendgrid-java - -COPY entrypoint.sh entrypoint.sh -RUN chmod +x entrypoint.sh -ENTRYPOINT ["./entrypoint.sh"] -CMD ["--mock"] diff --git a/docker/README.md b/docker/README.md deleted file mode 100644 index dccc98cf..00000000 --- a/docker/README.md +++ /dev/null @@ -1,31 +0,0 @@ -# Supported tags and respective `Dockerfile` links - - `v1.0.0`, `latest` [(Dockerfile)](https://github.com/sendgrid/sendgrid-java/blob/master/docker/Dockerfile) - -# Quick reference -Due to Oracle's JDK license, you must build this Docker image using the official Oracle image located in the Docker Store. You will need a Docker store account. Once you have an account, you must accept the Oracle license [here](https://store.docker.com/images/oracle-serverjre-8). On the command line, type `docker login` and provide your credentials. You may then build the image using this command `docker build -t sendgrid/sendgrid-java -f Dockerfile .` - - - **Where to get help:** - [Contact Twilio SendGrid Support](https://support.sendgrid.com/hc/en-us) - - - **Where to file issues:** - https://github.com/sendgrid/sendgrid-java/issues - - - **Where to get more info:** - [USAGE.md](https://github.com/sendgrid/sendgrid-java/blob/master/docker/USAGE.md) - - - **Maintained by:** - [Twilio SendGrid Inc.](https://sendgrid.com) - -# Usage examples - - Most recent version: `docker run -it sendgrid/sendgrid-java`. - - Your own fork: - ```sh-session - $ git clone https://github.com/you/cool-sendgrid-java.git - $ realpath cool-sendgrid-java - /path/to/cool-sendgrid-java - $ docker run -it -v /path/to/cool-sendgrid-java:/mnt/sendgrid-java sendgrid/sendgrid-java - ``` - -For more detailed information, see [USAGE.md](https://github.com/sendgrid/sendgrid-java/blob/master/docker/USAGE.md). - -![SendGrid Logo](https://github.com/sendgrid/sendgrid-python/raw/master/twilio_sendgrid_logo.png) diff --git a/docker/USAGE.md b/docker/USAGE.md deleted file mode 100644 index dab8ed36..00000000 --- a/docker/USAGE.md +++ /dev/null @@ -1,32 +0,0 @@ -You can use Docker to easily try out or test sendgrid-java. - - -# Quickstart - -1. Install Docker on your machine. -2. If you have not done so, create a Docker Store account [here](https://store.docker.com/signup?next=%2F) -3. Navigate [here](https://store.docker.com/images/oracle-serverjre-8) and click the "Proceed to Checkout" link (don't worry, it's free). -4. On the command line, execute `docker login` and provide your credentials. -5. Build the Docker image using the command `docker build -t sendgrid/sendgrid-java -f Dockerfile .` -6. Run `docker run -it sendgrid/sendgrid-java`. - - -# Info - -This Docker image contains - - `sendgrid-java` - - Stoplight's Prism, which lets you try out the API without actually sending email - -Run it in interactive mode with `-it`. - -You can mount repositories in the `/mnt/sendgrid-java` and `/mnt/java-http-client` directories to use them instead of the default Twilio SendGrid libraries. Read on for more info. - - -# Testing -Testing is easy! -1. Run the container: `docker run -it sendgrid/sendgrid-java` -2. `cd sendgrid-java` -3. run `./gradlew test` - -![SendGrid Logo](https://github.com/sendgrid/sendgrid-python/raw/master/twilio_sendgrid_logo.png) - diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh deleted file mode 100644 index 556d85bd..00000000 --- a/docker/entrypoint.sh +++ /dev/null @@ -1,31 +0,0 @@ -#! /bin/bash -clear - -# check for + link mounted libraries: -if [ -d /mnt/sendgrid-java ] -then - rm /root/sendgrid - ln -s /mnt/sendgrid-java/sendgrid - echo "Linked mounted sendgrid-java's code to /root/sendgrid" -fi - -SENDGRID_JAVA_VERSION="1.0.0" -echo "Welcome to sendgrid-java docker v${SENDGRID_JAVA_VERSION}." -echo - -if [ "$1" != "--no-mock" ] -then - echo "Starting Prism in mock mode. Calls made to Prism will not actually send emails." - echo "Disable this by running this container with --no-mock." - prism run --mock --spec $OAI_SPEC_URL 2> /dev/null & -else - echo "Starting Prism in live (--no-mock) mode. Calls made to Prism will send emails." - prism run --spec $OAI_SPEC_URL 2> /dev/null & -fi -echo "To use Prism, make API calls to localhost:4010. For example," -echo " sg = sendgrid.SendGridAPIClient(" -echo " host='http://localhost:4010/'," -echo " api_key=os.environ.get('SENDGRID_API_KEY_CAMPAIGNS'))" -echo "To stop Prism, run \"kill $!\" from the shell." - -bash \ No newline at end of file diff --git a/scripts/startPrism.sh b/scripts/startPrism.sh deleted file mode 100755 index 53923593..00000000 --- a/scripts/startPrism.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!/bin/bash - -set -eu - -install () { - -echo "Installing Prism..." - -UNAME=$(uname) -ARCH=$(uname -m) -if [ "$UNAME" != "Linux" ] && [ "$UNAME" != "Darwin" ] && [ "$ARCH" != "x86_64" ] && [ "$ARCH" != "i686" ]; then - echo "Sorry, OS/Architecture not supported: ${UNAME}/${ARCH}. Download binary from https://github.com/stoplightio/prism/releases" - exit 1 -fi - -if [ "$UNAME" = "Darwin" ] ; then - OSX_ARCH=$(uname -m) - if [ "${OSX_ARCH}" = "x86_64" ] ; then - PLATFORM="darwin_amd64" - fi -elif [ "$UNAME" = "Linux" ] ; then - LINUX_ARCH=$(uname -m) - if [ "${LINUX_ARCH}" = "i686" ] ; then - PLATFORM="linux_386" - elif [ "${LINUX_ARCH}" = "x86_64" ] ; then - PLATFORM="linux_amd64" - fi -fi - -mkdir -p ../prism/bin -#LATEST=$(curl -s https://api.github.com/repos/stoplightio/prism/tags | grep -Eo '"name":.*?[^\\]",' | head -n 1 | sed 's/[," ]//g' | cut -d ':' -f 2) -LATEST="v0.6.21" -URL="https://github.com/stoplightio/prism/releases/download/$LATEST/prism_$PLATFORM" -DEST=../prism/bin/prism - -if [ -z $LATEST ] ; then - echo "Error requesting. Download binary from ${URL}" - exit 1 -else - curl -L $URL -o $DEST - chmod +x $DEST -fi -} - -run () { - echo "Running prism..." - cd ../prism/bin - ./prism run --mock --spec https://raw.githubusercontent.com/sendgrid/sendgrid-oai/master/oai_stoplight.json -} - -if [ -f ../prism/bin/prism ]; then - echo "Prism is already installed." - run -else - echo "Prism is not installed." - install - run -fi diff --git a/src/test/java/com/sendgrid/SendGridTest.java b/src/test/java/com/sendgrid/SendGridTest.java index 2045a937..0dc2a86e 100644 --- a/src/test/java/com/sendgrid/SendGridTest.java +++ b/src/test/java/com/sendgrid/SendGridTest.java @@ -92,14 +92,7 @@ public void testRateLimitSleep() { @Test public void test_async() { final Object sync = new Object(); - SendGrid sg = null; - if(System.getenv("TRAVIS") != null && Boolean.parseBoolean(System.getenv("TRAVIS"))) { - sg = new SendGrid("SENDGRID_API_KEY"); - sg.setHost(System.getenv("MOCK_HOST")); - } else { - sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); - } + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -137,14 +130,7 @@ public void response(Response response) { @Test public void test_async_rate_limit() { final Object sync = new Object(); - SendGrid sg = null; - if(System.getenv("TRAVIS") != null && Boolean.parseBoolean(System.getenv("TRAVIS"))) { - sg = new SendGrid("SENDGRID_API_KEY"); - sg.setHost(System.getenv("MOCK_HOST")); - } else { - sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); - } + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "429"); Request request = new Request(); @@ -177,8 +163,7 @@ public void response(Response response) { @Test public void test_access_settings_activity_get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -191,8 +176,7 @@ public void test_access_settings_activity_get() throws IOException { @Test public void test_access_settings_whitelist_post() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "201"); Request request = new Request(); @@ -205,8 +189,7 @@ public void test_access_settings_whitelist_post() throws IOException { @Test public void test_access_settings_whitelist_get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -218,8 +201,7 @@ public void test_access_settings_whitelist_get() throws IOException { @Test public void test_access_settings_whitelist_delete() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "204"); Request request = new Request(); @@ -232,8 +214,7 @@ public void test_access_settings_whitelist_delete() throws IOException { @Test public void test_access_settings_whitelist__rule_id__get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -245,8 +226,7 @@ public void test_access_settings_whitelist__rule_id__get() throws IOException { @Test public void test_access_settings_whitelist__rule_id__delete() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "204"); Request request = new Request(); @@ -258,8 +238,7 @@ public void test_access_settings_whitelist__rule_id__delete() throws IOException @Test public void test_alerts_post() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "201"); Request request = new Request(); @@ -272,8 +251,7 @@ public void test_alerts_post() throws IOException { @Test public void test_alerts_get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -285,8 +263,7 @@ public void test_alerts_get() throws IOException { @Test public void test_alerts__alert_id__patch() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -299,8 +276,7 @@ public void test_alerts__alert_id__patch() throws IOException { @Test public void test_alerts__alert_id__get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -312,8 +288,7 @@ public void test_alerts__alert_id__get() throws IOException { @Test public void test_alerts__alert_id__delete() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "204"); Request request = new Request(); @@ -325,8 +300,7 @@ public void test_alerts__alert_id__delete() throws IOException { @Test public void test_api_keys_post() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "201"); Request request = new Request(); @@ -339,8 +313,7 @@ public void test_api_keys_post() throws IOException { @Test public void test_api_keys_get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -353,8 +326,7 @@ public void test_api_keys_get() throws IOException { @Test public void test_api_keys__api_key_id__put() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -367,8 +339,7 @@ public void test_api_keys__api_key_id__put() throws IOException { @Test public void test_api_keys__api_key_id__patch() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -381,8 +352,7 @@ public void test_api_keys__api_key_id__patch() throws IOException { @Test public void test_api_keys__api_key_id__get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -394,8 +364,7 @@ public void test_api_keys__api_key_id__get() throws IOException { @Test public void test_api_keys__api_key_id__delete() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "204"); Request request = new Request(); @@ -407,8 +376,7 @@ public void test_api_keys__api_key_id__delete() throws IOException { @Test public void test_asm_groups_post() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "201"); Request request = new Request(); @@ -421,8 +389,7 @@ public void test_asm_groups_post() throws IOException { @Test public void test_asm_groups_get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -435,8 +402,7 @@ public void test_asm_groups_get() throws IOException { @Test public void test_asm_groups__group_id__patch() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "201"); Request request = new Request(); @@ -449,8 +415,7 @@ public void test_asm_groups__group_id__patch() throws IOException { @Test public void test_asm_groups__group_id__get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -462,8 +427,7 @@ public void test_asm_groups__group_id__get() throws IOException { @Test public void test_asm_groups__group_id__delete() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "204"); Request request = new Request(); @@ -475,8 +439,7 @@ public void test_asm_groups__group_id__delete() throws IOException { @Test public void test_asm_groups__group_id__suppressions_post() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "201"); Request request = new Request(); @@ -489,8 +452,7 @@ public void test_asm_groups__group_id__suppressions_post() throws IOException { @Test public void test_asm_groups__group_id__suppressions_get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -502,8 +464,7 @@ public void test_asm_groups__group_id__suppressions_get() throws IOException { @Test public void test_asm_groups__group_id__suppressions_search_post() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -516,8 +477,7 @@ public void test_asm_groups__group_id__suppressions_search_post() throws IOExcep @Test public void test_asm_groups__group_id__suppressions__email__delete() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "204"); Request request = new Request(); @@ -529,8 +489,7 @@ public void test_asm_groups__group_id__suppressions__email__delete() throws IOEx @Test public void test_asm_suppressions_get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -542,8 +501,7 @@ public void test_asm_suppressions_get() throws IOException { @Test public void test_asm_suppressions_global_post() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "201"); Request request = new Request(); @@ -556,8 +514,7 @@ public void test_asm_suppressions_global_post() throws IOException { @Test public void test_asm_suppressions_global__email__get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -569,8 +526,7 @@ public void test_asm_suppressions_global__email__get() throws IOException { @Test public void test_asm_suppressions_global__email__delete() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "204"); Request request = new Request(); @@ -582,8 +538,7 @@ public void test_asm_suppressions_global__email__delete() throws IOException { @Test public void test_asm_suppressions__email__get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -595,8 +550,7 @@ public void test_asm_suppressions__email__get() throws IOException { @Test public void test_browsers_stats_get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -614,8 +568,7 @@ public void test_browsers_stats_get() throws IOException { @Test public void test_campaigns_post() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "201"); Request request = new Request(); @@ -628,8 +581,7 @@ public void test_campaigns_post() throws IOException { @Test public void test_campaigns_get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -643,8 +595,7 @@ public void test_campaigns_get() throws IOException { @Test public void test_campaigns__campaign_id__patch() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -657,8 +608,7 @@ public void test_campaigns__campaign_id__patch() throws IOException { @Test public void test_campaigns__campaign_id__get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -670,8 +620,7 @@ public void test_campaigns__campaign_id__get() throws IOException { @Test public void test_campaigns__campaign_id__delete() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "204"); Request request = new Request(); @@ -683,8 +632,7 @@ public void test_campaigns__campaign_id__delete() throws IOException { @Test public void test_campaigns__campaign_id__schedules_patch() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -697,8 +645,7 @@ public void test_campaigns__campaign_id__schedules_patch() throws IOException { @Test public void test_campaigns__campaign_id__schedules_post() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "201"); Request request = new Request(); @@ -711,8 +658,7 @@ public void test_campaigns__campaign_id__schedules_post() throws IOException { @Test public void test_campaigns__campaign_id__schedules_get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -724,8 +670,7 @@ public void test_campaigns__campaign_id__schedules_get() throws IOException { @Test public void test_campaigns__campaign_id__schedules_delete() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "204"); Request request = new Request(); @@ -737,8 +682,7 @@ public void test_campaigns__campaign_id__schedules_delete() throws IOException { @Test public void test_campaigns__campaign_id__schedules_now_post() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "201"); Request request = new Request(); @@ -750,8 +694,7 @@ public void test_campaigns__campaign_id__schedules_now_post() throws IOException @Test public void test_campaigns__campaign_id__schedules_test_post() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "204"); Request request = new Request(); @@ -764,8 +707,7 @@ public void test_campaigns__campaign_id__schedules_test_post() throws IOExceptio @Test public void test_categories_get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -780,8 +722,7 @@ public void test_categories_get() throws IOException { @Test public void test_categories_stats_get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -799,8 +740,7 @@ public void test_categories_stats_get() throws IOException { @Test public void test_categories_stats_sums_get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -819,8 +759,7 @@ public void test_categories_stats_sums_get() throws IOException { @Test public void test_clients_stats_get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -835,8 +774,7 @@ public void test_clients_stats_get() throws IOException { @Test public void test_clients__client_type__stats_get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -851,8 +789,7 @@ public void test_clients__client_type__stats_get() throws IOException { @Test public void test_contactdb_custom_fields_post() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "201"); Request request = new Request(); @@ -865,8 +802,7 @@ public void test_contactdb_custom_fields_post() throws IOException { @Test public void test_contactdb_custom_fields_get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -878,8 +814,7 @@ public void test_contactdb_custom_fields_get() throws IOException { @Test public void test_contactdb_custom_fields__custom_field_id__get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -891,8 +826,7 @@ public void test_contactdb_custom_fields__custom_field_id__get() throws IOExcept @Test public void test_contactdb_custom_fields__custom_field_id__delete() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "202"); Request request = new Request(); @@ -904,8 +838,7 @@ public void test_contactdb_custom_fields__custom_field_id__delete() throws IOExc @Test public void test_contactdb_lists_post() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "201"); Request request = new Request(); @@ -918,8 +851,7 @@ public void test_contactdb_lists_post() throws IOException { @Test public void test_contactdb_lists_get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -931,8 +863,7 @@ public void test_contactdb_lists_get() throws IOException { @Test public void test_contactdb_lists_delete() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "204"); Request request = new Request(); @@ -945,8 +876,7 @@ public void test_contactdb_lists_delete() throws IOException { @Test public void test_contactdb_lists__list_id__patch() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -960,8 +890,7 @@ public void test_contactdb_lists__list_id__patch() throws IOException { @Test public void test_contactdb_lists__list_id__get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -974,8 +903,7 @@ public void test_contactdb_lists__list_id__get() throws IOException { @Test public void test_contactdb_lists__list_id__delete() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "202"); Request request = new Request(); @@ -988,8 +916,7 @@ public void test_contactdb_lists__list_id__delete() throws IOException { @Test public void test_contactdb_lists__list_id__recipients_post() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "201"); Request request = new Request(); @@ -1002,8 +929,7 @@ public void test_contactdb_lists__list_id__recipients_post() throws IOException @Test public void test_contactdb_lists__list_id__recipients_get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -1018,8 +944,7 @@ public void test_contactdb_lists__list_id__recipients_get() throws IOException { @Test public void test_contactdb_lists__list_id__recipients__recipient_id__post() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "201"); Request request = new Request(); @@ -1031,8 +956,7 @@ public void test_contactdb_lists__list_id__recipients__recipient_id__post() thro @Test public void test_contactdb_lists__list_id__recipients__recipient_id__delete() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "204"); Request request = new Request(); @@ -1046,8 +970,7 @@ public void test_contactdb_lists__list_id__recipients__recipient_id__delete() th @Test public void test_contactdb_recipients_patch() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "201"); Request request = new Request(); @@ -1060,8 +983,7 @@ public void test_contactdb_recipients_patch() throws IOException { @Test public void test_contactdb_recipients_post() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "201"); Request request = new Request(); @@ -1074,8 +996,7 @@ public void test_contactdb_recipients_post() throws IOException { @Test public void test_contactdb_recipients_get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -1089,8 +1010,7 @@ public void test_contactdb_recipients_get() throws IOException { @Test public void test_contactdb_recipients_delete() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -1103,8 +1023,7 @@ public void test_contactdb_recipients_delete() throws IOException { @Test public void test_contactdb_recipients_billable_count_get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -1116,8 +1035,7 @@ public void test_contactdb_recipients_billable_count_get() throws IOException { @Test public void test_contactdb_recipients_count_get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -1129,8 +1047,7 @@ public void test_contactdb_recipients_count_get() throws IOException { @Test public void test_contactdb_recipients_search_get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -1143,8 +1060,7 @@ public void test_contactdb_recipients_search_get() throws IOException { @Test public void test_contactdb_recipients__recipient_id__get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -1156,8 +1072,7 @@ public void test_contactdb_recipients__recipient_id__get() throws IOException { @Test public void test_contactdb_recipients__recipient_id__delete() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "204"); Request request = new Request(); @@ -1169,8 +1084,7 @@ public void test_contactdb_recipients__recipient_id__delete() throws IOException @Test public void test_contactdb_recipients__recipient_id__lists_get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -1182,8 +1096,7 @@ public void test_contactdb_recipients__recipient_id__lists_get() throws IOExcept @Test public void test_contactdb_reserved_fields_get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -1195,8 +1108,7 @@ public void test_contactdb_reserved_fields_get() throws IOException { @Test public void test_contactdb_segments_post() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -1209,8 +1121,7 @@ public void test_contactdb_segments_post() throws IOException { @Test public void test_contactdb_segments_get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -1222,8 +1133,7 @@ public void test_contactdb_segments_get() throws IOException { @Test public void test_contactdb_segments__segment_id__patch() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -1237,8 +1147,7 @@ public void test_contactdb_segments__segment_id__patch() throws IOException { @Test public void test_contactdb_segments__segment_id__get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -1251,8 +1160,7 @@ public void test_contactdb_segments__segment_id__get() throws IOException { @Test public void test_contactdb_segments__segment_id__delete() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "204"); Request request = new Request(); @@ -1265,8 +1173,7 @@ public void test_contactdb_segments__segment_id__delete() throws IOException { @Test public void test_contactdb_segments__segment_id__recipients_get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -1280,8 +1187,7 @@ public void test_contactdb_segments__segment_id__recipients_get() throws IOExcep @Test public void test_devices_stats_get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -1298,8 +1204,7 @@ public void test_devices_stats_get() throws IOException { @Test public void test_geo_stats_get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -1317,8 +1222,7 @@ public void test_geo_stats_get() throws IOException { @Test public void test_ips_get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -1335,8 +1239,7 @@ public void test_ips_get() throws IOException { @Test public void test_ips_assigned_get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -1348,8 +1251,7 @@ public void test_ips_assigned_get() throws IOException { @Test public void test_ips_pools_post() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -1362,8 +1264,7 @@ public void test_ips_pools_post() throws IOException { @Test public void test_ips_pools_get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -1375,8 +1276,7 @@ public void test_ips_pools_get() throws IOException { @Test public void test_ips_pools__pool_name__put() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -1389,8 +1289,7 @@ public void test_ips_pools__pool_name__put() throws IOException { @Test public void test_ips_pools__pool_name__get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -1402,8 +1301,7 @@ public void test_ips_pools__pool_name__get() throws IOException { @Test public void test_ips_pools__pool_name__delete() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "204"); Request request = new Request(); @@ -1415,8 +1313,7 @@ public void test_ips_pools__pool_name__delete() throws IOException { @Test public void test_ips_pools__pool_name__ips_post() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "201"); Request request = new Request(); @@ -1429,8 +1326,7 @@ public void test_ips_pools__pool_name__ips_post() throws IOException { @Test public void test_ips_pools__pool_name__ips__ip__delete() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "204"); Request request = new Request(); @@ -1442,8 +1338,7 @@ public void test_ips_pools__pool_name__ips__ip__delete() throws IOException { @Test public void test_ips_warmup_post() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -1456,8 +1351,7 @@ public void test_ips_warmup_post() throws IOException { @Test public void test_ips_warmup_get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -1469,8 +1363,7 @@ public void test_ips_warmup_get() throws IOException { @Test public void test_ips_warmup__ip_address__get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -1482,8 +1375,7 @@ public void test_ips_warmup__ip_address__get() throws IOException { @Test public void test_ips_warmup__ip_address__delete() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "204"); Request request = new Request(); @@ -1495,8 +1387,7 @@ public void test_ips_warmup__ip_address__delete() throws IOException { @Test public void test_ips__ip_address__get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -1508,8 +1399,7 @@ public void test_ips__ip_address__get() throws IOException { @Test public void test_mail_batch_post() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "201"); Request request = new Request(); @@ -1521,8 +1411,7 @@ public void test_mail_batch_post() throws IOException { @Test public void test_mail_batch__batch_id__get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -1534,8 +1423,7 @@ public void test_mail_batch__batch_id__get() throws IOException { @Test public void test_mail_send_post() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "202"); Request request = new Request(); @@ -1548,8 +1436,7 @@ public void test_mail_send_post() throws IOException { @Test public void test_mail_settings_get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -1563,8 +1450,7 @@ public void test_mail_settings_get() throws IOException { @Test public void test_mail_settings_address_whitelist_patch() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -1577,8 +1463,7 @@ public void test_mail_settings_address_whitelist_patch() throws IOException { @Test public void test_mail_settings_address_whitelist_get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -1590,8 +1475,7 @@ public void test_mail_settings_address_whitelist_get() throws IOException { @Test public void test_mail_settings_bcc_patch() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -1604,8 +1488,7 @@ public void test_mail_settings_bcc_patch() throws IOException { @Test public void test_mail_settings_bcc_get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -1617,8 +1500,7 @@ public void test_mail_settings_bcc_get() throws IOException { @Test public void test_mail_settings_bounce_purge_patch() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -1631,8 +1513,7 @@ public void test_mail_settings_bounce_purge_patch() throws IOException { @Test public void test_mail_settings_bounce_purge_get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -1644,8 +1525,7 @@ public void test_mail_settings_bounce_purge_get() throws IOException { @Test public void test_mail_settings_footer_patch() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -1658,8 +1538,7 @@ public void test_mail_settings_footer_patch() throws IOException { @Test public void test_mail_settings_footer_get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -1671,8 +1550,7 @@ public void test_mail_settings_footer_get() throws IOException { @Test public void test_mail_settings_forward_bounce_patch() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -1685,8 +1563,7 @@ public void test_mail_settings_forward_bounce_patch() throws IOException { @Test public void test_mail_settings_forward_bounce_get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -1698,8 +1575,7 @@ public void test_mail_settings_forward_bounce_get() throws IOException { @Test public void test_mail_settings_forward_spam_patch() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -1712,8 +1588,7 @@ public void test_mail_settings_forward_spam_patch() throws IOException { @Test public void test_mail_settings_forward_spam_get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -1725,8 +1600,7 @@ public void test_mail_settings_forward_spam_get() throws IOException { @Test public void test_mail_settings_plain_content_patch() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -1739,8 +1613,7 @@ public void test_mail_settings_plain_content_patch() throws IOException { @Test public void test_mail_settings_plain_content_get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -1752,8 +1625,7 @@ public void test_mail_settings_plain_content_get() throws IOException { @Test public void test_mail_settings_spam_check_patch() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -1766,8 +1638,7 @@ public void test_mail_settings_spam_check_patch() throws IOException { @Test public void test_mail_settings_spam_check_get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -1779,8 +1650,7 @@ public void test_mail_settings_spam_check_get() throws IOException { @Test public void test_mail_settings_template_patch() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -1793,8 +1663,7 @@ public void test_mail_settings_template_patch() throws IOException { @Test public void test_mail_settings_template_get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -1806,8 +1675,7 @@ public void test_mail_settings_template_get() throws IOException { @Test public void test_mailbox_providers_stats_get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -1825,8 +1693,7 @@ public void test_mailbox_providers_stats_get() throws IOException { @Test public void test_partner_settings_get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -1840,8 +1707,7 @@ public void test_partner_settings_get() throws IOException { @Test public void test_partner_settings_new_relic_patch() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -1854,8 +1720,7 @@ public void test_partner_settings_new_relic_patch() throws IOException { @Test public void test_partner_settings_new_relic_get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -1867,8 +1732,7 @@ public void test_partner_settings_new_relic_get() throws IOException { @Test public void test_scopes_get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -1880,8 +1744,7 @@ public void test_scopes_get() throws IOException { @Test public void test_senders_post() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "201"); Request request = new Request(); @@ -1894,8 +1757,7 @@ public void test_senders_post() throws IOException { @Test public void test_senders_get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -1907,8 +1769,7 @@ public void test_senders_get() throws IOException { @Test public void test_senders__sender_id__patch() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -1921,8 +1782,7 @@ public void test_senders__sender_id__patch() throws IOException { @Test public void test_senders__sender_id__get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -1934,8 +1794,7 @@ public void test_senders__sender_id__get() throws IOException { @Test public void test_senders__sender_id__delete() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "204"); Request request = new Request(); @@ -1947,8 +1806,7 @@ public void test_senders__sender_id__delete() throws IOException { @Test public void test_senders__sender_id__resend_verification_post() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "204"); Request request = new Request(); @@ -1960,8 +1818,7 @@ public void test_senders__sender_id__resend_verification_post() throws IOExcepti @Test public void test_stats_get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -1978,8 +1835,7 @@ public void test_stats_get() throws IOException { @Test public void test_subusers_post() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -1992,8 +1848,7 @@ public void test_subusers_post() throws IOException { @Test public void test_subusers_get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -2008,8 +1863,7 @@ public void test_subusers_get() throws IOException { @Test public void test_subusers_reputations_get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -2022,8 +1876,7 @@ public void test_subusers_reputations_get() throws IOException { @Test public void test_subusers_stats_get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -2041,8 +1894,7 @@ public void test_subusers_stats_get() throws IOException { @Test public void test_subusers_stats_monthly_get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -2060,8 +1912,7 @@ public void test_subusers_stats_monthly_get() throws IOException { @Test public void test_subusers_stats_sums_get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -2080,8 +1931,7 @@ public void test_subusers_stats_sums_get() throws IOException { @Test public void test_subusers__subuser_name__patch() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "204"); Request request = new Request(); @@ -2094,8 +1944,7 @@ public void test_subusers__subuser_name__patch() throws IOException { @Test public void test_subusers__subuser_name__delete() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "204"); Request request = new Request(); @@ -2107,8 +1956,7 @@ public void test_subusers__subuser_name__delete() throws IOException { @Test public void test_subusers__subuser_name__ips_put() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -2121,8 +1969,7 @@ public void test_subusers__subuser_name__ips_put() throws IOException { @Test public void test_subusers__subuser_name__monitor_put() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -2135,8 +1982,7 @@ public void test_subusers__subuser_name__monitor_put() throws IOException { @Test public void test_subusers__subuser_name__monitor_post() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -2149,8 +1995,7 @@ public void test_subusers__subuser_name__monitor_post() throws IOException { @Test public void test_subusers__subuser_name__monitor_get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -2162,8 +2007,7 @@ public void test_subusers__subuser_name__monitor_get() throws IOException { @Test public void test_subusers__subuser_name__monitor_delete() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "204"); Request request = new Request(); @@ -2175,8 +2019,7 @@ public void test_subusers__subuser_name__monitor_delete() throws IOException { @Test public void test_subusers__subuser_name__stats_monthly_get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -2193,8 +2036,7 @@ public void test_subusers__subuser_name__stats_monthly_get() throws IOException @Test public void test_suppression_blocks_get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -2210,8 +2052,7 @@ public void test_suppression_blocks_get() throws IOException { @Test public void test_suppression_blocks_delete() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "204"); Request request = new Request(); @@ -2224,8 +2065,7 @@ public void test_suppression_blocks_delete() throws IOException { @Test public void test_suppression_blocks__email__get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -2237,8 +2077,7 @@ public void test_suppression_blocks__email__get() throws IOException { @Test public void test_suppression_blocks__email__delete() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "204"); Request request = new Request(); @@ -2250,8 +2089,7 @@ public void test_suppression_blocks__email__delete() throws IOException { @Test public void test_suppression_bounces_get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -2265,8 +2103,7 @@ public void test_suppression_bounces_get() throws IOException { @Test public void test_suppression_bounces_delete() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "204"); Request request = new Request(); @@ -2279,8 +2116,7 @@ public void test_suppression_bounces_delete() throws IOException { @Test public void test_suppression_bounces__email__get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -2292,8 +2128,7 @@ public void test_suppression_bounces__email__get() throws IOException { @Test public void test_suppression_bounces__email__delete() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "204"); Request request = new Request(); @@ -2306,8 +2141,7 @@ public void test_suppression_bounces__email__delete() throws IOException { @Test public void test_suppression_invalid_emails_get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -2323,8 +2157,7 @@ public void test_suppression_invalid_emails_get() throws IOException { @Test public void test_suppression_invalid_emails_delete() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "204"); Request request = new Request(); @@ -2337,8 +2170,7 @@ public void test_suppression_invalid_emails_delete() throws IOException { @Test public void test_suppression_invalid_emails__email__get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -2350,8 +2182,7 @@ public void test_suppression_invalid_emails__email__get() throws IOException { @Test public void test_suppression_invalid_emails__email__delete() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "204"); Request request = new Request(); @@ -2363,8 +2194,7 @@ public void test_suppression_invalid_emails__email__delete() throws IOException @Test public void test_suppression_spam_report__email__get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -2376,8 +2206,7 @@ public void test_suppression_spam_report__email__get() throws IOException { @Test public void test_suppression_spam_report__email__delete() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "204"); Request request = new Request(); @@ -2389,8 +2218,7 @@ public void test_suppression_spam_report__email__delete() throws IOException { @Test public void test_suppression_spam_reports_get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -2406,8 +2234,7 @@ public void test_suppression_spam_reports_get() throws IOException { @Test public void test_suppression_spam_reports_delete() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "204"); Request request = new Request(); @@ -2420,8 +2247,7 @@ public void test_suppression_spam_reports_delete() throws IOException { @Test public void test_suppression_unsubscribes_get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -2437,8 +2263,7 @@ public void test_suppression_unsubscribes_get() throws IOException { @Test public void test_templates_post() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "201"); Request request = new Request(); @@ -2451,8 +2276,7 @@ public void test_templates_post() throws IOException { @Test public void test_templates_get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -2464,8 +2288,7 @@ public void test_templates_get() throws IOException { @Test public void test_templates__template_id__patch() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -2478,8 +2301,7 @@ public void test_templates__template_id__patch() throws IOException { @Test public void test_templates__template_id__get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -2491,8 +2313,7 @@ public void test_templates__template_id__get() throws IOException { @Test public void test_templates__template_id__delete() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "204"); Request request = new Request(); @@ -2504,8 +2325,7 @@ public void test_templates__template_id__delete() throws IOException { @Test public void test_templates__template_id__versions_post() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "201"); Request request = new Request(); @@ -2518,8 +2338,7 @@ public void test_templates__template_id__versions_post() throws IOException { @Test public void test_templates__template_id__versions__version_id__patch() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -2532,8 +2351,7 @@ public void test_templates__template_id__versions__version_id__patch() throws IO @Test public void test_templates__template_id__versions__version_id__get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -2545,8 +2363,7 @@ public void test_templates__template_id__versions__version_id__get() throws IOEx @Test public void test_templates__template_id__versions__version_id__delete() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "204"); Request request = new Request(); @@ -2558,8 +2375,7 @@ public void test_templates__template_id__versions__version_id__delete() throws I @Test public void test_templates__template_id__versions__version_id__activate_post() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -2571,8 +2387,7 @@ public void test_templates__template_id__versions__version_id__activate_post() t @Test public void test_tracking_settings_get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -2586,8 +2401,7 @@ public void test_tracking_settings_get() throws IOException { @Test public void test_tracking_settings_click_patch() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -2600,8 +2414,7 @@ public void test_tracking_settings_click_patch() throws IOException { @Test public void test_tracking_settings_click_get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -2613,8 +2426,7 @@ public void test_tracking_settings_click_get() throws IOException { @Test public void test_tracking_settings_google_analytics_patch() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -2627,8 +2439,7 @@ public void test_tracking_settings_google_analytics_patch() throws IOException { @Test public void test_tracking_settings_google_analytics_get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -2640,8 +2451,7 @@ public void test_tracking_settings_google_analytics_get() throws IOException { @Test public void test_tracking_settings_open_patch() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -2654,8 +2464,7 @@ public void test_tracking_settings_open_patch() throws IOException { @Test public void test_tracking_settings_open_get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -2667,8 +2476,7 @@ public void test_tracking_settings_open_get() throws IOException { @Test public void test_tracking_settings_subscription_patch() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -2681,8 +2489,7 @@ public void test_tracking_settings_subscription_patch() throws IOException { @Test public void test_tracking_settings_subscription_get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -2694,8 +2501,7 @@ public void test_tracking_settings_subscription_get() throws IOException { @Test public void test_user_account_get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -2707,8 +2513,7 @@ public void test_user_account_get() throws IOException { @Test public void test_user_credits_get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -2720,8 +2525,7 @@ public void test_user_credits_get() throws IOException { @Test public void test_user_email_put() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -2734,8 +2538,7 @@ public void test_user_email_put() throws IOException { @Test public void test_user_email_get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -2747,8 +2550,7 @@ public void test_user_email_get() throws IOException { @Test public void test_user_password_put() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -2761,8 +2563,7 @@ public void test_user_password_put() throws IOException { @Test public void test_user_profile_patch() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -2775,8 +2576,7 @@ public void test_user_profile_patch() throws IOException { @Test public void test_user_profile_get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -2788,8 +2588,7 @@ public void test_user_profile_get() throws IOException { @Test public void test_user_scheduled_sends_post() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "201"); Request request = new Request(); @@ -2802,8 +2601,7 @@ public void test_user_scheduled_sends_post() throws IOException { @Test public void test_user_scheduled_sends_get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -2815,8 +2613,7 @@ public void test_user_scheduled_sends_get() throws IOException { @Test public void test_user_scheduled_sends__batch_id__patch() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "204"); Request request = new Request(); @@ -2829,8 +2626,7 @@ public void test_user_scheduled_sends__batch_id__patch() throws IOException { @Test public void test_user_scheduled_sends__batch_id__get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -2842,8 +2638,7 @@ public void test_user_scheduled_sends__batch_id__get() throws IOException { @Test public void test_user_scheduled_sends__batch_id__delete() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "204"); Request request = new Request(); @@ -2855,8 +2650,7 @@ public void test_user_scheduled_sends__batch_id__delete() throws IOException { @Test public void test_user_settings_enforced_tls_patch() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -2869,8 +2663,7 @@ public void test_user_settings_enforced_tls_patch() throws IOException { @Test public void test_user_settings_enforced_tls_get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -2882,8 +2675,7 @@ public void test_user_settings_enforced_tls_get() throws IOException { @Test public void test_user_username_put() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -2896,8 +2688,7 @@ public void test_user_username_put() throws IOException { @Test public void test_user_username_get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -2909,8 +2700,7 @@ public void test_user_username_get() throws IOException { @Test public void test_user_webhooks_event_settings_patch() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -2923,8 +2713,7 @@ public void test_user_webhooks_event_settings_patch() throws IOException { @Test public void test_user_webhooks_event_settings_get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -2936,8 +2725,7 @@ public void test_user_webhooks_event_settings_get() throws IOException { @Test public void test_user_webhooks_event_test_post() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "204"); Request request = new Request(); @@ -2950,8 +2738,7 @@ public void test_user_webhooks_event_test_post() throws IOException { @Test public void test_user_webhooks_parse_settings_post() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "201"); Request request = new Request(); @@ -2964,8 +2751,7 @@ public void test_user_webhooks_parse_settings_post() throws IOException { @Test public void test_user_webhooks_parse_settings_get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -2977,8 +2763,7 @@ public void test_user_webhooks_parse_settings_get() throws IOException { @Test public void test_user_webhooks_parse_settings__hostname__patch() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -2991,8 +2776,7 @@ public void test_user_webhooks_parse_settings__hostname__patch() throws IOExcept @Test public void test_user_webhooks_parse_settings__hostname__get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -3004,8 +2788,7 @@ public void test_user_webhooks_parse_settings__hostname__get() throws IOExceptio @Test public void test_user_webhooks_parse_settings__hostname__delete() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "204"); Request request = new Request(); @@ -3017,8 +2800,7 @@ public void test_user_webhooks_parse_settings__hostname__delete() throws IOExcep @Test public void test_user_webhooks_parse_stats_get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -3035,8 +2817,7 @@ public void test_user_webhooks_parse_stats_get() throws IOException { @Test public void test_whitelabel_domains_post() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "201"); Request request = new Request(); @@ -3049,8 +2830,7 @@ public void test_whitelabel_domains_post() throws IOException { @Test public void test_whitelabel_domains_get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -3067,8 +2847,7 @@ public void test_whitelabel_domains_get() throws IOException { @Test public void test_whitelabel_domains_default_get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -3080,8 +2859,7 @@ public void test_whitelabel_domains_default_get() throws IOException { @Test public void test_whitelabel_domains_subuser_get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -3093,8 +2871,7 @@ public void test_whitelabel_domains_subuser_get() throws IOException { @Test public void test_whitelabel_domains_subuser_delete() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "204"); Request request = new Request(); @@ -3106,8 +2883,7 @@ public void test_whitelabel_domains_subuser_delete() throws IOException { @Test public void test_whitelabel_domains__domain_id__patch() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -3120,8 +2896,7 @@ public void test_whitelabel_domains__domain_id__patch() throws IOException { @Test public void test_whitelabel_domains__domain_id__get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -3133,8 +2908,7 @@ public void test_whitelabel_domains__domain_id__get() throws IOException { @Test public void test_whitelabel_domains__domain_id__delete() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "204"); Request request = new Request(); @@ -3146,8 +2920,7 @@ public void test_whitelabel_domains__domain_id__delete() throws IOException { @Test public void test_whitelabel_domains__domain_id__subuser_post() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "201"); Request request = new Request(); @@ -3160,8 +2933,7 @@ public void test_whitelabel_domains__domain_id__subuser_post() throws IOExceptio @Test public void test_whitelabel_domains__id__ips_post() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -3174,8 +2946,7 @@ public void test_whitelabel_domains__id__ips_post() throws IOException { @Test public void test_whitelabel_domains__id__ips__ip__delete() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -3187,8 +2958,7 @@ public void test_whitelabel_domains__id__ips__ip__delete() throws IOException { @Test public void test_whitelabel_domains__id__validate_post() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -3200,8 +2970,7 @@ public void test_whitelabel_domains__id__validate_post() throws IOException { @Test public void test_whitelabel_ips_post() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "201"); Request request = new Request(); @@ -3214,8 +2983,7 @@ public void test_whitelabel_ips_post() throws IOException { @Test public void test_whitelabel_ips_get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -3230,8 +2998,7 @@ public void test_whitelabel_ips_get() throws IOException { @Test public void test_whitelabel_ips__id__get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -3243,8 +3010,7 @@ public void test_whitelabel_ips__id__get() throws IOException { @Test public void test_whitelabel_ips__id__delete() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "204"); Request request = new Request(); @@ -3256,8 +3022,7 @@ public void test_whitelabel_ips__id__delete() throws IOException { @Test public void test_whitelabel_ips__id__validate_post() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -3269,8 +3034,7 @@ public void test_whitelabel_ips__id__validate_post() throws IOException { @Test public void test_whitelabel_links_post() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "201"); Request request = new Request(); @@ -3285,8 +3049,7 @@ public void test_whitelabel_links_post() throws IOException { @Test public void test_whitelabel_links_get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -3299,8 +3062,7 @@ public void test_whitelabel_links_get() throws IOException { @Test public void test_whitelabel_links_default_get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -3313,8 +3075,7 @@ public void test_whitelabel_links_default_get() throws IOException { @Test public void test_whitelabel_links_subuser_get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -3327,8 +3088,7 @@ public void test_whitelabel_links_subuser_get() throws IOException { @Test public void test_whitelabel_links_subuser_delete() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "204"); Request request = new Request(); @@ -3341,8 +3101,7 @@ public void test_whitelabel_links_subuser_delete() throws IOException { @Test public void test_whitelabel_links__id__patch() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -3355,8 +3114,7 @@ public void test_whitelabel_links__id__patch() throws IOException { @Test public void test_whitelabel_links__id__get() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -3368,8 +3126,7 @@ public void test_whitelabel_links__id__get() throws IOException { @Test public void test_whitelabel_links__id__delete() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "204"); Request request = new Request(); @@ -3381,8 +3138,7 @@ public void test_whitelabel_links__id__delete() throws IOException { @Test public void test_whitelabel_links__id__validate_post() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); @@ -3394,8 +3150,7 @@ public void test_whitelabel_links__id__validate_post() throws IOException { @Test public void test_whitelabel_links__link_id__subuser_post() throws IOException { - SendGrid sg = new SendGrid("SENDGRID_API_KEY", true); - sg.setHost("localhost:4010"); + SendGrid sg = new SendGrid("SENDGRID_API_KEY"); sg.addRequestHeader("X-Mock", "200"); Request request = new Request(); diff --git a/test/prism.sh b/test/prism.sh deleted file mode 100755 index d6e0f251..00000000 --- a/test/prism.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash - -install () { - -set -eu - -UNAME=$(uname) -ARCH=$(uname -m) -if [ "$UNAME" != "Linux" ] && [ "$UNAME" != "Darwin" ] && [ "$ARCH" != "x86_64" ] && [ "$ARCH" != "i686" ]; then - echo "Sorry, OS/Architecture not supported: ${UNAME}/${ARCH}. Download binary from https://github.com/stoplightio/prism/releases" - exit 1 -fi - -if [ "$UNAME" = "Darwin" ] ; then - OSX_ARCH=$(uname -m) - if [ "${OSX_ARCH}" = "x86_64" ] ; then - PLATFORM="darwin_amd64" - fi -elif [ "$UNAME" = "Linux" ] ; then - LINUX_ARCH=$(uname -m) - if [ "${LINUX_ARCH}" = "i686" ] ; then - PLATFORM="linux_386" - elif [ "${LINUX_ARCH}" = "x86_64" ] ; then - PLATFORM="linux_amd64" - fi -fi - -#LATEST=$(curl -s https://api.github.com/repos/stoplightio/prism/tags | grep -Eo '"name":.*?[^\\]",' | head -n 1 | sed 's/[," ]//g' | cut -d ':' -f 2) -LATEST="v0.1.5" -URL="https://github.com/stoplightio/prism/releases/download/$LATEST/prism_$PLATFORM" -DEST=./prism/bin/prism - -if [ -z $LATEST ] ; then - echo "Error requesting. Download binary from ${URL}" - exit 1 -else - curl -L $URL -o $DEST - chmod +x $DEST -fi -} - -install