@Test public void createEntityDeletionAlertNoTranslation() { HttpHeaders headers = HeaderUtil.createEntityDeletionAlert("myApp", false, "User", "2"); assertThat(headers.getFirst("X-myApp-alert")).isEqualTo("A User is deleted with identifier 2"); assertThat(headers.getFirst("X-myApp-params")).isEqualTo("2"); }
public static HttpHeaders createEntityDeletionAlert(String applicationName, boolean enableTranslation, String entityName, String param) { String message = enableTranslation ? applicationName + "." + entityName + ".deleted" : "A " + entityName + " is deleted with identifier " + param; return createAlert(applicationName, message, param); }
HeaderUtil { public static HttpHeaders createEntityDeletionAlert(String applicationName, boolean enableTranslation, String entityName, String param) { String message = enableTranslation ? applicationName + "." + entityName + ".deleted" : "A " + entityName + " is deleted with identifier " + param; return createAlert(applicationName, message, param); } }
HeaderUtil { public static HttpHeaders createEntityDeletionAlert(String applicationName, boolean enableTranslation, String entityName, String param) { String message = enableTranslation ? applicationName + "." + entityName + ".deleted" : "A " + entityName + " is deleted with identifier " + param; return createAlert(applicationName, message, param); } private  HeaderUtil(); }
HeaderUtil { public static HttpHeaders createEntityDeletionAlert(String applicationName, boolean enableTranslation, String entityName, String param) { String message = enableTranslation ? applicationName + "." + entityName + ".deleted" : "A " + entityName + " is deleted with identifier " + param; return createAlert(applicationName, message, param); } private  HeaderUtil(); static HttpHeaders createAlert(String applicationName, String message, String param); static HttpHeaders createEntityCreationAlert(String applicationName, boolean enableTranslation, String entityName, String param); static HttpHeaders createEntityUpdateAlert(String applicationName, boolean enableTranslation, String entityName, String param); static HttpHeaders createEntityDeletionAlert(String applicationName, boolean enableTranslation, String entityName, String param); static HttpHeaders createFailureAlert(String applicationName, boolean enableTranslation, String entityName, String errorKey, String defaultMessage); }
HeaderUtil { public static HttpHeaders createEntityDeletionAlert(String applicationName, boolean enableTranslation, String entityName, String param) { String message = enableTranslation ? applicationName + "." + entityName + ".deleted" : "A " + entityName + " is deleted with identifier " + param; return createAlert(applicationName, message, param); } private  HeaderUtil(); static HttpHeaders createAlert(String applicationName, String message, String param); static HttpHeaders createEntityCreationAlert(String applicationName, boolean enableTranslation, String entityName, String param); static HttpHeaders createEntityUpdateAlert(String applicationName, boolean enableTranslation, String entityName, String param); static HttpHeaders createEntityDeletionAlert(String applicationName, boolean enableTranslation, String entityName, String param); static HttpHeaders createFailureAlert(String applicationName, boolean enableTranslation, String entityName, String errorKey, String defaultMessage);  }