test_class.file: kafka/kafka-perf-tool/src/test/java/com/ameliant/tools/kafka/perftool/drivers/partitioning/KeyAllocationStrategyTest.java
test_class.identifier: KeyAllocationStrategyTest
test_case.body: @Test
      public void testFairAllocation() {
          KeyAllocationStrategy s0 = getStrategy(KeyAllocationType.fair, 2);
          assertThat(s0.getKey(0), equalTo(s0.getKey(0))); // consistency
          assertThat(s0.getKey(0), equalTo(s0.getKey(2))); // modulo around uniqueKeys
          assertThat(s0.getKey(0), not(equalTo(s0.getKey(1))));
  
          KeyAllocationStrategy s1 = getStrategy(KeyAllocationType.fair, 2);
          assertThat(s0.getKey(0), equalTo(s1.getKey(0)));
          assertThat(s0.getKey(1), equalTo(s1.getKey(1)));
      }
test_case.class_method_signature: KeyAllocationStrategyTest.testFairAllocation()
test_case.full_signature: @Test public void testFairAllocation()
test_case.identifier: testFairAllocation
test_case.invocations: getStrategy assertThat getKey equalTo getKey assertThat getKey equalTo getKey assertThat getKey not equalTo getKey getStrategy assertThat getKey equalTo getKey assertThat getKey equalTo getKey
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testFairAllocation()
focal_class.declarator: keyAllocationType
focal_class.modifier: private final
focal_class.original_string: private final KeyAllocationType keyAllocationType;
focal_class.type: KeyAllocationType
focal_class.var_name: keyAllocationType
focal_class.declarator: uniqueKeys
focal_class.modifier: protected final
focal_class.original_string: protected final int uniqueKeys;
focal_class.type: int
focal_class.var_name: uniqueKeys
focal_class.declarator: keys = new ArrayList<>()
focal_class.modifier: protected final
focal_class.original_string: protected final List<byte[]> keys = new ArrayList<>();
focal_class.type: List<byte[]>
focal_class.var_name: keys
focal_class.file: kafka/kafka-perf-tool/src/main/java/com/ameliant/tools/kafka/perftool/drivers/partitioning/KeyAllocationStrategy.java
focal_class.identifier: KeyAllocationStrategy
focal_class.class_method_signature: KeyAllocationStrategy.KeyAllocationStrategy(KeyAllocationStrategyDefinition strategyDefinition)
focal_class.full_signature: public  KeyAllocationStrategy(KeyAllocationStrategyDefinition strategyDefinition)
focal_class.identifier: KeyAllocationStrategy
focal_class.modifiers: public
focal_class.parameters: (KeyAllocationStrategyDefinition strategyDefinition)
focal_class.signature:  KeyAllocationStrategy(KeyAllocationStrategyDefinition strategyDefinition)
focal_class.class_method_signature: KeyAllocationStrategy.toString()
focal_class.full_signature: @Override public String toString()
focal_class.identifier: toString
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String toString()
focal_class.class_method_signature: KeyAllocationStrategy.asByteArray(int i)
focal_class.full_signature: private byte[] asByteArray(int i)
focal_class.identifier: asByteArray
focal_class.modifiers: private
focal_class.parameters: (int i)
focal_class.return: byte[]
focal_class.signature: byte[] asByteArray(int i)
focal_class.class_method_signature: KeyAllocationStrategy.getKey(int messageNum)
focal_class.full_signature: public byte[] getKey(int messageNum)
focal_class.identifier: getKey
focal_class.modifiers: public
focal_class.parameters: (int messageNum)
focal_class.return: byte[]
focal_class.signature: byte[] getKey(int messageNum)
focal_method.body: public byte[] getKey(int messageNum) {
          return keys.get(messageNum % uniqueKeys);
      }
focal_method.class_method_signature: KeyAllocationStrategy.getKey(int messageNum)
focal_method.full_signature: public byte[] getKey(int messageNum)
focal_method.identifier: getKey
focal_method.invocations: get
focal_method.modifiers: public
focal_method.parameters: (int messageNum)
focal_method.return: byte[]
focal_method.signature: byte[] getKey(int messageNum)