dan-s1 commented on code in PR #8417:
URL: https://github.com/apache/nifi/pull/8417#discussion_r1492652027


##########
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestEncodeContent.java:
##########
@@ -123,43 +122,275 @@ public void testFailDecodeNotBase32() throws IOException 
{
         testRunner.assertAllFlowFilesTransferred(EncodeContent.REL_FAILURE, 1);
     }
 
-    @Test
-    public void testHexRoundTrip() throws IOException {
-        final TestRunner testRunner = TestRunners.newTestRunner(new 
EncodeContent());
+    @Test void testEncodeDecodeSpecialCharsBase64() {
+        final String specialChars = "!@#$%^&*()_+{}:\"<>?[];',./~`-=";
+        final String expectedOutput = 
"IUAjJCVeJiooKV8re306Ijw+P1tdOycsLi9+YC09" + System.lineSeparator();
 
-        testRunner.setProperty(EncodeContent.MODE, EncodeContent.ENCODE_MODE);
-        testRunner.setProperty(EncodeContent.ENCODING, 
EncodeContent.HEX_ENCODING);
+        executeTestSuccessHelper(EncodingMode.ENCODE, 
EncodingType.BASE64_ENCODING, specialChars, expectedOutput);
+        testRunner.clearTransferState(); // clear the state for the next test
+        executeTestSuccessHelper(EncodingMode.DECODE, 
EncodingType.BASE64_ENCODING, expectedOutput, specialChars);
+    }
 
-        testRunner.enqueue(FILE_PATH);
-        testRunner.clearTransferState();
-        testRunner.run();
+    @Test void testBasicDecodeBase32() {

Review Comment:
   ```suggestion
       @Test 
       void testBasicDecodeBase32() {
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@nifi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to