@Test
public void toFlags() {

	final Random random = new Random();
	final boolean[] flags = new boolean[100];
	final Optimize[] opts = new Optimize[flags.length];
	for (int i = 0; i < flags.length; ++i) {
		flags[i]  = random.nextBoolean();
		if (flags[i]) {
			opts[i] = Optimize.MAXIMUM;
		} else {
			opts[i] = Optimize.MINIMUM;
		}
	}
	Assert.assertEquals(Vecs.toFlags(List.of(opts)), flags);
}