@Test
public void testGetMetadataWithoutCswBTXml() throws IOException {

    System.out.println("testGetMetadataWithoutCswBTXml");
    //get the metadata from the test file as a string using this package to locate it ...
    String packageName = this.getClass().getCanonicalName();
    System.out.println("PackageName: " + packageName); //PackageName: gov.usgs.cida.coastalhazards.rest.data.MetadataResourceTest
    // this is where the test resource is located - gov.usgs.cida.coastalhazards.rest.data + /Boston_transects.xml
    String replaced = packageName.replaceAll("[.]", "/");
    String[] names = replaced.split("/MetadataResourceTest");
    String packageNameShort = names[0];
    
    String testFileFullName = packageNameShort + "/" + BTxml;
    String metadataXml = loadResourceAsString(testFileFullName);
    MetadataResource mr = new MetadataResource();
    Response resp = mr.getMetadata(null, metadataXml);
    
    System.out.println("Response: " + resp.getEntity());
    
    Map<String,Object> gsonResp = GsonUtil.getDefault().fromJson((String) resp.getEntity(), Map.class);
    
    assertEquals(7,gsonResp.size());
}