class NotificationManager extends AbstractDataSourcePropertyManager<Client, NotificationClientRepository> implements DataSink {

	@Override
	public void onNewDataStart(DataSource source) {
		for (Client client : getAll(source)) {
			senderCache.get(source, client).onNewDataStart();
		}
	}

}

class NotificationManagerTest {

	@Mocked private SenderCache senderCache;
	@Mocked private Cache<NotificationClientRepository> clientRepositoryCache;
	@Mocked private RepositoryFactory repositoryFactory;
	@Mocked private NotificationClientRepository clientRepository;
	@Mocked private Sender<HttpClient> httpSender;
	@Mocked private Sender<GcmClient> gcmSender;
	private final DataSource source;
	private final HttpClient httpClient;
	private final GcmClient gcmClient;
	private NotificationManager notificationManager;

	@Test
	public void testOnNewDataStart() {

		new Expectations(notificationManager) {{
			senderCache.get(source, httpClient); result = httpSender;
			notificationManager.getAll(source); result = Arrays.asList(httpClient, gcmClient);
		}};

		notificationManager.onNewDataStart(source);

		new Verifications() {{
			httpSender.onNewDataStart();
			gcmSender.onNewDataStart();
		}};
	}

}