Encoding { @NonNull public String fromBase64ToString(@NonNull String value) { return new String(fromBase64ToBytes(value), SSCharset.CHARSET); }  @NonNull String toBase64(@NonNull String value); @NonNull String fromBase64ToString(@NonNull String value); @NonNull String toBase64(@NonNull byte[] value); @NonNull byte[] fromBase64ToBytes(@NonNull String value);  }
@Test public void fromBase64ToString_ShouldDecodeToBase64String() { PowerMockito.when(Base64.decode(TEST_VALUE_BASE64.getBytes(SSCharset.CHARSET), Base64.NO_WRAP)) .thenReturn(TEST_VALUE.getBytes(SSCharset.CHARSET)); Assert.assertEquals(TEST_VALUE, encoding.fromBase64ToString(TEST_VALUE_BASE64)); }