()
| 2923 | } |
| 2924 | |
| 2925 | @Test |
| 2926 | public void testKeySet() throws Exception { |
| 2927 | Map<String, Object> m = new HashMap<String, Object>(); |
| 2928 | m.put("open", "apache"); |
| 2929 | m.put("1", "hadoop"); |
| 2930 | m.put("source", "code"); |
| 2931 | Tuple input = TupleFactory.getInstance().newTuple(m); |
| 2932 | |
| 2933 | KEYSET keySet = new KEYSET(); |
| 2934 | DataBag result = keySet.exec(input); |
| 2935 | Iterator<Tuple> i = result.iterator(); |
| 2936 | assertEquals(result.size(), m.size()); |
| 2937 | |
| 2938 | while(i.hasNext()) { |
| 2939 | Tuple t = i.next(); |
| 2940 | assertTrue(m.containsKey((String)t.get(0))); |
| 2941 | } |
| 2942 | |
| 2943 | } |
| 2944 | |
| 2945 | @SuppressWarnings("unchecked") |
| 2946 | @Test |
nothing calls this directly
no test coverage detected