### Question:
BSHGroupSelector extends BSHTransactionParticipant implements GroupSelector { public void setConfiguration(Element e) throws ConfigurationException { super.setConfiguration(e); try { selectMethod = BSHMethod.createBshMethod(e.getChild("select")); } catch (Exception ex) { throw new ConfigurationException(ex.getMessage(), ex); } }  void setConfiguration(Element e); String select(long id, java.io.Serializable context); String defaultSelect(long id, Serializable context);  }### Answer:
@Test public void testSetConfiguration() throws Throwable { BSHGroupSelector bSHGroupSelector = new BSHGroupSelector(); bSHGroupSelector.setConfiguration(new Element("testBSHGroupSelectorName", "testBSHGroupSelectorUri")); assertNull(bSHGroupSelector.prepareForAbortMethod, "bSHGroupSelector.prepareForAbortMethod"); assertNull(bSHGroupSelector.selectMethod, "bSHGroupSelector.selectMethod"); assertNull(bSHGroupSelector.commitMethod, "bSHGroupSelector.commitMethod"); assertNull(bSHGroupSelector.abortMethod, "bSHGroupSelector.abortMethod"); assertNull(bSHGroupSelector.prepareMethod, "bSHGroupSelector.prepareMethod"); assertFalse(bSHGroupSelector.trace, "bSHGroupSelector.trace"); }
@Test public void testSetConfigurationThrowsConfigurationException() throws Throwable { BSHGroupSelector bSHGroupSelector = new BSHGroupSelector(); try { bSHGroupSelector.setConfiguration(null); fail("Expected ConfigurationException to be thrown"); } catch (ConfigurationException ex) { if (isJavaVersionAtMost(JAVA_14)) { assertNull(ex.getMessage(), "ex.getMessage()"); assertNull(ex.getNested().getMessage(), "ex.getNested().getMessage()"); } else { assertEquals("Cannot invoke \"org.jdom2.Element.getChild(String)\" because \"e\" is null", ex.getMessage(), "ex.getMessage()"); assertEquals("Cannot invoke \"org.jdom2.Element.getChild(String)\" because \"e\" is null", ex.getNested().getMessage(), "ex.getNested().getMessage()"); } assertNull(bSHGroupSelector.prepareForAbortMethod, "bSHGroupSelector.prepareForAbortMethod"); assertNull(bSHGroupSelector.selectMethod, "bSHGroupSelector.selectMethod"); assertNull(bSHGroupSelector.commitMethod, "bSHGroupSelector.commitMethod"); assertNull(bSHGroupSelector.abortMethod, "bSHGroupSelector.abortMethod"); assertNull(bSHGroupSelector.prepareMethod, "bSHGroupSelector.prepareMethod"); assertFalse(bSHGroupSelector.trace, "bSHGroupSelector.trace"); } }