### Question:
ParticlesHolder { public synchronized ParticlesHolder duplicateForTimePoints(int t) { return duplicateForTimePoints(t, t); } ParticlesHolder();  ParticlesHolder(int nParticlesBuffer);  ParticlesHolder(Map<String, String> metadata, Map<String, float[]> particleDataArrays, int npoints); synchronized ParticlesHolder duplicate(); synchronized void loadPrefsIntoMetadata(); synchronized ParticlesHolder duplicateForTimePoints(int t); synchronized ParticlesHolder duplicateForTimePoints(int tStart, int tStop); synchronized void appendNewDataArray(String name, float[] values); synchronized float[] appendNewDataArray(String key); synchronized void addMetaInfo(String key, String value); String[] getDataArrayNames(); float[] getDataArray(String key, boolean truncatedToNPoints); float[] getDataArray(String key); synchronized void addPoint(String[] keys, float [] values); synchronized FloatPolygon toFloatPolygon(); synchronized int getMinT(); synchronized int getMaxT(); synchronized float getMinDataArrayValue(String key); synchronized float getMaxDataArrayValue(String key); synchronized void incrementT(int t); synchronized float[] getMagnifiedArray(String key, float magnification); synchronized void appendPolygon(Polygon plg, int time, float xoffset, float yoffset); synchronized void appendPolygon(FloatPolygon fplg, int time, float xoffset, float yoffset); synchronized void appendParticlesHolder(ParticlesHolder peaks); synchronized float [] getClosest(float x, float y, float z, float t); synchronized Map<String, Float> getDetectionError(ParticlesHolder trueParticles,
                                      float toleranceLateralRadius,
                                      float toleranceAxialRadius,
                                      float toleranceTemporalRadius); synchronized String getDetectionErrorString(ParticlesHolder trueParticles,
                                          float toleranceLateralRadius,
                                          float toleranceAxialRadius,
                                          float toleranceTemporalRadius); public Map<String, String> metadata; public int npoints; }### Answer:
@Test public void testDuplicateForTimePoints() throws Exception { ParticlesHolder peaks = new ParticlesHolder(); String [] entryNames = {"signal", "x", "y", "z", "t"}; float [] entryValues = new float[5]; for (int t=0; t<10; t++) { entryValues[0] = 1; entryValues[1] = Randomizer.random.nextFloat(); entryValues[2] = Randomizer.random.nextFloat(); entryValues[3] = Randomizer.random.nextFloat(); entryValues[4] = t; peaks.addPoint(entryNames, entryValues); } assert(peaks.duplicateForTimePoints(1).npoints == 1); }