### Question:
IdRepoException extends Exception implements L10NMessage { public String getConstraintViolationDetails() { if (!IdRepoErrorCode.LDAP_EXCEPTION.equals(getErrorCode()) || args == null || args.length < 3) { return getMessage(); } String argMatch = (String) args[2]; if (argMatch != null) { Matcher matcher = PATTERN.matcher(argMatch); if (matcher.find()) { return matcher.group(0).trim(); } } return "Cannot update attributes due to server's attribute constraints being violated."; } IdRepoException();  IdRepoException(String msg);  IdRepoException(String msg, String errorCode); @Deprecated  IdRepoException(String rbName, String errorCode, String ldapErrCode, Object[] args);  IdRepoException(String rbName, String errorCode, ResultCode ldapResultCode, Object[] args);  IdRepoException(String rbName, String errorCode, Object[] args); String getL10NMessage(java.util.Locale locale); String getResourceBundleName(); int getLdapErrorIntCode(); String getErrorCode(); @Deprecated String getLDAPErrorCode(); void setLDAPErrorCode(String errorCode); Object[] getMessageArgs(); String toString(); String getMessage(); String getConstraintViolationDetails();  }### Answer:
@Test (dataProvider = "regexData") public void testRegex(String match, String result) { Object[] args = { null, null, match }; IdRepoException idre = new IdRepoException(null, IdRepoErrorCode.LDAP_EXCEPTION, IdRepoErrorCode.LDAP_EXCEPTION, args); String answer = idre.getConstraintViolationDetails(); assertThat(answer).isEqualTo(result); }