SimpleMsScan extends AbstractMsSpectrum implements MsScan { @Override @Nonnull public List<IsolationInfo> getIsolations() { return isolations; } SimpleMsScan(@Nonnull Integer scanNumber);  SimpleMsScan(@Nonnull Integer scanNumber, String msFunction); @Override @Nullable RawDataFile getRawDataFile(); void setRawDataFile(@Nonnull RawDataFile newRawDataFile); @Override @Nonnull Integer getScanNumber(); void setScanNumber(@Nonnull Integer scanNumber); @Override @Nullable String getScanDefinition(); void setScanDefinition(@Nullable String scanDefinition); @Override @Nullable String getMsFunction(); void setMsFunction(@Nullable String newFunction); @Override @Nullable Integer getMsLevel(); void setMsLevel(@Nonnull Integer msLevel); @Override @Nullable Range<Double> getScanningRange(); void setScanningRange(@Nullable Range<Double> newScanRange); @Override @Nonnull PolarityType getPolarity(); void setPolarity(@Nonnull PolarityType newPolarity); @Override @Nonnull MsScanType getMsScanType(); void setMsScanType(@Nonnull MsScanType newMsScanType); @Override MzTolerance getMzTolerance(); void setMzTolerance(MzTolerance mzTolerance); @Override @Nullable Float getRetentionTime(); void setRetentionTime(@Nullable Float rt); @Override @Nullable ActivationInfo getSourceInducedFragmentation(); void setSourceInducedFragmentation(@Nullable ActivationInfo newFragmentationInfo); @Override @Nonnull List<IsolationInfo> getIsolations();  }
@Test public void testIsolationInfo() throws MSDKException { Assert.assertEquals(new LinkedList<>(), msScan1.getIsolations()); final @Nonnull List<IsolationInfo> newIsolations = msScan1.getIsolations(); newIsolations.add(new SimpleIsolationInfo(Range.closed(1.2, 8.9))); newIsolations.add(new SimpleIsolationInfo(Range.closed(0.0, 10.0), 0.5f, 500.123, 1, null, null)); Assert.assertEquals(Range.closed(0.0, 10.0), newIsolations.get(1).getIsolationMzRange()); Assert.assertEquals(new Float(0.5), newIsolations.get(1).getIonInjectTime()); Assert.assertEquals(new Double(500.123), newIsolations.get(1).getPrecursorMz()); Assert.assertEquals(new Integer(1), newIsolations.get(1).getPrecursorCharge()); }