@Test
public void testTimes() {

    // timesByDouble
    assertCoefficientsEquals(new double[]{A * C, B * C}, valueOf(A, B).times(C));
    assertCoefficientsEquals(new double[]{0}, valueOf(A, B, C).times(0));
    assertCoefficientsEquals(new double[]{A, B, C}, valueOf(A, B, C).times(1));
    // timesByPolynomial
    assertCoefficientsEquals(new double[]{-2, 6, -7, 1, 4, -3}, valueOf(-2, 4, -3).times(valueOf(1, -1, 0, 1)));
    assertCoefficientsEquals(new double[]{0}, valueOf(A, B, C).times(valueOf(0)));
    assertCoefficientsEquals(new double[]{0}, valueOf(0).times(valueOf(A, B, C)));
    assertCoefficientsEquals(new double[]{A, B, C}, valueOf(A, B, C).times(valueOf(1)));
    assertCoefficientsEquals(new double[]{A, B, C}, valueOf(1).times(valueOf(A, B, C)));
}