@Test public void shouldCreateGenericEntity() { testSliEntity = new TestSliEntity(); GenericEntity entity = testSliEntity.createGenericEntity(); Assert.assertNotNull("GenericEntity null", entity); Assert.assertNotNull("Entity body null", entity.getData()); Assert.assertEquals("Incorrect entity type", "TestEntity", entity.getEntityType()); }
public GenericEntity createGenericEntity() { GenericEntity entity = new GenericEntity(entityType(), createBody()); return entity; }
SliEntity { public GenericEntity createGenericEntity() { GenericEntity entity = new GenericEntity(entityType(), createBody()); return entity; } }
SliEntity { public GenericEntity createGenericEntity() { GenericEntity entity = new GenericEntity(entityType(), createBody()); return entity; } SliEntity(); }
SliEntity { public GenericEntity createGenericEntity() { GenericEntity entity = new GenericEntity(entityType(), createBody()); return entity; } SliEntity(); abstract String entityType(); GenericEntity createGenericEntity(); Map<String, Object> createBody(); JsonNode json(); @JsonIgnore boolean isCreatedByOthers(); @JsonIgnore String getCreatorRefId(); @JsonIgnore void setCreatorRefId(String creatorRefId); @JsonIgnore String getZoneId(); @JsonIgnore void setZoneId(String zoneId); @JsonIgnore String getOtherSifRefId(); @JsonIgnore void setOtherSifRefId(String otherSifRefId); @JsonIgnore boolean hasOtherSifRefId(); @Override String toString(); }
SliEntity { public GenericEntity createGenericEntity() { GenericEntity entity = new GenericEntity(entityType(), createBody()); return entity; } SliEntity(); abstract String entityType(); GenericEntity createGenericEntity(); Map<String, Object> createBody(); JsonNode json(); @JsonIgnore boolean isCreatedByOthers(); @JsonIgnore String getCreatorRefId(); @JsonIgnore void setCreatorRefId(String creatorRefId); @JsonIgnore String getZoneId(); @JsonIgnore void setZoneId(String zoneId); @JsonIgnore String getOtherSifRefId(); @JsonIgnore void setOtherSifRefId(String otherSifRefId); @JsonIgnore boolean hasOtherSifRefId(); @Override String toString();  }