### Question:
DevelopmentModePersisterSelector implements PersisterSelector { @Override public String getPersisterId(final ScopePath scopePath, final Collection<String> configPersisterIds) { if (configPersisterIds.size() == 0) { throw new IllegalStateException("Didn't get any configuration persister!"); } if (developmentMode && scopePath != null && scopePath.findScopeByName(UserScopeDescriptor.NAME) != null) { return InMemoryPersister.ID; } return persisterSelector.getPersisterId(scopePath, configPersisterIds); } DevelopmentModePersisterSelector(final PersisterSelector persisterSelector, final boolean developmentMode); @Override String getPersisterId(final ScopePath scopePath, final Collection<String> configPersisterIds); boolean isDevelopmentMode(); void setDevelopmentMode(final boolean developmentMode);  }### Answer:
@Test public void testReturnSinglePersister() { final PersisterSelector selector = new DevelopmentModePersisterSelector(new DefaultPersisterSelector(), false); final String persisterId = selector.getPersisterId(null, Arrays.asList("test")); Assert.assertEquals("test", persisterId); }
@Test(expected = IllegalStateException.class) public void testExceptionIfNoPersister() { final PersisterSelector selector = new DevelopmentModePersisterSelector(new DefaultPersisterSelector(), false); selector.getPersisterId(null, Collections.<String> emptyList()); }
@Test(expected = IllegalStateException.class) public void testExceptionIfTwoPersister() { final PersisterSelector selector = new DevelopmentModePersisterSelector(new DefaultPersisterSelector(), false); selector.getPersisterId(null, Arrays.asList("test", "test2")); }