### Question:
CreateEntityMetadataCommand extends AbstractRestCommand { @Override public String run() { LOGGER.debug("run: entity={}, version={}", entity, version); Error.reset(); Error.push(getClass().getSimpleName()); Error.push(entity); Error.push(version); try { EntityMetadata emd = getJsonTranslator().parse(EntityMetadata.class, JsonUtils.json(data)); if (!emd.getName().equals(entity)) { throw Error.get(RestMetadataConstants.ERR_NO_NAME_MATCH, entity); } if (!emd.getVersion().getValue().equals(version)) { throw Error.get(RestMetadataConstants.ERR_NO_VERSION_MATCH, version); } Metadata md = getMetadata(); LOGGER.debug("Metadata instance:{}", md); if (md.getEntityInfo(entity) != null) { LOGGER.debug("Entity exists: {}, creating version {}", entity, version); md.createNewSchema(emd); md.updateEntityInfo(emd.getEntityInfo()); } else { LOGGER.debug("Creating new metadata:{} {}", entity, version); md.createNewMetadata(emd); } emd = md.getEntityMetadata(entity, version); return getJSONParser().convert(emd).toString(); } catch (Error e) { return e.toString(); } catch (Exception e) { LOGGER.error("Failure: {}", e); return Error.get(RestMetadataConstants.ERR_REST_ERROR, e.toString()).toString(); } } CreateEntityMetadataCommand(String entity, String version, String data);  CreateEntityMetadataCommand(Metadata metadata, String entity, String version, String data); @Override String run();  }### Answer:
@Test public void execute() { CreateEntityMetadataCommand command = new CreateEntityMetadataCommand(metadata, null, null, null); String output = command.run(); Assert.assertNotNull(output); }