### Question:
FileSessionProvider extends SessionProvider { @Override public SessionMirror open(String id) throws SessionException, IOException { if (id == null) { throw new IllegalArgumentException("id must not be null"); } LOG.debug("Opening session: {}", id); return attach(id, false, 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 open() throws Exception { createAndClose("testing"); openAndClose("testing"); }
@Test public void open_conflict() throws Exception { createAndClose("testing"); try (SessionMirror other = provider.open("testing")) { try { openAndClose("testing"); fail(); } catch (SessionException e) { assertThat(e.getSessionId(), is("testing")); assertThat(e.getReason(), is(Reason.ACQUIRED)); } } }