### Question:
JcrValue implements Value, org.modeshape.jcr.api.Value { public boolean getBoolean() throws ValueFormatException { try { boolean convertedValue = valueFactories.getBooleanFactory().create(value); return convertedValue; } catch (RuntimeException error) { throw createValueFormatException(boolean.class); } } JcrValue( ValueFactories valueFactories,
              SessionCache sessionCache,
              int type,
              Object value );   JcrValue( ValueFactories valueFactories,
              SessionCache sessionCache,
              Value value ); boolean getBoolean(); Calendar getDate(); @Override BigDecimal getDecimal(); double getDouble(); long getLong(); InputStream getStream(); javax.jcr.Binary getBinary(); String getString(); int getType(); @Override int hashCode(); @Override boolean equals( Object obj ); @Override String toString();  }### Answer:
@Test public void shouldProvideBooleanForBoolean() throws Exception { assertThat(value.getBoolean(), is(true)); }
@Test( expected = ValueFormatException.class ) public void shouldNotProvideBooleanForDate() throws Exception { new JcrValue(factories, cache, PropertyType.DATE, new Date()).getBoolean(); }
@Test( expected = ValueFormatException.class ) public void shouldNotProvideBooleanForDouble() throws Exception { new JcrValue(factories, cache, PropertyType.DOUBLE, 0.0).getBoolean(); }
@Test( expected = ValueFormatException.class ) public void shouldNotProvideBooleanForLong() throws Exception { new JcrValue(factories, cache, PropertyType.LONG, 0L).getBoolean(); }
@Test public void shouldProvideBooleanForString() throws Exception { assertThat(new JcrValue(factories, cache, PropertyType.STRING, "true").getBoolean(), is(true)); assertThat(new JcrValue(factories, cache, PropertyType.STRING, "yes").getBoolean(), is(false)); }
@Test public void shouldProvideBooleanForUuid() throws Exception { assertThat(new JcrValue(factories, cache, PropertyType.STRING, UUID.randomUUID()).getBoolean(), is(false)); }