113113import static io .spine .server .storage .datastore .given .DsRecordStorageTestEnv .recordIds ;
114114import static io .spine .server .storage .datastore .given .DsRecordStorageTestEnv .sortedIds ;
115115import static io .spine .server .storage .datastore .given .TestEnvironment .singleTenantSpec ;
116+ import static io .spine .test .storage .Project .Status .STARTED ;
116117import static java .util .Collections .singletonList ;
117118import static java .util .stream .Collectors .toList ;
118119import static org .junit .Assert .assertFalse ;
@@ -155,7 +156,7 @@ protected Message newState(ProjectId projectId) {
155156 private EntityRecordWithColumns newRecordWithColumns (RecordStorage <ProjectId > storage ) {
156157 EntityRecord record = newStorageRecord ();
157158 Entity <ProjectId , Project > entity = new TestCounterEntity (newId ());
158- EntityRecordWithColumns recordWithColumns = create (record , entity , storage );
159+ EntityRecordWithColumns recordWithColumns = create (record , entity , storage . entityClass () );
159160 return recordWithColumns ;
160161 }
161162
@@ -209,6 +210,7 @@ void testPersistColumns() {
209210
210211 ProjectId id = newId ();
211212 TestCounterEntity entity = new TestCounterEntity (id );
213+ entity .assignStatus (STARTED );
212214 Project state = entity .state ();
213215 Version versionValue = entity .version ();
214216 EntityRecord record = EntityRecord
@@ -218,7 +220,7 @@ void testPersistColumns() {
218220 .setVersion (versionValue )
219221 .vBuild ();
220222 DsRecordStorage <ProjectId > storage = newStorage (TestCounterEntity .class );
221- EntityRecordWithColumns recordWithColumns = create (record , entity , storage );
223+ EntityRecordWithColumns recordWithColumns = create (record , entity , storage . entityClass () );
222224 ImmutableSet <String > columns = recordWithColumns .columnNames ()
223225 .stream ()
224226 .map (ColumnName ::value )
@@ -316,7 +318,7 @@ void testLifecycleFlags() {
316318 .vBuild ();
317319 TestCounterEntity entity = new TestCounterEntity (id );
318320 RecordStorage <ProjectId > storage = newStorage (TestCounterEntity .class );
319- EntityRecordWithColumns recordWithColumns = create (record , entity , storage );
321+ EntityRecordWithColumns recordWithColumns = create (record , entity , storage . entityClass () );
320322 storage .write (id , recordWithColumns );
321323
322324 RecordReadRequest <ProjectId > request = new RecordReadRequest <>(id );
@@ -595,7 +597,7 @@ void testQueryEntityWithoutLifecycleById() {
595597 ProjectId id = newId ();
596598 EntityRecord record = newEntityRecord (id , newState (id ));
597599 EntityWithoutLifecycle entity = new EntityWithoutLifecycle (id );
598- storage .writeRecord (entity .id (), create (record , entity , storage ));
600+ storage .writeRecord (entity .id (), create (record , entity , storage . entityClass () ));
599601
600602 // Create ID filter.
601603 List <Any > targetIds = singletonList (pack (entity .id ()));
0 commit comments