@Test
  public void testUnsupportedParameter() throws OrekitException {
    Orbit initialOrbit =
        new KeplerianOrbit(
            8000000.0,
            0.01,
            0.1,
            0.7,
            0,
            1.2,
            PositionAngle.TRUE,
            FramesFactory.getEME2000(),
            AbsoluteDate.J2000_EPOCH,
            Constants.EIGEN5C_EARTH_MU);

    double dP = 0.001;
    NumericalPropagator propagator =
        setUpPropagator(
            initialOrbit,
            dP,
            OrbitType.EQUINOCTIAL,
            PositionAngle.TRUE,
            new ThirdBodyAttraction(CelestialBodyFactory.getSun()),
            new ThirdBodyAttraction(CelestialBodyFactory.getMoon()));
    PartialDerivativesEquations partials = new PartialDerivativesEquations("partials", propagator);
    partials.selectParamAndStep("non-existent", 1.0);
    try {
      partials.computeDerivatives(new SpacecraftState(initialOrbit), new double[6]);
      Assert.fail("an exception should have been thrown");
    } catch (OrekitException oe) {
      Assert.assertEquals(OrekitMessages.UNSUPPORTED_PARAMETER_NAME, oe.getSpecifier());
    }
  }
  @Test
  public void testWrongParametersDimension() throws OrekitException {
    Orbit initialOrbit =
        new KeplerianOrbit(
            8000000.0,
            0.01,
            0.1,
            0.7,
            0,
            1.2,
            PositionAngle.TRUE,
            FramesFactory.getEME2000(),
            AbsoluteDate.J2000_EPOCH,
            Constants.EIGEN5C_EARTH_MU);

    double dP = 0.001;
    NumericalPropagator propagator =
        setUpPropagator(
            initialOrbit,
            dP,
            OrbitType.EQUINOCTIAL,
            PositionAngle.TRUE,
            new ThirdBodyAttraction(CelestialBodyFactory.getSun()),
            new ThirdBodyAttraction(CelestialBodyFactory.getMoon()));
    PartialDerivativesEquations partials = new PartialDerivativesEquations("partials", propagator);
    partials.setInitialJacobians(
        new SpacecraftState(initialOrbit), new double[6][6], new double[6][3]);
    partials.selectParameters("Sun attraction coefficient");
    try {
      partials.computeDerivatives(new SpacecraftState(initialOrbit), new double[6]);
      Assert.fail("an exception should have been thrown");
    } catch (OrekitException oe) {
      Assert.assertEquals(
          OrekitMessages.INITIAL_MATRIX_AND_PARAMETERS_NUMBER_MISMATCH, oe.getSpecifier());
    }
  }