- Add the Codota plugin to your IDE and get smart completions
private void myMethod () {DateTime d =
new DateTime()
DateTimeFormatter formatter;String text;formatter.parseDateTime(text)
Object instant;new DateTime(instant)
- Smart code suggestions by Codota
}
public void testListTimeoutException() throws Exception { ListenableFuture<PageSet<? extends StorageMetadata>> future = createMock(ListenableFuture.class); expect(future.get(anyLong(), anyObject(TimeUnit.class))).andThrow(new RuntimeException(new TimeoutException())); expect(future.cancel(true)).andReturn(true); replay(future); AsyncBlobStore asyncBlobStore = createMock(AsyncBlobStore.class); expect(asyncBlobStore.list(anyObject(String.class), anyObject(ListContainerOptions.class))).andReturn(future); replay(asyncBlobStore); deleter = new DeleteAllKeysInList(null, asyncBlobStore, null); try { deleter.execute(containerName, ListContainerOptions.NONE); fail(); } catch (Exception e) { if (Throwables2.getFirstThrowableOfType(e, TimeoutException.class) == null) { throw e; } } }