### Question:
TriggerClient { @SuppressWarnings("unchecked") public List<Trigger> get(TriggerGetParam param) { JSONObject params = JSONObject.fromObject(param, defaultConfig); JSONArray result = (JSONArray) accessor.execute("trigger.get", params); JsonConfig config = defaultConfig.copy(); config.setCollectionType(List.class); config.setRootClass(Trigger.class); config.setJavaPropertyFilter(new PropertyFilter() { @Override public boolean apply(Object source, String name, Object value) { if ("hosts".equals(name)) { return true; } return false; } }); return (List<Trigger>) JSONArray.toCollection(result, config); } TriggerClient(ZabbixAccessor accessor, JsonConfig defaultConfig); @SuppressWarnings("unchecked") List<Trigger> get(TriggerGetParam param);  }### Answer:
@Test public void testGetAll() { TriggerGetParam param = new TriggerGetParam(); param.setHostids(Arrays.asList("10001")); param.setOutput("extend"); List<Trigger> triggers = client.trigger().get(param); for (Trigger trigger : triggers) { log.trace(ReflectionToStringBuilder.toString(trigger, ToStringStyle.SHORT_PREFIX_STYLE)); } assertTrue(triggers.size() > 0); }
@Test public void testGet() { TriggerGetParam param = new TriggerGetParam(); param.setTriggerids(Arrays.asList("10010", "10011")); param.setOutput("extend"); List<Trigger> triggers = client.trigger().get(param); assertEquals(2, triggers.size()); assertTrue("10010".equals(triggers.get(0).getTriggerid()) || "10011".equals(triggers.get(0).getTriggerid())); assertTrue("10010".equals(triggers.get(1).getTriggerid()) || "10011".equals(triggers.get(1).getTriggerid())); }