@Test
// tests fixed precision
public void testSetFunction2() throws Exception {

    this.factory.setEncodingType(EncodingType.FixedPrecision);
    this.factory.setFixedPrecision(1.0);
    this.factory.setFixedLength(16); // dummy on purpose
    this.factory.setFunction(this.function);
    SimpleBinaryGenomeDescriptor descriptor = this.factory.descriptor;
    assertEquals(function.getDimension(), descriptor.getNumVariables());
    Assert.assertArrayEquals(function.getMinimum(), descriptor.getVariablesLowerBounds(), 0.0);
    Assert.assertArrayEquals(new int[]{4, 37, 339}, descriptor.getVariablesLengths());
    Assert.assertArrayEquals(new double[]{1, 1, 1}, descriptor.getVariablesPrecisions(), 0.00000000001);
}