### Question:
ResultDescriptor implements Serializable { public ResultDescriptor step(long step) { return step(Duration.millis(step)); } ResultDescriptor();  ResultDescriptor(long step);  ResultDescriptor(Duration step); Duration getInterval(); Map<String, Datasource> getDatasources(); Map<String, Calculation> getCalculations(); Set<String> getSourceNames(); Set<String> getLabels(); Set<String> getExports(); ResultDescriptor step(long step); ResultDescriptor step(Duration step); ResultDescriptor datasource(String metricName, AggregationFunction aggregationFunction); ResultDescriptor datasource(String name, String metricName, AggregationFunction aggregationFunction); ResultDescriptor datasource(String name, String metricName, long heartbeat, AggregationFunction aggregationFunction); ResultDescriptor datasource(String name, String metricName, Duration heartbeat, AggregationFunction aggregationFunction); ResultDescriptor datasource(String name, String metricName, Duration heartbeat, double xff, AggregationFunction aggregationFunction); ResultDescriptor export(String... names); ResultDescriptor calculate(Calculation calculation); ResultDescriptor calculate(String label, CalculationFunction calculationFunction, String... args); ResultDescriptor calculate(String label, final BinaryFunction binaryFunction, String arg1, String arg2); ResultDescriptor calculate(String label, final UnaryFunction unaryFunction, String arg); ResultDescriptor expression(String label, String expression); @Override String toString(); static final int DEFAULT_STEP; static final int DEFAULT_HEARTBEAT_MULTIPLIER; static final double DEFAULT_XFF; }### Answer:
@Test public void testStep() { assertEquals(400000, new ResultDescriptor(400000).getInterval().asMillis()); assertEquals(400000, new ResultDescriptor(Duration.millis(400000)).getInterval().asMillis()); assertEquals(ResultDescriptor.DEFAULT_STEP, new ResultDescriptor().getInterval().asMillis()); assertEquals(400000, new ResultDescriptor().step(400000).getInterval().asMillis()); assertEquals(400000, new ResultDescriptor().step(Duration.millis(400000)).getInterval().asMillis()); assertTrue(new ResultDescriptor().step(1000) instanceof ResultDescriptor); assertTrue(new ResultDescriptor().step(Duration.millis(1000)) instanceof ResultDescriptor); }