### Question:
NetworkSamples { public NetworkSamples drop(int dropCount) { Preconditions.checkArgument(dropCount >= 0, "Cannot drop %s samples. Drop count must be positive.", dropCount); if (dropCount == 0) { return this; } final Map<VariableReference, List<?>> withSamplesDropped = samplesByVariable.entrySet().parallelStream() .collect(toMap( Map.Entry::getKey, e -> e.getValue().subList(dropCount, size)) ); final List<Double> withLogProbsDropped = logOfMasterPForEachSample.subList(dropCount, size); return new NetworkSamples(withSamplesDropped, withLogProbsDropped, size - dropCount); } NetworkSamples(Map<VariableReference, ? extends List> samplesByVariable, List<Double> logOfMasterPForEachSample, int size); static NetworkSamples from(List<NetworkSample> networkSamples); int size(); Samples<T> get(Variable<T, ?> variable); Samples<T> get(VariableReference variableReference); DoubleVertexSamples getDoubleTensorSamples(Variable<DoubleTensor, ?> variable); DoubleVertexSamples getDoubleTensorSamples(VariableReference variableReference); IntegerVertexSamples getIntegerTensorSamples(Variable<IntegerTensor, ?> variable); IntegerVertexSamples getIntegerTensorSamples(VariableReference variableReference); BooleanVertexSamples getBooleanTensorSamples(Variable<BooleanTensor, ?> variable); BooleanVertexSamples getBooleanTensorSamples(VariableReference variableReference); NetworkSamples drop(int dropCount); NetworkSamples downSample(final int downSampleInterval); double probability(Function<NetworkState, Boolean> predicate); NetworkState getNetworkState(int sample); double getLogOfMasterP(int sample); List<NetworkState> toNetworkStates(); NetworkState getMostProbableState();  }### Answer:
@Test(expected = IllegalArgumentException.class) public void doesCatchInvalidDropCount() { samples.drop(-1); }
@Test public void doesNothingOnDropZero() { assertEquals(samples, samples.drop(0)); }