@Test
public void shouldProvideLongForDouble() throws Exception {

    assertThat(new JcrValue(factories, PropertyType.DOUBLE, 1.0).getLong(), is(1L));
    assertThat(new JcrValue(factories, PropertyType.DOUBLE, Double.MAX_VALUE).getLong(), is(Long.MAX_VALUE));
}