    @Test
    @SuppressWarnings("unchecked")
    public void chain() {

        final List<Map<String, Object>> stooges = new ArrayList<Map<String, Object>>() { {
            add(new LinkedHashMap<String, Object>() { { put("name", "curly"); put("age", 25); } });
            add(new LinkedHashMap<String, Object>() { { put("name", "moe"); put("age", 21); } });
            add(new LinkedHashMap<String, Object>() { { put("name", "larry"); put("age", 23); } });
        } };
        final String youngest = Chaining.chain(stooges)
            .sortBy(
                new Function<Map<String, Object>, Integer>() {
                public Integer apply(Map<String, Object> item) {
                    return (Integer) item.get("age");
                }
            })
            .map(
                new Function<Map<String, Object>, String>() {
                public String apply(Map<String, Object> item) {
                    return item.get("name") + " is " + item.get("age");
                }
            })
            .first().item();
        assertEquals("moe is 21", youngest);
    }