()
| 785 | } |
| 786 | |
| 787 | @Test |
| 788 | public void map() throws CheckedFutureException { |
| 789 | Promise<Integer> p = Promise.apply(); |
| 790 | Future<Integer> f = p.map(i -> i + 1); |
| 791 | p.setValue(1); |
| 792 | assertEquals(new Integer(1), get(p)); |
| 793 | assertEquals(new Integer(2), get(f)); |
| 794 | } |
| 795 | |
| 796 | @Test |
| 797 | public void mapInterrupt() { |