/**
  * Tests decodeValue() with illegal data
  *
  * @param value to decode
  */
 @Test(
     dataProvider = "testDecodeValueData2",
     expectedExceptions = {AssertionError.class, IllegalPropertyValueStringException.class})
 public void testDecodeValue2(String value) {
   BooleanPropertyDefinition d = createPropertyDefinition();
   d.decodeValue(value);
 }
 /**
  * Tests decodeValue() with illegal data.
  *
  * @param value to decode
  */
 @Test(
     dataProvider = "testDecodeValueData2",
     expectedExceptions = {NullPointerException.class, PropertyException.class})
 public void testDecodeValue2(String value) {
   BooleanPropertyDefinition d = createPropertyDefinition();
   d.decodeValue(value);
 }
  /**
   * Sets up tests.
   *
   * @throws Exception If the server could not be initialized.
   */
  @BeforeClass
  public void setUp() throws Exception {
    // This test suite depends on having the schema available, so
    // we'll start the server.
    TestCaseUtils.startServer();

    builder = BooleanPropertyDefinition.createBuilder(RootCfgDefn.getInstance(), "test-property");
  }
 /**
  * Tests decodeValue()
  *
  * @param value to decode
  * @param expected value
  */
 @Test(dataProvider = "testDecodeValueData")
 public void testDecodeValue(String value, Boolean expected) {
   BooleanPropertyDefinition d = createPropertyDefinition();
   assertEquals(d.decodeValue(value), expected);
 }
 /** Tests validateValue() with illegal data */
 @Test(expectedExceptions = AssertionError.class)
 public void testValidateValue2() {
   BooleanPropertyDefinition d = createPropertyDefinition();
   d.validateValue(null);
 }
 /** Tests validateValue() with valid data */
 @Test
 public void testValidateValue1() {
   BooleanPropertyDefinition d = createPropertyDefinition();
   d.validateValue(Boolean.TRUE);
 }
 /** Tests validateValue() with illegal data. */
 @Test(expectedExceptions = NullPointerException.class)
 public void testValidateValue2() {
   BooleanPropertyDefinition d = createPropertyDefinition();
   d.validateValue(null);
 }