@Test
public void shouldAddAudioRecordedIfCreatedOnTheMobile() throws JSONException, IOException {

    RapidFtrApplication context = mockContext();
    String response = "{'_id': 'testing', 'name' : 'child1', 'recorded_audio' : '123456'}";
    Child child = new Child("id", "user", "{'name' : 'child1', 'recorded_audio' : '123455'}");
    getFakeHttpLayer().addHttpResponseRule("http://whatever/api/children", response);
    getFakeHttpLayer().addHttpResponseRule("http://whatever/child/testing/audio", "RECEIVED");
    AudioCaptureHelper audioCaptureHelper = new AudioCaptureHelper(context);
    audioCaptureHelper.saveAudio(child, new ByteArrayInputStream("OK".getBytes()));
    genericSyncService.sync(child, "api/children");
    File file = audioCaptureHelper.getFile("123456", "");
    String fileContent = CharStreams.toString(new InputStreamReader(new FileInputStream(file)));
    assertEquals("RECEIVED", fileContent);
}