Code example for Charset

Methods: encode

0
			super(hostname, port, pool);
		} 
 
		@Override 
		public ByteBuffer serialise(String message) {
			return utf8.encode(message);
		} 
	} 
	 
	@Test 
	public void testJobPoolProducer() throws TTransportException { 
		@SuppressWarnings("unused") 
		Producer<String> producer = new TestJobPoolProducer(HOSTNAME, PORT, POOL);
		 
		verify(mockFactory).createClient(HOSTNAME, PORT);
	} 
 
	@Test 
	public void testAdd() throws PoolException, NoSuchPool, TException { 
		when(mockFactory.createClient(HOSTNAME, PORT)).thenReturn(mockClient);