### Question:
RouterUtils { static BlobId getBlobIdFromString(String blobIdString, ClusterMap clusterMap) throws RouterException { BlobId blobId; try { blobId = new BlobId(blobIdString, clusterMap); logger.trace("BlobId {} created with partitionId {}", blobId, blobId.getPartition()); } catch (Exception e) { logger.trace("Caller passed in invalid BlobId {}", blobIdString); throw new RouterException("BlobId is invalid " + blobIdString, RouterErrorCode.InvalidBlobId); } return blobId; }    }### Answer:
@Test public void testInvalidInputString() { initialize(); try { RouterUtils.getBlobIdFromString(null, clusterMap); fail("The input blob string is invalid. Should fail here"); } catch (RouterException e) { assertEquals("The input blob string is invalid.", e.getErrorCode(), RouterErrorCode.InvalidBlobId); } try { RouterUtils.getBlobIdFromString("", clusterMap); fail("The input blob string is invalid. Should fail here"); } catch (RouterException e) { assertEquals("", e.getErrorCode(), RouterErrorCode.InvalidBlobId); } try { RouterUtils.getBlobIdFromString("abc", clusterMap); fail("The input blob string is invalid. Should fail here"); } catch (RouterException e) { assertEquals("", e.getErrorCode(), RouterErrorCode.InvalidBlobId); } }
@Test public void testGoodCase() throws Exception { initialize(); BlobId convertedBlobId = RouterUtils.getBlobIdFromString(blobIdStr, clusterMap); assertEquals("The converted BlobId should be the same as the original.", originalBlobId, convertedBlobId); }