SenseDocumentImpl extends StatementDocumentImpl implements SenseDocument { @Override public SenseDocument withStatement(Statement statement) { return new SenseDocumentImpl(getEntityId(), glosses, addStatementToGroups(statement, claims), revisionId); } SenseDocumentImpl(
			SenseIdValue id,
			List<MonolingualTextValue> glosses,
			List<StatementGroup> statements,
			long revisionId); @JsonCreator  SenseDocumentImpl(
			@JsonProperty("id") String jsonId,
			@JsonProperty("glosses") @JsonDeserialize(contentAs=TermImpl.class) Map<String, MonolingualTextValue> glosses,
			@JsonProperty("claims") Map<String, List<StatementImpl.PreStatement>> claims,
			@JsonProperty("lastrevid") long revisionId,
			@JacksonInject("siteIri") String siteIri); private  SenseDocumentImpl(
			SenseIdValue subject,
			Map<String, MonolingualTextValue> glosses,
			Map<String, List<Statement>> claims,
			long revisionId); @JsonIgnore @Override SenseIdValue getEntityId(); @JsonProperty("glosses") @Override Map<String, MonolingualTextValue> getGlosses(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); @Override SenseDocument withRevisionId(long newRevisionId); @Override SenseDocument withGloss(MonolingualTextValue gloss); @Override SenseDocument withStatement(Statement statement); @Override SenseDocument withoutStatementIds(Set<String> statementIds);  }
@Test public void testAddStatement() { Statement fresh = new StatementImpl("MyFreshId", StatementRank.NORMAL, new SomeValueSnakImpl(new PropertyIdValueImpl("P29", "http: Collections.emptyList(), Collections.emptyList(), sid); Claim claim = fresh.getClaim(); assertFalse(sd1.hasStatementValue( claim.getMainSnak().getPropertyId(), claim.getValue())); SenseDocument withStatement = sd1.withStatement(fresh); assertTrue(withStatement.hasStatementValue( claim.getMainSnak().getPropertyId(), claim.getValue())); }