getKiji().getURI().toString(),
"--lookup=" + mFile.toString(),
"--interactive=false"
));
final long id = Long.parseLong(mToolOutputLines[0]);
final BytesKey hash = new BytesKey(ByteArrayFormatter.parseHex(mToolOutputLines[1], ':'));
// Confirm the id returns the correct schema and hash.
assertEquals(BaseTool.SUCCESS, runTool(new SchemaTableTool(),
getKiji().getURI().toString(),
"--get-schema-by-id=" + id,
"--output=" + mFile.toString(),
"--interactive=false"
));
assertEquals(mSimpleSchema, new Schema.Parser().parse(mFile));
assertEquals(hash, new BytesKey(ByteArrayFormatter.parseHex(mToolOutputLines[0], ':')));
// Confirm the hash returns the correct schema and id.
assertEquals(BaseTool.SUCCESS, runTool(new SchemaTableTool(),
getKiji().getURI().toString(),
"--get-schema-by-hash=" + hash.toString(),
"--output=" + mFile.toString(),
"--interactive=false"
));
assertEquals(mSimpleSchema, new Schema.Parser().parse(mFile));
assertEquals(id, Long.parseLong(mToolOutputLines[0]));