ChunkUtil { public boolean isChunk(String contentId) { if (null == contentId) { return false; } return contentId.matches(".*" + ChunksManifest.chunkSuffix + "\\d+"); }  String preChunkedContentId(String contentId); boolean isChunkManifest(String contentId); boolean isChunk(String contentId);  }
@Test public void testIsChunk() throws Exception { final String baseId = "content-id"; String contentId = baseId; Assert.assertFalse(util.isChunkManifest(contentId)); contentId = baseId + ChunksManifest.manifestSuffix; Assert.assertFalse(util.isChunk(contentId)); contentId = baseId + ChunksManifest.chunkSuffix; Assert.assertFalse(util.isChunk(contentId)); Assert.assertFalse(util.isChunk(null)); contentId = baseId + ChunksManifest.chunkSuffix + 0; Assert.assertTrue(util.isChunk(contentId)); }