### Question:
FluentBy extends By { public static ByStrictClassName strictClassName(final String className) { if (className == null) throw new IllegalArgumentException( "Cannot find elements when the class name expression is null."); if (className.matches(".*\\s+.*")) { throw new InvalidSelectorException( "Compound class names are not supported. Consider searching for one class name and filtering the results."); } return new ByStrictClassName(className); }  void beforeFindElement(WebDriver driver); static ByStrictClassName strictClassName(final String className); static ByAttribute attribute(final String name); static ByAttribute attribute(final String name, final String value); static ByAttribute notAttribute(final String name); static ByComposite composite(By.ByTagName b0, By.ByClassName b1); static ByComposite composite(By.ByTagName b0, FluentBy.ByAttribute b1); static ByLast last(By by); static ByLast last();  }### Answer:
@Test public void strict_class_name() throws IllegalAccessException { FindsByXPathSearchContext context = mock(FindsByXPathSearchContext.class); WebElement we = mock(WebElement.class); WebElement we2 = mock(WebElement.class); By scn = FluentBy.strictClassName("blort"); assertThat(scn.toString(), is("FluentBy.strictClassName: blort")); when(context.findElementByXPath(". WebElement blort = scn.findElement(context); assertThat(blort, is(we)); when(context.findElementsByXPath(". List<WebElement> blorts = scn.findElements(context); assertThat(blorts.get(0), is(we)); }