@@ -0,0 +1,2489 @@
+/**%0A * #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=#%0A *   This file is part of the Smart Developer Hub Project:%0A *     http://www.smartdeveloperhub.org/%0A *%0A *   Center for Open Middleware%0A *     http://www.centeropenmiddleware.com/%0A * #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=#%0A *   Copyright (C) 2015-2016 Center for Open Middleware.%0A * #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=#%0A *   Licensed under the Apache License, Version 2.0 (the %22License%22);%0A *   you may not use this file except in compliance with the License.%0A *   You may obtain a copy of the License at%0A *%0A *             http://www.apache.org/licenses/LICENSE-2.0%0A *%0A *   Unless required by applicable law or agreed to in writing, software%0A *   distributed under the License is distributed on an %22AS IS%22 BASIS,%0A *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A *   See the License for the specific language governing permissions and%0A *   limitations under the License.%0A * #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=#%0A *   Artifact    : org.smartdeveloperhub.harvesters.scm:scm-harvester-backend:0.3.0-SNAPSHOT%0A *   Bundle      : scm-harvester-backend-0.3.0-SNAPSHOT.jar%0A * #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=#%0A */%0Apackage org.smartdeveloperhub.harvesters.scm.backend.notification;%0A%0Aimport java.io.IOException;%0A%0Aimport org.smartdeveloperhub.harvesters.scm.backend.pojos.Collector;%0A%0Apublic final class GitCollector %7B%0A%0A%09private final CollectorController publisher;%0A%0A%09private GitCollector(final Collector collector) %7B%0A%09%09this.publisher = CollectorController.createPublisher(collector);%0A%09%7D%0A%0A%09public Collector getConfig() %7B%0A%09%09return this.publisher.collector();%0A%09%7D%0A%0A%09public String getInstance() %7B%0A%09%09return this.publisher.collector().getInstance();%0A%09%7D%0A%0A%09public void start() throws IOException %7B%0A%09%09try %7B%0A%09%09%09this.publisher.connect();%0A%09%09%7D catch (final ControllerException e) %7B%0A%09%09%09throw new IOException(%22Could not start collector%22,e);%0A%09%09%7D%0A%09%7D%0A%0A%09public void notify(final Event event) throws IOException %7B%0A%09%09try %7B%0A%09%09%09this.publisher.publishEvent(event);%0A%09%09%7D catch (final ControllerException e) %7B%0A%09%09%09throw new IOException(%22Could not send notification %22+event,e);%0A%09%09%7D%0A%09%7D%0A%0A%09public void shutdown() %7B%0A%09%09this.publisher.disconnect();%0A%09%7D%0A%0A%09public static GitCollector newInstance(final Collector collector) %7B%0A%09%09return new GitCollector(collector);%0A%09%7D%0A%0A%7D%0A

Provision of testing utilities