@Test public void testGradientIsSentToServer() { byte[] gradient = new byte[]{}; cut.uploadGradient(gradient); verify(networkDataSource).sendGradient(gradient); }
@Override public Observable<Boolean> uploadGradient(byte[] gradient) { return networkDataSource.sendGradient(gradient); }
FederatedRepositoryImpl implements FederatedRepository { @Override public Observable<Boolean> uploadGradient(byte[] gradient) { return networkDataSource.sendGradient(gradient); } }
FederatedRepositoryImpl implements FederatedRepository { @Override public Observable<Boolean> uploadGradient(byte[] gradient) { return networkDataSource.sendGradient(gradient); } FederatedRepositoryImpl(FederatedDataSource dataSource, FederatedNetworkDataSource networkDataSource); }
FederatedRepositoryImpl implements FederatedRepository { @Override public Observable<Boolean> uploadGradient(byte[] gradient) { return networkDataSource.sendGradient(gradient); } FederatedRepositoryImpl(FederatedDataSource dataSource, FederatedNetworkDataSource networkDataSource); @Override FederatedDataSet getTrainingData(); @Override FederatedDataSet getTestData(); @Override FederatedDataSet getCrossValidationData(); @Override Observable<Boolean> uploadGradient(byte[] gradient); @Override Observable<byte[]> retrieveGradient(); @Override Observable<Integer> registerModel(); }
FederatedRepositoryImpl implements FederatedRepository { @Override public Observable<Boolean> uploadGradient(byte[] gradient) { return networkDataSource.sendGradient(gradient); } FederatedRepositoryImpl(FederatedDataSource dataSource, FederatedNetworkDataSource networkDataSource); @Override FederatedDataSet getTrainingData(); @Override FederatedDataSet getTestData(); @Override FederatedDataSet getCrossValidationData(); @Override Observable<Boolean> uploadGradient(byte[] gradient); @Override Observable<byte[]> retrieveGradient(); @Override Observable<Integer> registerModel();  }