### Question:
PluginCommandProvider implements CommandProvider { @Override public boolean validate(String command) { return new PluginCommand(command).isValidate(); }  @Override String getHelp(); @Override String handleCommand(String command); @Override boolean validate(String command);  }### Answer:
@Test public void testPluginCommandFormat() { PluginCommandProvider pluginCommandProvider = new PluginCommandProvider(); Assert.assertFalse(pluginCommandProvider.validate(" plugin ")); Assert.assertTrue(pluginCommandProvider.validate(" plugin -h ")); Assert.assertTrue(pluginCommandProvider.validate(" plugin -m pluginA ")); Assert.assertTrue(pluginCommandProvider.validate(" plugin -s pluginB pluginA ")); Assert.assertTrue(pluginCommandProvider.validate(" plugin -d plugin* ")); Assert.assertTrue(pluginCommandProvider.validate(" plugin -m -d -s plugin* ")); Assert.assertTrue(pluginCommandProvider.validate(" plugin -msd pluginA ")); Assert.assertFalse(pluginCommandProvider.validate(" plu")); Assert.assertFalse(pluginCommandProvider.validate(" plugin -h pluginA ")); Assert.assertFalse(pluginCommandProvider.validate(" plugin -hm pluginA ")); Assert.assertFalse(pluginCommandProvider.validate(" plugin -mb pluginA ")); Assert.assertFalse(pluginCommandProvider.validate(" plugin -m -b pluginA ")); Assert.assertFalse(pluginCommandProvider.validate(" plugin -m ")); }