### Question:
GetEntityNamesCommand extends AbstractRestCommand { @Override public String run() { LOGGER.debug("run:"); Error.reset(); Error.push(getClass().getSimpleName()); try { HashSet<MetadataStatus> statusSet = new HashSet<>(); for (String x : statuses) { statusSet.add(MetadataParser.statusFromString(x)); } String[] names = getMetadata().getEntityNames(statusSet.toArray(new MetadataStatus[statusSet.size()])); ObjectNode node = NODE_FACTORY.objectNode(); ArrayNode arr = NODE_FACTORY.arrayNode(); node.put("entities", arr); for (String x : names) { arr.add(NODE_FACTORY.textNode(x)); } return node.toString(); } catch (Error e) { return e.toString(); } catch (Exception e) { LOGGER.error("Failure: {}", e); return Error.get(RestMetadataConstants.ERR_REST_ERROR, e.toString()).toString(); } } GetEntityNamesCommand(String[] statuses);  GetEntityNamesCommand(Metadata metadata, String[] statuses); @Override String run();  }### Answer:
@Test public void execute() { GetEntityNamesCommand command = new GetEntityNamesCommand(metadata, new String[0]); String output = command.run(); Assert.assertNotNull(output); }