@Test public void emptyString_ReturnsEmptyByteBuffer() throws IOException { ByteBuffer byteBuffer = adapter.adapt(""); assertEquals(0, byteBuffer.remaining()); }
@Override public ByteBuffer adapt(String source) { if (source == null) { return null; } else { return ByteBuffer.wrap(source.getBytes(StringUtils.UTF8)); } }
StringToByteBufferAdapter implements TypeAdapter<String, ByteBuffer> { @Override public ByteBuffer adapt(String source) { if (source == null) { return null; } else { return ByteBuffer.wrap(source.getBytes(StringUtils.UTF8)); } } }
StringToByteBufferAdapter implements TypeAdapter<String, ByteBuffer> { @Override public ByteBuffer adapt(String source) { if (source == null) { return null; } else { return ByteBuffer.wrap(source.getBytes(StringUtils.UTF8)); } }  }
StringToByteBufferAdapter implements TypeAdapter<String, ByteBuffer> { @Override public ByteBuffer adapt(String source) { if (source == null) { return null; } else { return ByteBuffer.wrap(source.getBytes(StringUtils.UTF8)); } }  @Override ByteBuffer adapt(String source); }
StringToByteBufferAdapter implements TypeAdapter<String, ByteBuffer> { @Override public ByteBuffer adapt(String source) { if (source == null) { return null; } else { return ByteBuffer.wrap(source.getBytes(StringUtils.UTF8)); } }  @Override ByteBuffer adapt(String source);  }