@Test
// tests fixed length
public void testSetFunction1() throws Exception {

    this.factory.setEncodingType(EncodingType.FixedLength);
    this.factory.setFixedPrecision(0.1); // dummy on purpose
    this.factory.setFixedLength(16);
    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[]{16, 16, 16}, descriptor.getVariablesLengths());
    for (int i = 0; i < 3; i++){
        assertTrue(this.function.getMaximum()[i] <= Math.pow(2, 16)*descriptor.getVariablesPrecisions()[i]);
    }
    assertEquals(0.000152590219, descriptor.getVariablesPrecisions()[0], 0.000000000001);
    assertEquals(1525902.19, descriptor.getVariablesPrecisions()[1], 0.01);
    assertEquals(1.068131E97, descriptor.getVariablesPrecisions()[2], 0.0001E97);
}