anchor.diff:          password: PASSWORD
           email: EMAIL-ADDRESS
       ```
  -
  -    Replace the values in the above format as follows:
  -    * **UAA-HOSTNAME**: The FQDN of UAA app. Example: `uaa.example.org`
  -    * **USERNAME**: A valid username. Example: `dev@example.org`
  -    * **PASSWORD**: Password for the above username.
  -    * **EMAIL-ADDRESS**: Email address for the above user. Example: `dev@example.org`
  -
  -1. From the `uaa/uaa` directory, run `CLOUD_FOUNDRY_CONFIG_PATH=/tmp ./gradlew test`.
  -
  -1. The web app looks for a YAML file in the following locations when it starts, with later entries overriding earlier ones:
  -
  -    ```yaml
  -    classpath:uaa.yml
  -    file:${CLOUD_FOUNDRY_CONFIG_PATH}/uaa.yml
  -    file:${UAA_CONFIG_FILE}
  -    ${UAA_CONFIG_URL}
  -    ```
  -
  -###<a id='gradle-test'></a>Test with PostgreSQL or MySQL ###
  -
  -The default UAA unit tests, `./gradlew test`, use HyperSQL (hsqldb). 
  -
  -To use a different database management system, create a `uaa.yml` file containing `spring_profiles: default,OTHER-DBMS` in the `src/main/resources/` directory. Replace `OTHER-DBMS` with the name of the other database management system to use.
  -
  -For example, run the following command to run the unit tests using PostgreSQL instead of hsqldb:
  -
  -<pre class="terminal">
  -$ echo "spring_profiles: default,postgresql" > src/main/resources/uaa.yml
  -$ ./gradlew test integrationTest
  -</pre>
  -
  -Run the following command to run the unit tests using MySQL instead of hsqldb:
  -
  -<pre class="terminal">
  -$ echo "spring_profiles: default,mysql" > src/main/resources/uaa.yml
  -$ ./gradlew test integrationTest
  -</pre>
  +    Where:
  +    * `UAA-HOSTNAME` is the FQDN of UAA app. For example, `uaa.example.org`.
  +    * `USERNAME` is a valid username. For example, `dev@example.org`.
  +    * `PASSWORD` is the assword for the above username.
  +    * `EMAIL-ADDRESS` is the email address for the above user. Example: `dev@example.org`.
  +
  +1. From the `uaa/uaa` directory, run:
  +
  +    ```
  +    CLOUD_FOUNDRY_CONFIG_PATH=/tmp ./gradlew test
  +    ```
  +
  +The web app looks for a YAML file in the following locations when it starts, with later entries overriding earlier ones:
  +
  +  ```
  +  classpath:uaa.yml
  +  file:${CLOUD_FOUNDRY_CONFIG_PATH}/uaa.yml
  +  file:${UAA_CONFIG_FILE}
  +  ${UAA_CONFIG_URL}
  +  ```
  +
  +### <a id='gradle-test'></a> Test with PostgreSQL or MySQL
  +
  +The default UAA unit tests, `./gradlew test`, use a HyperSQL database. 
  +
  +To use a different database management system:
  +
  +1. Create a `uaa.yml` file containing `spring_profiles: default,OTHER-DBMS` in the `src/main/resources/` directory. Replace `OTHER-DBMS` with the name of the other database management system to use.
  +
  +1. Run the unit tests using your specified database management system instead of a HyperSQL database:
  +
  +    ```
  +    echo "spring_profiles: default,OTHER-DBMS" > src/main/resources/uaa.yml
  +    ./gradlew test integrationTest
  +    ```
  +    Where `OTHER-DBMS` is the name of the database management system you specified in your `uaa.yml` file.
   
   You can find the database configuration for the common and scim modules at `common/src/test/resources/(mysql|postgresql).properties` and `scim/src/test/resources/(mysql|postgresql).properties`.
   
  -## <a id='projects'></a>UAA Projects ##
  +
  +## <a id='projects'></a> UAA Projects
   
   The following UAA projects exist:
   
  
positive.code:       aud: scim clients uaa admin
      </pre>
  
  ### <a id='cf'></a>Deploy UAA to <%= vars.product_short %> ###
  
  Follow the instructions below to build the UAA as an app and push it to <%= vars.product_short %> using the Cloud Foundry Command Line Interface (cf CLI). 
  
  1. In a terminal window, clone the UAA GitHub repository. 
  
      <pre class="terminal">
      $ git clone git://github.com/cloudfoundry/uaa.git
      </pre>
  
  2. Navigate to the directory where you cloned the UAA GitHub repository, then run the `./gradlew :cloudfoundry-identity-uaa:war` command build the UAA as a WAR file. 
  
      <pre class="terminal">
      $ cd uaa
      $ ./gradlew :cloudfoundry-identity-uaa:war
      </pre>
  
  3. Run the cf CLI `cf push APP-NAME -m 512M -p PATH-TO-WAR-FILE --no-start` command to push the app to <%= vars.product_short %>. Replace `APP-NAME` with a name for your UAA app, and `PATH-TO-WAR-FILE` with the path to the WAR file you created in the previous step. For example:
  
      <pre class="terminal">
      $ cf push MYUAA -m 512M -p uaa/build/libs/cloudfoundry-identity-uaa-1.8.0.war --no-start
      </pre>
  
  4. Run `cf set-env APP-NAME SPRING_PROFILES_ACTIVE default` to set the `SPRING_PROFILES_ACTIVE` environment variable with the value `default`. Replace `APP-NAME` with the name of your app that you used in the previous step. For example:
  
      <pre class="terminal">
      $ cf set-env MYUAA SPRING_PROFILES_ACTIVE default
      </pre>
  
  5. Run `cf start APP-NAME` to start your app. Replace `APP-NAME` with the name of your app. For example:
  
      <pre class="terminal">
      $ cf start MYUAA
      </pre>
  
  ### <a id='demo-hosted'></a>Use Remote UAA ###
  
  You use a UAA server that you pushed as an app to <%= vars.product_short %> in a similar way to one you [run locally](#demo-local). You do not need app token encoding because you do not have the client secret.
  
  Follow the steps below to access and use a UAA server that you pushed as an app to <%= vars.product_short %>.
  
  
  1. [Deploy UAA to <%= vars.product_short %>](#cf) as described above. 
  
  1. From the project base directory, run `curl -H "Accept: application/json" APP-FQDN/login` to query the external login endpoint about the system. Replace `APP-FQDN` with the FQDN of your app. For example:
  
      <pre class="terminal">
      $ curl -H "Accept: application/json" uaa.example.org/login
  
negative.code:     }
      </pre>
  
  1. To install the <%= vars.product_short %> UAA Command Line Client (UAAC) Ruby gem, run:
  
      ```
      gem install cf-uaac
      ```
  
  1. To target the local UAA server endpoint, run:
  
      ```
      uaac target http://localhost:8080/uaa
      ```
  
  1. Run `uaac token client get CLIENT_NAME -s CLIENT_SECRET` to obtain an access token. Replace `CLIENT_NAME` and `CLIENT_SECRET` with actual values. For example, when starting up the UAA locally for development, there should be a predefined admin client you can use:
  
      ```
      uaac token client get admin -s adminsecret
      ```
      If you run the command without `-s CLIENT_SECRET`, UAAC shows an interactive prompt where you must create the client secret value. The `uaac token client get` command requests an access token from the server using the OAuth2 client credentials grant type. For more information about the OAuth2 client credentials, see [Client Credentials](https://tools.ietf.org/html/rfc6749#section-1.3.4) in the OAuth 2.0 Authorization Framework.
      
  1. View your UAAC token context. When UAAC obtains a token, the token and other metadata is stored in the `~/.uaac.yml` file on your local machine. To view the token you have obtained, run `uaac context`. For example:
  
      <pre class="terminal">
      $ uaac context
  