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