GryoPool { public static GryoPool.Builder build() { return new GryoPool.Builder(); } private  GryoPool(); static GryoPool.Builder build(); GryoMapper getMapper(); Kryo takeKryo(); GryoReader takeReader(); GryoWriter takeWriter(); void offerKryo(final Kryo kryo); void offerReader(final GryoReader gryoReader); void offerWriter(final GryoWriter gryoWriter); A readWithKryo(final Function<Kryo, A> kryoFunction); void writeWithKryo(final Consumer<Kryo> kryoConsumer); A doWithReader(final Function<GryoReader, A> readerFunction); void doWithWriter(final Consumer<GryoWriter> writerFunction); static final String CONFIG_IO_GRYO_POOL_SIZE; static final String CONFIG_IO_GRYO_VERSION; static final int CONFIG_IO_GRYO_POOL_SIZE_DEFAULT; static final GryoVersion CONFIG_IO_GRYO_POOL_VERSION_DEFAULT; }
@Test(expected = IllegalStateException.class) public void shouldConfigPoolOnConstructionWithoutBadIoRegistryAndFail() throws Exception { final Configuration conf = new BaseConfiguration(); conf.setProperty(IoRegistry.IO_REGISTRY, "some.class.that.does.not.exist"); GryoPool.build().ioRegistries(conf.getList(IoRegistry.IO_REGISTRY, Collections.emptyList())).create(); }