Skip to content

Instantly share code, notes, and snippets.

@with-heart
Last active July 24, 2017 00:31
Show Gist options
  • Save with-heart/51419eac57182a969490e54f1c20804d to your computer and use it in GitHub Desktop.
Save with-heart/51419eac57182a969490e54f1c20804d to your computer and use it in GitHub Desktop.
@Test
fun `should replace encrypted string in query param with decrypted value`() {
val encrypted = "ABCDEFG123456"
val decrypted = encrypted.reversed()
val ctx = RequestContext.getCurrentContext()
ctx.requestQueryParams = mutableMapOf(
"encryptedValue" to listOf(encrypted)
)
filter.run()
val params = ctx.requestQueryParams
assertEquals(decrypted, params["encryptedValue"]!![0])
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment