2929import reactor .test .StepVerifier ;
3030
3131import java .time .Duration ;
32- import java .util .concurrent .TimeoutException ;
3332
3433public final class EventsTest extends AbstractIntegrationTest {
3534
@@ -90,13 +89,13 @@ public void listFilterByActee() {
9089 }
9190
9291 @ Test
93- public void listFilterByTimestamp () {
92+ public void listFilterByOrganizationId () {
9493 getFirstEvent (this .cloudFoundryClient )
9594 .then (resource -> Mono .when (
9695 Mono .just (resource ),
9796 this .cloudFoundryClient .events ()
9897 .list (ListEventsRequest .builder ()
99- .timestamp (ResourceUtils .getEntity (resource ).getTimestamp ())
98+ .organizationId (ResourceUtils .getEntity (resource ).getOrganizationId ())
10099 .build ())
101100 .flatMapMany (ResourceUtils ::getResources )
102101 .next ()
@@ -108,13 +107,13 @@ public void listFilterByTimestamp() {
108107 }
109108
110109 @ Test
111- public void listFilterByType () {
110+ public void listFilterBySpaceId () {
112111 getFirstEvent (this .cloudFoundryClient )
113112 .then (resource -> Mono .when (
114113 Mono .just (resource ),
115114 this .cloudFoundryClient .events ()
116115 .list (ListEventsRequest .builder ()
117- .type (ResourceUtils .getEntity (resource ).getType ())
116+ .spaceId (ResourceUtils .getEntity (resource ).getSpaceId ())
118117 .build ())
119118 .flatMapMany (ResourceUtils ::getResources )
120119 .next ()
@@ -126,13 +125,13 @@ public void listFilterByType() {
126125 }
127126
128127 @ Test
129- public void listFilterByOrganizationId () {
128+ public void listFilterByTimestamp () {
130129 getFirstEvent (this .cloudFoundryClient )
131- .flatMap (resource -> Mono .zip (
130+ .then (resource -> Mono .when (
132131 Mono .just (resource ),
133132 this .cloudFoundryClient .events ()
134133 .list (ListEventsRequest .builder ()
135- .spaceId (ResourceUtils .getEntity (resource ).getOrganizationId ())
134+ .timestamp (ResourceUtils .getEntity (resource ).getTimestamp ())
136135 .build ())
137136 .flatMapMany (ResourceUtils ::getResources )
138137 .next ()
@@ -144,13 +143,13 @@ public void listFilterByOrganizationId(){
144143 }
145144
146145 @ Test
147- public void listFilterBySpaceId () {
146+ public void listFilterByType () {
148147 getFirstEvent (this .cloudFoundryClient )
149- .flatMap (resource -> Mono .zip (
148+ .then (resource -> Mono .when (
150149 Mono .just (resource ),
151150 this .cloudFoundryClient .events ()
152151 .list (ListEventsRequest .builder ()
153- .spaceId (ResourceUtils .getEntity (resource ).getSpaceId ())
152+ .type (ResourceUtils .getEntity (resource ).getType ())
154153 .build ())
155154 .flatMapMany (ResourceUtils ::getResources )
156155 .next ()
0 commit comments