StringPartFirstLettersHasher implements BucketHasher<String> { public void setNumberOfParts(int numberOfParts) { Preconditions.checkArgument(numberOfParts >= 1); this.numberOfParts = numberOfParts; }  String hash(String value); void setNumberOfParts(int numberOfParts); void setNumberOfLettersPerPart(int numberOfLettersPerPart);  }
@Test(expected = IllegalArgumentException.class) public void hash_numberOfParts_less_than_1() { hasher.setNumberOfParts(0); }