public void testGetAllPhotos() {
Photo photo = setUpPhotos();
Gallery gallery = new Gallery();
galleryRawManager.add(gallery);
photo.setGallery(gallery);
gallery.addNewPhoto(photo);
photoRawManager.add(photo);
Collection<Photo> photosByGallery = gallery.getPhotos();
Collection<Photo> photos = photoRawManager.getAll();
assertTrue(photos.contains(photo));
assertTrue(photos.size()==1);
assertTrue(gallery.getPhotos().size()==1);
assertTrue(gallery.getPhotos().contains(photo));
assertEquals(photos.size(), photosByGallery.size());
assertTrue(gallery.getPhotos().contains(photo));
}