Problem { public String getMessageString() { return this.message.text(this.parameters); } Problem( Status status,
                    int code,
                    I18n message,
                    Object[] params,
                    String resource,
                    String location,
                    Throwable throwable ); int getCode(); String getLocation(); String getMessageString(); I18n getMessage(); Object[] getParameters(); String getResource(); Status getStatus(); Throwable getThrowable(); @Override int hashCode(); @Override boolean equals( Object obj ); @Override String toString(); static final int DEFAULT_CODE; }
@Test public void shouldHaveMessageString() { messageParameters = new Object[] {"error msg"}; error = new Problem(Status.ERROR, 1, message, messageParameters, resource, location, throwable); messageParameters = new Object[] {"warning msg"}; warning = new Problem(Status.WARNING, 1, message, messageParameters, resource, location, throwable); messageParameters = new Object[] {"info msg"}; info = new Problem(Status.INFO, 1, message, messageParameters, resource, location, throwable); assertThat(error.getMessageString(), is(message.text("error msg"))); assertThat(warning.getMessageString(), is(message.text("warning msg"))); assertThat(info.getMessageString(), is(message.text("info msg"))); }