@Override
    public void execute(Runnable runnable) {
        // run the task synchronously
        runnable.run();
    }
@Test
    public void testSynchronousExecutorService() {
        String name1 = Thread.currentThread().getName();

        ExecutorService service = new SynchronousExecutorService();
        service.execute(new Runnable() {
            public void run() {
                invoked = true;
                name2 = Thread.currentThread().getName();
            }
        });

        assertTrue(invoked, "Should have been invoked");
        assertEquals(name1, name2, "Should use same thread");
    }