### Question:
BulkDataImportUtil { public static String retrieveInputSource(Parameters parameters) throws FHIROperationException { if (parameters != null) { for (Parameters.Parameter parameter : parameters.getParameter()) { if (BulkDataConstants.PARAM_INPUT_SOURCE.equals(parameter.getName().getValue()) && parameter.getValue() != null && parameter.getValue().is(com.ibm.fhir.model.type.Uri.class)) { return parameter.getValue().as(com.ibm.fhir.model.type.Uri.class).getValue(); } } } throw buildExceptionWithIssue("$import requires 'inputSource' is not found", IssueType.INVALID); } private  BulkDataImportUtil(); static FHIROperationException buildExceptionWithIssue(String msg, IssueType issueType); static FHIROperationException buildExceptionWithIssue(String msg, Throwable cause, IssueType issueType); static String retrieveInputFormat(Parameters parameters); static String retrieveInputSource(Parameters parameters); static List<Input> retrieveInputs(Parameters parameters); static void checkAllowedTotalSizeForTenantOrSystem(Integer inputSize); static void verifyUrlAllowed(String url); static StorageDetail retrieveStorageDetails(Parameters parameters);  }### Answer:
@Test public void testBulkImportUtilSource() throws IOException, FHIRException { FHIRRequestContext.set(new FHIRRequestContext("default")); assertNotNull(BulkDataImportUtil.retrieveInputSource(loadTestFile("/testdata/import/import-demo.json"))); assertEquals(BulkDataImportUtil.retrieveInputSource(loadTestFile("/testdata/import/import-demo.json")), "inputSource"); }
@Test(expectedExceptions = { FHIROperationException.class }) public void testBulkImportUtilSourceNull() throws IOException, FHIRException { FHIRRequestContext.set(new FHIRRequestContext("default")); BulkDataImportUtil.retrieveInputSource(null); }
@Test(expectedExceptions = { FHIROperationException.class }) public void testBulkImportUtilSourceBadFormatNull() throws IOException, FHIRException { FHIRRequestContext.set(new FHIRRequestContext("default")); BulkDataImportUtil.retrieveInputSource(loadTestFile("/testdata/import/import-demo-bad-format2.json")); }
@Test(expectedExceptions = { FHIROperationException.class }) public void testBulkImportUtilSourceBadFormatWrongType() throws IOException, FHIRException { FHIRRequestContext.set(new FHIRRequestContext("default")); BulkDataImportUtil.retrieveInputSource(loadTestFile("/testdata/import/import-demo-bad-format3.json")); }