@Test
public void shouldAddPhotoKeysToParam() throws JSONException, IOException, GeneralSecurityException, HttpException {

    getFakeHttpLayer().setDefaultHttpResponse(201, RESPONSE);
    List<String> photoKeysList = Arrays.asList("photo-998877", "photo-998547", "abcd123", "1234ABC");
    Child child = new Child("id1", "user1", String.format("{ '_id' : 'abcdef', 'name' : 'child1', 'test2' : 0, 'current_photo_key' : '1234ABC', 'photo_keys' : %s}", new JSONArray(photoKeysList).toString()));
    EntityHttpDao<Child> httpDao = new EntityHttpDao<Child>(application, "", "", "child");
    EntityHttpDao<Child> spyHttpDao = spy(httpDao);
    doReturn(child).when(spyHttpDao).update(any(Child.class), any(String.class), any(Map.class));
    new GenericSyncService<Child>(mediaSyncHelper, spyHttpDao, repository).sync(child, "");
    verify(spyHttpDao).update(any(Child.class), any(String.class), argThat(new ContainsPhotoKeysParams("abcd123", "1234ABC")));
}