### Question:
PartiallyFailableResponse extends PageableResponse<T> implements FailableRestResponse { @Override public boolean hasFailed() { return items.stream().anyMatch(FailableRestResponse::hasFailed); } protected  PartiallyFailableResponse(); @Override boolean hasFailed(); @Override Errors getErrors();  }### Answer:
@Test @DisplayName("Response fails when just one item fails") void hasFailedFailedItemsTest() { R failedItem = mockItem(); when(failedItem.hasFailed()).thenReturn(true); R notFailedItem = mockItem(); when(notFailedItem.hasFailed()).thenReturn(false); unit.setItems(Arrays.asList(failedItem, notFailedItem)); assertThat(unit.hasFailed()).isTrue(); }
@Test @DisplayName("Response does not fail when empty") void hasFailedEmptyTest() { unit.setItems(Collections.emptyList()); assertThat(unit.hasFailed()).isFalse(); }
@Test @DisplayName("Response does not fail when all items do not fail") void hasFailedNoFailedItemsTest() { R notFailedItem = mockItem(); when(notFailedItem.hasFailed()).thenReturn(false); unit.setItems(Collections.singletonList(notFailedItem)); assertThat(unit.hasFailed()).isFalse(); }