Sample Testing and Mix Optimization