@Test
public void testConstructor() throws Exception {

	final AtomicBoolean flag = new AtomicBoolean();
	DefaultNoticeableFuture<?> defaultNoticeableFuture =
		new DefaultNoticeableFuture<Object>(
			new Callable<Object>() {
				@Override
				public Object call() {
					flag.set(true);
					return flag;
				}
			});
	defaultNoticeableFuture.run();
	Assert.assertSame(flag, defaultNoticeableFuture.get());
	Assert.assertTrue(flag.get());
	defaultNoticeableFuture = new DefaultNoticeableFuture<Object>(
		new Runnable() {
			@Override
			public void run() {
				flag.set(false);
			}
		},
		flag);
	defaultNoticeableFuture.run();
	Assert.assertSame(flag, defaultNoticeableFuture.get());
	Assert.assertFalse(flag.get());
}