### Question:
RDFModelUtil { public static Model modelFrom(String input, Lang lang) { InputStream is = new TypedInputStream(new ByteArrayInputStream(input.getBytes(StandardCharsets.UTF_8)), lang.getContentType()); Model m = ModelFactory.createDefaultModel(); RDFDataMgr.read(m, is, lang); return m; } private  RDFModelUtil(); static Model modelFrom(String input, Lang lang); static String stringFrom(Model in, Lang lang); static String stringFrom(Model in, RDFFormat format);  }### Answer:
@Test public void should_create_model_from_string() { assertNotNull(RDFModelUtil.modelFrom(SOME_NTRIPLES, Lang.NTRIPLES)); }
@Test(expected = Exception.class) public void should_throw_if_invalid_string() { RDFModelUtil.modelFrom(GARBAGE, Lang.NTRIPLES); }