### Question:
BufferedBulkResult { public boolean isSucceeded() { return !this.errors && error == null; } BufferedBulkResult(int took, boolean errors, BulkError error, int status, List<BulkResultItem> items); int getTook(); boolean isSucceeded(); BulkError getError(); int getStatus(); List<BulkResultItem> getItems();  }### Answer:
@Test public void isSucceededReturnsFalseWhenErrorsIsTrueAndBulkErrorIsNull() { BufferedBulkResult result = createTestBufferedBulkResult(true, null); boolean succeeded = result.isSucceeded(); Assert.assertFalse(succeeded); }
@Test public void isSucceededReturnsFalseWhenErrorsIsFalseAndBulkErrorIsNotNull() { BufferedBulkResult result = createTestBufferedBulkResult(false, new BulkError()); boolean succeeded = result.isSucceeded(); Assert.assertFalse(succeeded); }
@Test public void isSucceededReturnsFalseWhenErrorsIsTrueAndBulkErrorIsNotNull() { BufferedBulkResult result = createTestBufferedBulkResult(true, new BulkError()); boolean succeeded = result.isSucceeded(); Assert.assertFalse(succeeded); }
@Test public void isSucceededReturnsTrueWhenErrorsIsFalseAndBulkErrorIsNull() { BufferedBulkResult result = createTestBufferedBulkResult(false, null); boolean succeeded = result.isSucceeded(); Assert.assertTrue(succeeded); }