### Question:
Status { @JsonIgnore public boolean isFailed() { return ERROR.name().equalsIgnoreCase(code) || USER_ERROR.name().equalsIgnoreCase(code); } @JsonCreator  Status(@JsonProperty("code") String code, @JsonProperty("detail") String detail,
           @JsonProperty("description") String description); String getCode(); String getDetail(); String getDescription(); @JsonIgnore boolean isFinished(); @JsonIgnore boolean isFailed(); @Override String toString();  }### Answer:
@Test public void testIsFailedOnError() throws Exception { assertThat(new Status(ERROR.name(), "", "").isFailed(), is(true)); }
@Test public void testIsFailedOnUserError() throws Exception { assertThat(new Status(USER_ERROR.name(), "", "").isFailed(), is(true)); }
@Test public void testIsFailedOnSynchronized() throws Exception { assertThat(new Status(SYNCHRONIZED.name(), "", "").isFailed(), is(false)); }
@Test public void testIsFailedOnNullCode() throws Exception { assertThat(new Status(null, "", "").isFailed(), is(false)); }
@Test public void testIsFailedOnUnknownCode() throws Exception { assertThat(new Status("unknown code", "", "").isFailed(), is(false)); }