### Question:
SetDefaultVersionCommand extends AbstractRestCommand { @Override public String run() { LOGGER.debug("run: entity={}, version={}", entity, version); Error.reset(); Error.push(getClass().getSimpleName()); Error.push(entity); if (version != null) { Error.push(version); } try { Metadata md = getMetadata(); EntityInfo ei = md.getEntityInfo(entity); if (ei != null) { ei.setDefaultVersion(version); md.updateEntityInfo(ei); } else { throw Error.get(RestMetadataConstants.ERR_NO_ENTITY_VERSION, entity + ":" + version); } if (version == null) { return getJSONParser().convert(md.getEntityInfo(entity)).toString(); } else { return getJSONParser().convert(md.getEntityMetadata(entity, version)).toString(); } } catch (Error e) { LOGGER.error("Cannot set version", e); return e.toString(); } catch (Exception e) { LOGGER.error("Failure: {}", e); return Error.get(RestMetadataConstants.ERR_REST_ERROR, e.toString()).toString(); } } SetDefaultVersionCommand(String entity, String version);  SetDefaultVersionCommand(Metadata metadata, String entity, String version); @Override String run();  }### Answer:
@Test public void execute() { SetDefaultVersionCommand command = new SetDefaultVersionCommand(metadata, null, null); String output = command.run(); Assert.assertNotNull(output); }