assertEquals(7, retrievedGraph.size());
}
public void testReaddingSame() throws Exception {
ToyClock clock = new ToyClock();
Store store = getStoreImpl(clock);
Source source = new SourceImpl("http://example.org/graph-source");
FCAGraph[] graphs = new FCAGraph[3];
graphs[0] = new FCAGraphImpl(
modelWithStatements("_a dc:subject ''"));
graphs[1] = new FCAGraphImpl(
modelWithStatements("_a dc:author 'bla'"));
graphs[2] = new FCAGraphImpl(
modelWithStatements("_a dc:subject ''"));
clock.setTime(new W3CDateFormat()
.parse("2006-05-01T16:30:00Z"));
store.updateGraph(source, graphs[0]);
clock.setTime(new W3CDateFormat()
.parse("2006-05-01T16:32:00Z"));
store.updateGraph(source, graphs[1]);
clock.setTime(new W3CDateFormat()
.parse("2006-05-02T02:16:00Z"));
store.updateGraph(source, graphs[2]);
Set<Source> sourceSet = new HashSet<Source>();
sourceSet.add(source);
FCAGraph retrievedGraph = store.getGraphOverTime(sourceSet).getGraph(
new W3CDateFormat().parse("2006-05-01T16:31:00Z"));
assertEquals(graphs[0], retrievedGraph);
retrievedGraph = store.getGraphOverTime(sourceSet).getGraph(
new W3CDateFormat().parse("2006-05-01T16:32:00Z"));
assertEquals(graphs[1], retrievedGraph);
retrievedGraph = store.getGraphOverTime(sourceSet).getGraph(
new W3CDateFormat().parse("2006-06-01"));
assertEquals(graphs[2], retrievedGraph);
}