@Test public void testParseSeveralResources() { assertThatExceptionOfType(InvalidRequestException.class) .isThrownBy(() -> parser.parseResource("data/ks/tbl1, data/ks/tbl2,data/ks/tbl3")); }
IResource parseResource(String resourceName) { try { return ResourceFactory.toResource(resourceName); } catch (IllegalArgumentException e) { throw Exceptions.appendCause(new InvalidRequestException(String.format("Unable to parse whitelisted resource [%s]: %s", resourceName, e.getMessage())), e); } }
WhitelistOptionParser { IResource parseResource(String resourceName) { try { return ResourceFactory.toResource(resourceName); } catch (IllegalArgumentException e) { throw Exceptions.appendCause(new InvalidRequestException(String.format("Unable to parse whitelisted resource [%s]: %s", resourceName, e.getMessage())), e); } } }
WhitelistOptionParser { IResource parseResource(String resourceName) { try { return ResourceFactory.toResource(resourceName); } catch (IllegalArgumentException e) { throw Exceptions.appendCause(new InvalidRequestException(String.format("Unable to parse whitelisted resource [%s]: %s", resourceName, e.getMessage())), e); } }  }
WhitelistOptionParser { IResource parseResource(String resourceName) { try { return ResourceFactory.toResource(resourceName); } catch (IllegalArgumentException e) { throw Exceptions.appendCause(new InvalidRequestException(String.format("Unable to parse whitelisted resource [%s]: %s", resourceName, e.getMessage())), e); } }   }
WhitelistOptionParser { IResource parseResource(String resourceName) { try { return ResourceFactory.toResource(resourceName); } catch (IllegalArgumentException e) { throw Exceptions.appendCause(new InvalidRequestException(String.format("Unable to parse whitelisted resource [%s]: %s", resourceName, e.getMessage())), e); } }    }