messageStore.addPartitionMessages(0, messages);
}
@Test
public void testIntFloatMessageStore() throws IOException {
IntFloatMessageStore messageStore =
new IntFloatMessageStore(service, new FloatSumMessageCombiner());
insertIntFloatMessages(messageStore);
Iterable<FloatWritable> m0 =
messageStore.getVertexMessages(new IntWritable(0));
Assert.assertEquals(1, Iterables.size(m0));
Assert.assertEquals((float) 10.0, m0.iterator().next().get());
Iterable<FloatWritable> m1 =
messageStore.getVertexMessages(new IntWritable(1));
Assert.assertEquals(1, Iterables.size(m1));
Assert.assertEquals((float) 8.0, m1.iterator().next().get());
Iterable<FloatWritable> m2 =
messageStore.getVertexMessages(new IntWritable(2));
Assert.assertEquals(1, Iterables.size(m2));
Assert.assertEquals((float) 3.0, m2.iterator().next().get());
Assert.assertTrue(
Iterables.isEmpty(messageStore.getVertexMessages(new IntWritable(3))));
}