@Test
public void testGetStorageFileEntityWithNullStorageFileEntity()
{

    // Create a file path.
    String filePath = TEST_S3_KEY_PREFIX + "/" + LOCAL_FILE;
    // Mock the external calls.
    when(storageFileDao.getStorageFileByStorageNameAndFilePath(STORAGE_NAME, filePath)).thenReturn(null);
    try
    {
        // Call the method under test.
        storageFileDaoHelper.getStorageFileEntity(STORAGE_NAME, filePath);
        fail();
    }
    catch (ObjectNotFoundException objectNotFoundException)
    {
        // Validate the exception message.
        assertThat("Exception message not equal to expected exception message.", objectNotFoundException.getMessage(),
            is(String.format("Storage file \"%s\" doesn't exist in \"%s\" storage.", filePath, STORAGE_NAME)));
    }
    // Verify the external calls.
    verify(storageFileDao).getStorageFileByStorageNameAndFilePath(STORAGE_NAME, filePath);
    verifyNoMoreInteractionsHelper();
}