@@ -0,0 +1,1884 @@
+package de.fu_berlin.cdv.chasingpictures.api;%0A%0Aimport android.graphics.Bitmap;%0Aimport android.graphics.BitmapFactory;%0Aimport android.test.AndroidTestCase;%0Aimport android.util.Log;%0A%0Aimport org.springframework.http.ResponseEntity;%0A%0Aimport java.io.File;%0Aimport java.io.FileOutputStream;%0Aimport java.io.IOException;%0A%0Aimport de.fu_berlin.cdv.chasingpictures.R;%0A%0A/**%0A * @author Simon Kalt%0A */%0Apublic class PhotoUploadRequestTest extends AndroidTestCase %7B%0A%0A    private static final String TAG = %22PhotoUploadRequestTest%22;%0A%0A    public void setUp() throws Exception %7B%0A        super.setUp();%0A    %7D%0A%0A    public void testPhotoUpload() throws Exception %7B%0A        // Register user so we have a valid access token%0A        LoginRequestTest.registerUser(%0A                getContext(),%0A                %22Tom%22,%0A                LoginRequestTest.getUniqueEmail(),%0A                %2212345678%22%0A        );%0A%0A        Place place = new Place();%0A        place.setId(6);%0A%0A        //region Save picture%0A        Bitmap bitmap = BitmapFactory.decodeResource(getContext().getResources(), R.drawable.upload_image);%0A        File tempFile = null;%0A        try %7B%0A            tempFile = File.createTempFile(%22UPLOAD_TEST%22, %22.jpg%22, getContext().getCacheDir());%0A            FileOutputStream out = new FileOutputStream(tempFile);%0A            bitmap.compress(Bitmap.CompressFormat.JPEG, 100, out);%0A            out.close();%0A        %7D catch (IOException e) %7B%0A            Log.e(TAG, %22Image file could not be written.%22, e);%0A        %7D%0A        //endregion%0A%0A        PhotoUploadRequest request = new PhotoUploadRequest(getContext(), place, tempFile);%0A        ResponseEntity%3CPicture%3E pictureResponseEntity = request.sendRequest();%0A        assertNotNull(%22No response entity received%22, pictureResponseEntity);%0A        Picture picture = pictureResponseEntity.getBody();%0A        assertNotNull(%22Response entity has empty body%22, picture);%0A    %7D%0A%7D

Add test for photo upload