Skip to content
This repository was archived by the owner on Jan 31, 2022. It is now read-only.

Commit 8702cc4

Browse files
author
Clément Le Provost
committed
Add test case with null completion handler
1 parent eae6beb commit 8702cc4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

algoliasearch/src/test/java/com/algolia/search/saas/IndexTest.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -635,4 +635,10 @@ private void verifySearchTwiceCalls(int nbTimes, int waitBetweenSeconds) throws
635635
index.search(query);
636636
verify(mockClient, times(nbTimes)).postRequestRaw(anyString(), anyString(), anyBoolean());
637637
}
638+
639+
@Test
640+
public void testNullCompletionHandler() throws Exception {
641+
// Check that the code does not crash when no completion handler is specified.
642+
index.addObjectAsync(new JSONObject("{\"city\": \"New York\"}"), null);
643+
}
638644
}

0 commit comments

Comments
 (0)