@Test
public void testWithCompressionFactor_1() throws Exception {

    Quantizer<BigDecimal> quantizer = BigDecimalQuantizer.withCompressionFactor(1);
    // Note: comparing using toString, as double comparison with epsilon would not distinguish 0.0 from -0.0...
    Assert.assertEquals("0", quantizer.getQuantizedValue(BigDecimal.valueOf(0.0)).toString());
    Assert.assertEquals("4", quantizer.getQuantizedValue(BigDecimal.valueOf(4.2)).toString());
    Assert.assertEquals("5", quantizer.getQuantizedValue(BigDecimal.valueOf(5.0)).toString());
    Assert.assertEquals("9", quantizer.getQuantizedValue(BigDecimal.valueOf(9.9)).toString());
    Assert.assertEquals("11", quantizer.getQuantizedValue(BigDecimal.valueOf(11.3)).toString());
    Assert.assertEquals("0", quantizer.getQuantizedValue(BigDecimal.valueOf(-0.0)).toString());
    Assert.assertEquals("-4", quantizer.getQuantizedValue(BigDecimal.valueOf(-4.2)).toString());
    Assert.assertEquals("-5", quantizer.getQuantizedValue(BigDecimal.valueOf(-5.0)).toString());
    Assert.assertEquals("-9", quantizer.getQuantizedValue(BigDecimal.valueOf(-9.9)).toString());
    Assert.assertEquals("-11", quantizer.getQuantizedValue(BigDecimal.valueOf(-11.3)).toString());
}