Skip to content

Instantly share code, notes, and snippets.

@with-heart
Created July 24, 2017 00:04
Show Gist options
  • Save with-heart/362b1488343f74ffac9f57b2b8c9548d to your computer and use it in GitHub Desktop.
Save with-heart/362b1488343f74ffac9f57b2b8c9548d to your computer and use it in GitHub Desktop.
@Test
fun `should replace encrypted string in uri with decrypted value`() {
val encrypted = "ABCDEFG123456"
val decrypted = encrypted.reversed()
val startUri = "/endpoint/$encrypted"
request.requestURI = startUri
filter.run()
val ctx = RequestContext.getCurrentContext()
val endUri = ctx.request.requestURI
assertEquals(
"/endpoint/$decrypted",
endUri
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment