>     }
>  
> +   @Test
> +   void testCloserCallOneClose() throws IOException, InterruptedException {
> +      Injector i = createInjector();
> +      final Closer closer = i.getInstance(Closer.class);
> +      assert closer.getState() == Closer.State.OPEN;
> +
> +      Closeable closeable = EasyMock.createMock(Closeable.class);
> +
> +      closeable.close();
> +
> +      EasyMock.expectLastCall().times(1);
> +
> +      EasyMock.replay(closeable);

With some static imports, this could boil down to:
```
Closeable closeable = createStrictMock(Closeable.class);
closeable.close();
expectLastCall(); // don't need times(1), see "If no call count is specified, 
one call is expected." in http://www.easymock.org/EasyMock3_0_Documentation.html
replay(closeable);
```

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/32/files#r4723865

Reply via email to