use of com.google.webrisk.v1.SearchUrisResponse in project java-webrisk by googleapis.
the class SearchUriExampleTest method testSearchWithThreat.
@Test
public void testSearchWithThreat() throws IOException {
// The URL to be searched
String uri = "http://testsafebrowsing.appspot.com/s/malware.html";
SearchUrisResponse actualResponse = SearchUriExample.searchUriExample(uri);
List<ThreatType> type = actualResponse.getThreat().getThreatTypesList();
Truth.assertThat(type).contains(ThreatType.MALWARE);
}
Aggregations