I'm trying to make a test in akka with Scala. I need to test if some image is ".jpeg". I my function, I've to see the ContentType -> MediaType. And in the function it's not a problem 'cause I get the image from the Computer, but to test I've to create a "Mock up".
I was trying first with ContentTypes:
val httpResponse = HttpEntity(ContentTypes.`text/plain(UTF-8)`,"image")
but the problem is, that it should be image/jpeg
and not text/...
but there's not that option.
Then, I was trying:
val httpResponse = HttpEntity(MediaTypes.`image/jpeg`, )
And that's pretty nice, but I don't know what to write after the comma. I don't even know, if it's so.
I was looking here but I didn't find an answer.
And I saw another posts, like this but I didn't help me.