### Question:
SpelParsedPartitionPredicate implements PartitionPredicate { @Override public short getPartitionPredicateLimit() { Short partitionLimit = tableReplication.getSourceTable().getPartitionLimit(); return partitionLimit == null ? -1 : partitionLimit; } SpelParsedPartitionPredicate(SpringExpressionParser expressionParser, TableReplication tableReplication); @Override String getPartitionPredicate(); @Override short getPartitionPredicateLimit();  }### Answer:
@Test public void partitionPredicateLimit() throws Exception { when(sourceTable.getPartitionLimit()).thenReturn((short) 10); assertThat(predicate.getPartitionPredicateLimit(), is((short) 10)); }
@Test public void noPartitionPredicateLimitSetDefaultsToMinus1() throws Exception { when(sourceTable.getPartitionLimit()).thenReturn(null); assertThat(predicate.getPartitionPredicateLimit(), is((short) -1)); }