FeaturesService service = EasyMock.createMock(FeaturesService.class);
Repository repo = EasyMock.createMock(Repository.class);
Feature feature = EasyMock.createMock(Feature.class);
EasyMock.expect(service.listRepositories()).andReturn(new Repository[] { repo });
EasyMock.expect(repo.getFeatures()).andReturn(new Feature[] { feature });
EasyMock.expect(feature.isHidden()).andReturn(true).anyTimes();
EasyMock.expect(feature.getName()).andReturn("feature");
EasyMock.expect(feature.getDescription()).andReturn("description");
EasyMock.expect(feature.getVersion()).andReturn("1.0.0");