Source:
private void generateAndAssertBadBlobId(Short version) throws Exception { List<String> blobIdLikes = new ArrayList<>(); PartitionId badPartitionId = new MockPartitionId(200000, Collections.EMPTY_LIST, 0); String goodUUID = UUID.randomUUID().toString(); blobIdLikes.add( buildBlobIdLike(version, referenceFlag, referenceDatacenterId, referenceAccountId, referenceContainerId, badPartitionId, goodUUID.length(), goodUUID)); blobIdLikes.add( buildBlobIdLike(version, referenceFlag, referenceDatacenterId, referenceAccountId, referenceContainerId, referencePartitionId, goodUUID.length() + 1, goodUUID)); blobIdLikes.add( buildBlobIdLike(version, referenceFlag, referenceDatacenterId, referenceAccountId, referenceContainerId, referencePartitionId, goodUUID.length() - 1, goodUUID)); blobIdLikes.add( buildBlobIdLike(version, referenceFlag, referenceDatacenterId, referenceAccountId, referenceContainerId, referencePartitionId, -1, goodUUID)); blobIdLikes.add( buildBlobIdLike(version, referenceFlag, referenceDatacenterId, referenceAccountId, referenceContainerId, referencePartitionId, goodUUID.length(), goodUUID + "EXTRA")); blobIdLikes.add(buildBlobIdLike((short) (BLOB_ID_V2 + 1), referenceFlag, referenceDatacenterId, referenceAccountId, referenceContainerId, referencePartitionId, goodUUID.length(), goodUUID)); blobIdLikes.add(""); blobIdLikes.add("AA"); for (String blobIdLike : blobIdLikes) { try { BlobId.fromStringId(blobIdLike, referenceClusterMap); fail("Expected blobId creation to fail with blobId string " + blobIdLike); } catch (Exception e) { } } }

Target:
private void generateAndAssertBadBlobId(Short version) throws Exception { List<String> invalidBlobIdLikeList = new ArrayList<>(); PartitionId badPartitionId = new MockPartitionId(200000, Collections.EMPTY_LIST, 0); String goodUUID = UUID.randomUUID().toString(); invalidBlobIdLikeList.add( buildBlobIdLike(version, referenceFlag, referenceDatacenterId, referenceAccountId, referenceContainerId, badPartitionId, goodUUID.length(), goodUUID)); invalidBlobIdLikeList.add( buildBlobIdLike(version, referenceFlag, referenceDatacenterId, referenceAccountId, referenceContainerId, referencePartitionId, goodUUID.length() + 1, goodUUID)); invalidBlobIdLikeList.add( buildBlobIdLike(version, referenceFlag, referenceDatacenterId, referenceAccountId, referenceContainerId, referencePartitionId, goodUUID.length() - 1, goodUUID)); invalidBlobIdLikeList.add( buildBlobIdLike(version, referenceFlag, referenceDatacenterId, referenceAccountId, referenceContainerId, referencePartitionId, -1, goodUUID)); invalidBlobIdLikeList.add( buildBlobIdLike(version, referenceFlag, referenceDatacenterId, referenceAccountId, referenceContainerId, referencePartitionId, goodUUID.length(), goodUUID + "EXTRA")); invalidBlobIdLikeList.add( buildBlobIdLike((short) (BLOB_ID_V2 + 1), referenceFlag, referenceDatacenterId, referenceAccountId, referenceContainerId, referencePartitionId, goodUUID.length(), goodUUID)); invalidBlobIdLikeList.add(""); invalidBlobIdLikeList.add("AA"); for (String blobIdLike : invalidBlobIdLikeList) { try { new BlobId(blobIdLike, referenceClusterMap); fail("Expected blobId creation to fail with blobId string " + blobIdLike); } catch (Exception e) { } } }