Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import org.objenesis.strategy.StdInstantiatorStrategy
- import org.scalatest.{FlatSpecLike, Matchers}
- class MyTest extends FlatSpecLike with Matchers {
- "the test" should "hasKnownProfiles" in {
- import com.twitter.chill.{KryoInstantiator, KryoPool}
- val POOL_SIZE = 10
- val instantiator: KryoInstantiator = new KryoInstantiator()
- .setInstantiatorStrategy(new StdInstantiatorStrategy)
- val kryo = KryoPool.withByteArrayOutputStream(POOL_SIZE, instantiator)
- val scalaMap = Map("Hello" -> Seq(Map("toto" -> "caca")))
- val ser = kryo.toBytesWithClass(scalaMap)
- val der = kryo.fromBytes(ser)
- der shouldEqual (scalaMap)
- }
- }
Add Comment
Please, Sign In to add comment