### Question:
JdbcNativeExtractor implements IExtractor<T, S> { @Override public Partition[] getPartitions(S config) { jdbcDeepJobConfig = initConfig(config, jdbcDeepJobConfig); int upperBound = jdbcDeepJobConfig.getUpperBound(); int lowerBound = jdbcDeepJobConfig.getLowerBound(); int numPartitions = jdbcDeepJobConfig.getNumPartitions(); int length = 1 + upperBound - lowerBound; Partition [] result = new Partition[numPartitions]; for(int i=0; i<numPartitions; i++) { int start = lowerBound + lowerBound + ((i * length) / numPartitions); int end = lowerBound + (((i + 1) * length) / numPartitions) - 1; result[i] = new JdbcPartition(i, start, end); } return result; }  @Override Partition[] getPartitions(S config); @Override boolean hasNext(); @Override T next(); @Override void close(); @Override void initIterator(Partition dp, S config); @Override void saveRDD(T t); @Override List<String> getPreferredLocations(Partition split); @Override void initSave(S config, T first, UpdateQueryBuilder queryBuilder);  }### Answer:
@Test public void testPartitions() { JdbcNativeExtractor extractor = createJdbcNativeExtractor(); Partition [] partitions = extractor.getPartitions(createJdbcDeepJobConfig()); assertEquals(partitions.length, NUM_PARTITIONS); JdbcPartition partition0 = (JdbcPartition)partitions[0]; assertEquals(partition0.index(), 0); assertEquals(partition0.lower(), 0); assertEquals(partition0.upper(), Integer.MAX_VALUE - 1); }