assertEquals(create.getId(), id);
}
@Test
public void testIfUserCanUpdateManagedSource() {
ManagedSource update = datasift.managedSource().update(name, source, m_id).sync();
assertTrue(update.isSuccessful());
assertEquals(update.getName(), name);
assertEquals(update.getSourceType(), source_type);
assertEquals(update.getParameters(), parameters);
Set<ManagedSource.AuthParams> auth_array = update.getAuth();
for (ManagedSource.AuthParams p : auth_array) {
assertEquals(p.identityId(), identityId);
assertEquals(p.status(), status);
assertEquals(p.sourceId(), sourceId);
}
Set<ManagedSource.ResourceParams> res_set = update.getResources();
for (ManagedSource.ResourceParams r : res_set) {
assertEquals(r.identityId(), identityId);
assertEquals(r.sourceId(), sourceId);
assertEquals(r.status(), status);
}
assertEquals(update.getCreatedAt(), created_at);
assertEquals(update.getId(), id);
}