package pages

import uk.gov.dvla.vehicles.presentation.common.ConfigProperties.getProperty

package object acquire {
  private final val applicationContext = getProperty("application.context", default = "/")

  def buildAppUrl(urlPart: String) = {
    val appContextWithSlash = if (!applicationContext.endsWith("/")) s"$applicationContext/" else applicationContext
    val urlPartWithoutSlash = urlPart.dropWhile(_ == '/')

    appContextWithSlash + urlPartWithoutSlash
  }
}

package pages

import uk.gov.dvla.vehicles.presentation.common.ConfigProperties.getProperty

package object acquire {
  private final val applicationContext = getProperty("application.context", default = "/")

  def buildAppUrl(urlPart: String) = {
    val appContextWithSlash = if (!applicationContext.endsWith("/")) s"/$applicationContext" else applicationContext
    val urlPartWithoutSlash = urlPart.dropWhile(_ == '/')

    appContextWithSlash + urlPartWithoutSlash
  }
}

--- 
+++ 
@@ -6,7 +6,7 @@
   private final val applicationContext = getProperty("application.context", default = "/")
 
   def buildAppUrl(urlPart: String) = {
-    val appContextWithSlash = if (!applicationContext.endsWith("/")) s"/$applicationContext" else applicationContext
+    val appContextWithSlash = if (!applicationContext.endsWith("/")) s"$applicationContext/" else applicationContext
     val urlPartWithoutSlash = urlPart.dropWhile(_ == '/')
 
     appContextWithSlash + urlPartWithoutSlash
Add method to build app urls correctly
