### Question:
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); } }    }### Answer:
@Test public void testParseSingleResource() { IResource resource = parser.parseResource("data/ks/tbl"); assertThat(resource).isEqualTo(DataResource.fromName("data/ks/tbl")); }
@Test public void testParseSeveralResources() { assertThatExceptionOfType(InvalidRequestException.class) .isThrownBy(() -> parser.parseResource("data/ks/tbl1, data/ks/tbl2,data/ks/tbl3")); }
@Test public void testParseInvalidResource() { assertThatExceptionOfType(InvalidRequestException.class) .isThrownBy(() -> parser.parseResource("guck/ks/tbl1")); }