@Test
public void testGetCaptureTimeFromSharedPreferences() {

    Calendar expected = Calendar.getInstance();
    expected.setTimeInMillis(500);
    application.getSharedPreferences().edit().putLong("capture_start_time", 500).commit();
    Calendar actual = photoCaptureHelper.getCaptureTime();
    assertThat(actual, equalTo(expected));
}