### Question:
Verify extends ConsoleCommand { @Override public void execute(String... tokens) { if (tokens.length != 2 && tokens.length != 4) { consoleIO.writeln(getHelpLong()); return; } String dataPath = parseDataPath(tokens[1]); verify(dataPath); if (tokens.length == 4) { String shaclPath = parseDataPath(tokens[2]); String reportFile = tokens[3]; shacl(dataPath, shaclPath, reportFile); } } Verify(ConsoleIO consoleIO); @Override String getName(); @Override String getHelpShort(); @Override String getHelpLong(); @Override void execute(String... tokens);  }### Answer:
@Test public final void testVerifyMissingType() throws IOException { cmd.execute("verify", copyFromRes("missing_type.ttl")); assertTrue(io.wasErrorWritten()); }
@Test public final void testVerifySpaceIRI() throws IOException { cmd.execute("verify", copyFromRes("space_iri.ttl")); assertTrue(io.wasErrorWritten()); }
@Test public final void testVerifyWrongLang() throws IOException { cmd.execute("verify", copyFromRes("wrong_lang.ttl")); assertTrue(io.wasErrorWritten()); }
@Test public final void testShaclInvalid() throws IOException { File report = LOCATION.newFile(); cmd.execute("verify", copyFromRes("ok.ttl"), copyFromRes("shacl_invalid.ttl"), report.toString()); assertTrue(io.wasErrorWritten()); assertTrue(Files.size(report.toPath()) > 0); }
@Test public final void testShaclValid() throws IOException { File report = LOCATION.newFile(); cmd.execute("verify", copyFromRes("ok.ttl"), copyFromRes("shacl_valid.ttl"), report.toString()); assertFalse(Files.size(report.toPath()) > 0); assertFalse(io.wasErrorWritten()); }
@Test public final void testVerifyWrongFormat() { cmd.execute("verify", "does-not-exist.docx"); assertTrue(io.wasErrorWritten()); }
@Test public final void testVerifyOK() throws IOException { cmd.execute("verify", copyFromRes("ok.ttl")); assertFalse(io.wasErrorWritten()); }
@Test public final void testVerifyBrokenFile() throws IOException { cmd.execute("verify", copyFromRes("broken.ttl")); assertTrue(io.wasErrorWritten()); }