public class ReadAttributeTaskTest {
@Test
public void testCancellation() throws Exception {
Client mockClient = mock(Client.class);
stub(mockClient.readAttribute(null)).toReturn(new AbstractMap.SimpleEntry<java.lang.Object, wpn.hdri.ss.data.Timestamp>(null, new Timestamp(System.currentTimeMillis())));
Attribute mockAttribute = mock(Attribute.class);
Logger mockLogger = mock(Logger.class);
ScheduledExecutorService singleThreadExecutor = Executors.newScheduledThreadPool(1);
PollingReadAttributeTask command = new PollingReadAttributeTask(mockAttribute, mockClient, 0, true, mockLogger);