Skip to content

Commit

Permalink
Unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vvijayaraman committed Oct 27, 2023
1 parent 9fc9a76 commit fc1b130
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,11 @@ void testMask_fail_safe() {
EJMask.addFilter(50, "(auth)=([^\\\"]{1,10})[^&]*", "$1xxxx");
String content = "{\"firstName\":\"sensitive data\",\"lastName\":\"sensitive data\",\"nonSensitiveData\":\"firstName\"}";
String result = EJMask.mask(content);
Assertions.assertEquals("masking sensitive content failed due to mock exception please ignore", result);
Assertions.assertTrue(result.contains("masking sensitive content failed due to java.lang.RuntimeException: mock exception please ignore\n" +
"\tat com.ebay.ejmask.api.IContentProcessor.preProcess(IContentProcessor.java:44)\n" +
"\tat com.ebay.ejmask.core.EJMask.process(EJMask.java:174)\n" +
"\tat com.ebay.ejmask.core.EJMask.mask(EJMask.java:153)\n" +
"\tat com.ebay.ejmask.core.EJMask.mask(EJMask.java:100)"));
}

/**
Expand Down

0 comments on commit fc1b130

Please sign in to comment.