public PluginDescriptor getDescriptor() {
        Iterator<PluginInfo> iterator = this.iterator();
        if (!iterator.hasNext()) {
            throw new RuntimeException("Cannot get descriptor. Could not find any plugin information.");
        }
        return iterator.next().getDescriptor();
    }
@Test
    public void shouldFailWhenThereIsNoPluginInfoToGetTheDescriptorFrom() {
        CombinedPluginInfo pluginInfo = new CombinedPluginInfo();

        try {
            pluginInfo.getDescriptor();
            fail("Should have failed since there are no plugins found.");
        } catch (RuntimeException e) {
            assertThat(e.getMessage(), containsString("Cannot get descriptor"));
        }
    }