### Question:
FileSessionProvider extends SessionProvider { @Override public SessionMirror create(String id) throws SessionException, IOException { if (id == null) { throw new IllegalArgumentException("id must not be null"); } LOG.debug("Creating session: {}", id); return attach(id, true, false); }  @Override List<String> getCreatedIds(); @Override SessionMirror create(String id); @Override SessionMirror open(String id); @Override void delete(String id); static final String KEY_DIRECTORY; }### Answer:
@Test public void create() throws Exception { createAndClose("testing"); }
@Test public void create_multiple() throws Exception { try (SessionMirror session1 = provider.create("testing1")){ createAndClose("testing2"); } }
@Test public void create_acquired() throws Exception { try (SessionMirror session = provider.create("testing")) { try { createAndClose("testing"); fail(); } catch (SessionException e) { assertThat(e.getSessionId(), is("testing")); assertThat(e.getReason(), is(Reason.ACQUIRED)); } } }
@Test public void open_acquired() throws Exception { try (SessionMirror session = provider.create("testing")) { try { openAndClose("testing"); fail(); } catch (SessionException e) { assertThat(e.getSessionId(), is("testing")); assertThat(e.getReason(), is(Reason.ACQUIRED)); } } }
@Test public void getId() throws Exception { try (SessionMirror session = provider.create("testing")) { assertThat(session.getId(), is("testing")); } }
@Test public void complete() throws Exception { try (SessionMirror session = provider.create("testing")) { session.complete(); } createAndClose("testing"); }
@Test public void abort() throws Exception { try (SessionMirror session = provider.create("testing")) { session.abort(); } createAndClose("testing"); }