brapi-java-client/src/test/java/org/brapi/client/v2/modules/phenotype/ObservationUnitsApiTest.java
@Test
	@Order(2)
	public void searchObservationunitsGetTest() throws ApiException {
		Integer page = null;
		Integer pageSize = null;

		if (searchResultDbId != null) {
			ApiResponse<Pair<Optional<BrAPIObservationUnitListResponse>, Optional<BrAPIAcceptedSearchResponse>>> response = api
					.searchObservationunitsSearchResultsDbIdGet(searchResultDbId, page, pageSize);

			Pair<Optional<BrAPIObservationUnitListResponse>, Optional<BrAPIAcceptedSearchResponse>> responseBody = response.getBody();
			Optional<BrAPIObservationUnitListResponse> listResponse = responseBody.getLeft();
			Optional<BrAPIAcceptedSearchResponse> searchResponse = responseBody.getRight();
			if (listResponse.isPresent()) {
				assertTrue(listResponse.get() != null, "data body was null");
				BrAPIObservationUnitListResponseResult result = listResponse.get().getResult();
				assertTrue(result.getData() != null, "No data object was returned in body");
			} else {
				// Check our searchResultDbId was passed
				assertTrue(searchResponse.get() != null, "search body was null");
				BrAPIAcceptedSearchResponse resp = searchResponse.get();
				BrAPIAcceptedSearchResponseResult result = resp.getResult();
				assertTrue(result.getSearchResultsDbId() != null, "No search id was returned in body");
			}
		}

	}
/**
	 * Observation Unit Search
	 *
	 * Returns a list of observationUnit with the observed Phenotypes. See Search
	 * Services for additional implementation details.
	 *
	 * @throws ApiException if the Api call fails
	 */
Observation Unit Search
Returns a list of observationUnit with the observed Phenotypes. See Search
Services for additional implementation details.

@throws ApiException if the Api call fails
Observation Unit Search Returns a list of observationUnit with the observed Phenotypes . See Search Services for additional implementation details . @throws ApiException if the Api call fails
@Test
	@Order(2)
	public void searchObservationunitsGetTest() throws ApiException {
		Integer page = null;
		Integer pageSize = null;
		if (searchResultDbId != null) {
			ApiResponse<Pair<Optional<BrAPIObservationUnitListResponse>, Optional<BrAPIAcceptedSearchResponse>>> response = api
					.searchObservationunitsSearchResultsDbIdGet(searchResultDbId, page, pageSize);
			Pair<Optional<BrAPIObservationUnitListResponse>, Optional<BrAPIAcceptedSearchResponse>> responseBody = response.getBody();
			Optional<BrAPIObservationUnitListResponse> listResponse = responseBody.getLeft();
			Optional<BrAPIAcceptedSearchResponse> searchResponse = responseBody.getRight();
			if (listResponse.isPresent()) {
				assertTrue(listResponse.get() != null, "data body was null");
				BrAPIObservationUnitListResponseResult result = listResponse.get().getResult();
				assertTrue(result.getData() != null, "No data object was returned in body");
			} else {
				assertTrue(searchResponse.get() != null, "search body was null");
				BrAPIAcceptedSearchResponse resp = searchResponse.get();
				BrAPIAcceptedSearchResponseResult result = resp.getResult();
				assertTrue(result.getSearchResultsDbId() != null, "No search id was returned in body");
			}
		}
	}
@ Test @ Order ( 2 ) public void searchObservationunitsGetTest ( ) throws ApiException { Integer page = null ; Integer pageSize = null ; if ( searchResultDbId != null ) { ApiResponse < Pair < Optional < BrAPIObservationUnitListResponse > , Optional < BrAPIAcceptedSearchResponse > > > response = api . searchObservationunitsSearchResultsDbIdGet ( searchResultDbId , page , pageSize ) ; Pair < Optional < BrAPIObservationUnitListResponse > , Optional < BrAPIAcceptedSearchResponse > > responseBody = response . getBody ( ) ; Optional < BrAPIObservationUnitListResponse > listResponse = responseBody . getLeft ( ) ; Optional < BrAPIAcceptedSearchResponse > searchResponse = responseBody . getRight ( ) ; if ( listResponse . isPresent ( ) ) { assertTrue ( listResponse . get ( ) != null , "data body was null" ) ; BrAPIObservationUnitListResponseResult result = listResponse . get ( ) . getResult ( ) ; assertTrue ( result . getData ( ) != null , "No data object was returned in body" ) ; } else { assertTrue ( searchResponse . get ( ) != null , "search body was null" ) ; BrAPIAcceptedSearchResponse resp = searchResponse . get ( ) ; BrAPIAcceptedSearchResponseResult result = resp . getResult ( ) ; assertTrue ( result . getSearchResultsDbId ( ) != null , "No search id was returned in body" ) ; } } }
Observation Unit Search
 Returns a list of observationUnit with the observed Phenotypes.
Observation Unit Search Returns a list of observationUnit with the observed Phenotypes .
// Check our searchResultDbId was passed