### Question:
CachedLayer implements Layer { public static Builder builder() { return new Builder(); } private  CachedLayer(
      DescriptorDigest layerDigest, DescriptorDigest layerDiffId, long layerSize, Blob layerBlob); static Builder builder(); DescriptorDigest getDigest(); long getSize(); @Override DescriptorDigest getDiffId(); @Override Blob getBlob(); @Override BlobDescriptor getBlobDescriptor();  }### Answer:
@Test public void testBuilder_fail() { try { CachedLayer.builder().build(); Assert.fail("missing required"); } catch (NullPointerException ex) { MatcherAssert.assertThat(ex.getMessage(), CoreMatchers.containsString("layerDigest")); } try { CachedLayer.builder().setLayerDigest(mockLayerDigest).build(); Assert.fail("missing required"); } catch (NullPointerException ex) { MatcherAssert.assertThat(ex.getMessage(), CoreMatchers.containsString("layerDiffId")); } try { CachedLayer.builder().setLayerDigest(mockLayerDigest).setLayerDiffId(mockLayerDiffId).build(); Assert.fail("missing required"); } catch (NullPointerException ex) { MatcherAssert.assertThat(ex.getMessage(), CoreMatchers.containsString("layerBlob")); } }