Assert.assertTrue(testErrorBuilder.hasCause());
Assert.assertNotNull(testErrorBuilder.getCause());
Assert.assertTrue(testErrorBuilder.hasMessage$());
Assert.assertNotNull(testErrorBuilder.getMessage$());
TestError testError = testErrorBuilder.build();
Assert.assertEquals("value", testError.getValue());
Assert.assertEquals("value", testError.getMessage());
Assert.assertEquals("message$", testError.getMessage$());
// Test copy constructor
Assert.assertEquals(testErrorBuilder,
TestError.newBuilder(testErrorBuilder));
Assert.assertEquals(testErrorBuilder, TestError.newBuilder(testError));
Assert.assertEquals(
new TestError("value", new NullPointerException()),
TestError.newBuilder().setValue("value").
setCause(new NullPointerException()).build());
// Test clear
testErrorBuilder.clearValue();