use of com.google.cloud.spring.data.datastore.entities.ServiceConfiguration in project spring-cloud-gcp by GoogleCloudPlatform.
the class Employee method mapSubclass.
@Test
void mapSubclass() {
CustomMap customMap1 = new CustomMap();
customMap1.put("key1", "val1");
ServiceConfiguration service1 = new ServiceConfiguration("service1", customMap1);
CustomMap customMap2 = new CustomMap();
customMap2.put("key2", "val2");
ServiceConfiguration service2 = new ServiceConfiguration("service2", customMap2);
this.datastoreTemplate.saveAll(Arrays.asList(service1, service2));
waitUntilTrue(() -> this.datastoreTemplate.count(ServiceConfiguration.class) == 2);
Collection<ServiceConfiguration> events = this.datastoreTemplate.findAll(ServiceConfiguration.class);
assertThat(events).containsExactlyInAnyOrder(service1, service2);
}
Aggregations