/**
   * Create a mockable plugin for all the tests.
   *
   * @param fakePluginName - the fake plugin name.
   * @return The plugin.
   */
  private static Plugin createPlugin(String fakePluginName) {
    Plugin plugin = mock(Plugin.class);
    PluginDescriptionFile description = mock(PluginDescriptionFile.class);

    when(description.getDepend()).thenReturn(Lists.newArrayList("ProtocolLib"));
    when(description.getSoftDepend()).thenReturn(Collections.<String>emptyList());
    when(description.getLoadBefore()).thenReturn(Collections.<String>emptyList());
    when(description.getLoad()).thenReturn(PluginLoadOrder.POSTWORLD);

    when(plugin.getName()).thenReturn(fakePluginName);
    when(plugin.getServer()).thenReturn(Bukkit.getServer());
    when(plugin.isEnabled()).thenReturn(true);
    when(plugin.getDescription()).thenReturn(description);
    return plugin;
  }