### Question:
FolderNameCodec { public String encode(String folderName) { ByteBuffer byteBuffer = modifiedUtf7Charset.encode(folderName); byte[] bytes = new byte[byteBuffer.limit()]; byteBuffer.get(bytes); return new String(bytes, asciiCharset); } private  FolderNameCodec(); static FolderNameCodec newInstance(); String encode(String folderName); String decode(String encodedFolderName);  }### Answer:
@Test public void encode_withAsciiArgument_shouldReturnInput() throws Exception { String folderName = "ASCII"; String result = folderNameCode.encode(folderName); assertEquals(folderName, result); }
@Test public void encode_withNonAsciiArgument_shouldReturnEncodedString() throws Exception { String folderName = "über"; String result = folderNameCode.encode(folderName); assertEquals("&APw-ber", result); }