### Question:
PreferenceDomainBuilder implements Builder<PreferenceDomain> { @Override public PreferenceDomain build() { Preconditions.checkState(!Double.isNaN(minimum), "no minimum preference specified"); Preconditions.checkState(!Double.isNaN(maximum), "no maximum preference specified"); return new PreferenceDomain(minimum, maximum, precision); } PreferenceDomainBuilder();  PreferenceDomainBuilder(double min, double max); double getMinimum(); PreferenceDomainBuilder setMinimum(double min); double getMaximum(); PreferenceDomainBuilder setMaximum(double max); double getPrecision(); PreferenceDomainBuilder setPrecision(double prec); @Override PreferenceDomain build();  }### Answer:
@Test public void testEmptyBuilder() { PreferenceDomainBuilder bld = new PreferenceDomainBuilder(); try { bld.build(); fail("builder should throw an exception with no arguments"); } catch (IllegalStateException e) { } }