target
stringlengths 20
113k
| src_fm
stringlengths 11
86.3k
| src_fm_fc
stringlengths 21
86.4k
| src_fm_fc_co
stringlengths 30
86.4k
| src_fm_fc_ms
stringlengths 42
86.8k
| src_fm_fc_ms_ff
stringlengths 43
86.8k
|
---|---|---|---|---|---|
@Test public void successfulMatch() { final AtomicBoolean matched = new AtomicBoolean(false); PartialMatcher matcher = (allMissingRows, allSurplusRows, matchedColumns) -> matched.set(true); new TimeBoundPartialMatcher(matcher, Long.MAX_VALUE).match(null, null, null); Assert.assertTrue(matched.get()); } | @Override public void match(final List<UnmatchedIndexMap> allMissingRows, final List<UnmatchedIndexMap> allSurplusRows, final List<IndexMap> matchedColumns) { LOGGER.debug("Starting partial match"); ExecutorService executorService = Executors.newSingleThreadExecutor(); Future<?> result = executorService.submit(() -> TimeBoundPartialMatcher.this.delegate.match(allMissingRows, allSurplusRows, matchedColumns)); try { result.get(this.timeoutMillis, TimeUnit.MILLISECONDS); LOGGER.debug("Partial match complete"); } catch (InterruptedException e) { LOGGER.error("Partial match interrupted", e); } catch (ExecutionException e) { LOGGER.error("Partial match exception", e); Throwable cause = e.getCause(); throw cause instanceof RuntimeException ? (RuntimeException) cause : new RuntimeException(cause); } catch (TimeoutException e) { LOGGER.error("Partial match timed out"); throw new RuntimeException(e); } finally { if (!executorService.isTerminated()) { executorService.shutdownNow(); } } } | TimeBoundPartialMatcher implements PartialMatcher { @Override public void match(final List<UnmatchedIndexMap> allMissingRows, final List<UnmatchedIndexMap> allSurplusRows, final List<IndexMap> matchedColumns) { LOGGER.debug("Starting partial match"); ExecutorService executorService = Executors.newSingleThreadExecutor(); Future<?> result = executorService.submit(() -> TimeBoundPartialMatcher.this.delegate.match(allMissingRows, allSurplusRows, matchedColumns)); try { result.get(this.timeoutMillis, TimeUnit.MILLISECONDS); LOGGER.debug("Partial match complete"); } catch (InterruptedException e) { LOGGER.error("Partial match interrupted", e); } catch (ExecutionException e) { LOGGER.error("Partial match exception", e); Throwable cause = e.getCause(); throw cause instanceof RuntimeException ? (RuntimeException) cause : new RuntimeException(cause); } catch (TimeoutException e) { LOGGER.error("Partial match timed out"); throw new RuntimeException(e); } finally { if (!executorService.isTerminated()) { executorService.shutdownNow(); } } } } | TimeBoundPartialMatcher implements PartialMatcher { @Override public void match(final List<UnmatchedIndexMap> allMissingRows, final List<UnmatchedIndexMap> allSurplusRows, final List<IndexMap> matchedColumns) { LOGGER.debug("Starting partial match"); ExecutorService executorService = Executors.newSingleThreadExecutor(); Future<?> result = executorService.submit(() -> TimeBoundPartialMatcher.this.delegate.match(allMissingRows, allSurplusRows, matchedColumns)); try { result.get(this.timeoutMillis, TimeUnit.MILLISECONDS); LOGGER.debug("Partial match complete"); } catch (InterruptedException e) { LOGGER.error("Partial match interrupted", e); } catch (ExecutionException e) { LOGGER.error("Partial match exception", e); Throwable cause = e.getCause(); throw cause instanceof RuntimeException ? (RuntimeException) cause : new RuntimeException(cause); } catch (TimeoutException e) { LOGGER.error("Partial match timed out"); throw new RuntimeException(e); } finally { if (!executorService.isTerminated()) { executorService.shutdownNow(); } } } TimeBoundPartialMatcher(PartialMatcher delegate, long timeoutMillis); } | TimeBoundPartialMatcher implements PartialMatcher { @Override public void match(final List<UnmatchedIndexMap> allMissingRows, final List<UnmatchedIndexMap> allSurplusRows, final List<IndexMap> matchedColumns) { LOGGER.debug("Starting partial match"); ExecutorService executorService = Executors.newSingleThreadExecutor(); Future<?> result = executorService.submit(() -> TimeBoundPartialMatcher.this.delegate.match(allMissingRows, allSurplusRows, matchedColumns)); try { result.get(this.timeoutMillis, TimeUnit.MILLISECONDS); LOGGER.debug("Partial match complete"); } catch (InterruptedException e) { LOGGER.error("Partial match interrupted", e); } catch (ExecutionException e) { LOGGER.error("Partial match exception", e); Throwable cause = e.getCause(); throw cause instanceof RuntimeException ? (RuntimeException) cause : new RuntimeException(cause); } catch (TimeoutException e) { LOGGER.error("Partial match timed out"); throw new RuntimeException(e); } finally { if (!executorService.isTerminated()) { executorService.shutdownNow(); } } } TimeBoundPartialMatcher(PartialMatcher delegate, long timeoutMillis); @Override void match(final List<UnmatchedIndexMap> allMissingRows, final List<UnmatchedIndexMap> allSurplusRows, final List<IndexMap> matchedColumns); } | TimeBoundPartialMatcher implements PartialMatcher { @Override public void match(final List<UnmatchedIndexMap> allMissingRows, final List<UnmatchedIndexMap> allSurplusRows, final List<IndexMap> matchedColumns) { LOGGER.debug("Starting partial match"); ExecutorService executorService = Executors.newSingleThreadExecutor(); Future<?> result = executorService.submit(() -> TimeBoundPartialMatcher.this.delegate.match(allMissingRows, allSurplusRows, matchedColumns)); try { result.get(this.timeoutMillis, TimeUnit.MILLISECONDS); LOGGER.debug("Partial match complete"); } catch (InterruptedException e) { LOGGER.error("Partial match interrupted", e); } catch (ExecutionException e) { LOGGER.error("Partial match exception", e); Throwable cause = e.getCause(); throw cause instanceof RuntimeException ? (RuntimeException) cause : new RuntimeException(cause); } catch (TimeoutException e) { LOGGER.error("Partial match timed out"); throw new RuntimeException(e); } finally { if (!executorService.isTerminated()) { executorService.shutdownNow(); } } } TimeBoundPartialMatcher(PartialMatcher delegate, long timeoutMillis); @Override void match(final List<UnmatchedIndexMap> allMissingRows, final List<UnmatchedIndexMap> allSurplusRows, final List<IndexMap> matchedColumns); } |
@Test public void compareTo1() { IndexMap im1 = new IndexMap(1, 2); IndexMap im2 = new IndexMap(2, 1); Assert.assertTrue(im1.compareTo(im2) > 0); Assert.assertTrue(im2.compareTo(im1) < 0); } | @Override public int compareTo(IndexMap that) { if (this.equals(that)) { return 0; } if (this.isMatched()) { if (that.actualIndex >= 0) { return compareUnequals(this.actualIndex, that.actualIndex, this.isSurplus()); } return compareUnequals(this.expectedIndex, that.expectedIndex, this.isSurplus()); } if (this.isSurplus()) { if (that.actualIndex >= 0) { return compareUnequals(this.actualIndex, that.actualIndex, this.isSurplus()); } return compareUnequals(this.actualIndex, that.expectedIndex, this.isSurplus()); } if (that.expectedIndex >= 0) { return compareUnequals(this.expectedIndex, that.expectedIndex, this.isSurplus()); } return compareUnequals(this.expectedIndex, that.actualIndex, this.isSurplus()); } | IndexMap implements Comparable<IndexMap> { @Override public int compareTo(IndexMap that) { if (this.equals(that)) { return 0; } if (this.isMatched()) { if (that.actualIndex >= 0) { return compareUnequals(this.actualIndex, that.actualIndex, this.isSurplus()); } return compareUnequals(this.expectedIndex, that.expectedIndex, this.isSurplus()); } if (this.isSurplus()) { if (that.actualIndex >= 0) { return compareUnequals(this.actualIndex, that.actualIndex, this.isSurplus()); } return compareUnequals(this.actualIndex, that.expectedIndex, this.isSurplus()); } if (that.expectedIndex >= 0) { return compareUnequals(this.expectedIndex, that.expectedIndex, this.isSurplus()); } return compareUnequals(this.expectedIndex, that.actualIndex, this.isSurplus()); } } | IndexMap implements Comparable<IndexMap> { @Override public int compareTo(IndexMap that) { if (this.equals(that)) { return 0; } if (this.isMatched()) { if (that.actualIndex >= 0) { return compareUnequals(this.actualIndex, that.actualIndex, this.isSurplus()); } return compareUnequals(this.expectedIndex, that.expectedIndex, this.isSurplus()); } if (this.isSurplus()) { if (that.actualIndex >= 0) { return compareUnequals(this.actualIndex, that.actualIndex, this.isSurplus()); } return compareUnequals(this.actualIndex, that.expectedIndex, this.isSurplus()); } if (that.expectedIndex >= 0) { return compareUnequals(this.expectedIndex, that.expectedIndex, this.isSurplus()); } return compareUnequals(this.expectedIndex, that.actualIndex, this.isSurplus()); } IndexMap(int expectedIndex, int actualIndex); } | IndexMap implements Comparable<IndexMap> { @Override public int compareTo(IndexMap that) { if (this.equals(that)) { return 0; } if (this.isMatched()) { if (that.actualIndex >= 0) { return compareUnequals(this.actualIndex, that.actualIndex, this.isSurplus()); } return compareUnequals(this.expectedIndex, that.expectedIndex, this.isSurplus()); } if (this.isSurplus()) { if (that.actualIndex >= 0) { return compareUnequals(this.actualIndex, that.actualIndex, this.isSurplus()); } return compareUnequals(this.actualIndex, that.expectedIndex, this.isSurplus()); } if (that.expectedIndex >= 0) { return compareUnequals(this.expectedIndex, that.expectedIndex, this.isSurplus()); } return compareUnequals(this.expectedIndex, that.actualIndex, this.isSurplus()); } IndexMap(int expectedIndex, int actualIndex); @Override boolean equals(Object obj); @Override int hashCode(); @Override int compareTo(IndexMap that); boolean isMissing(); boolean isSurplus(); boolean isMatched(); @Override String toString(); } | IndexMap implements Comparable<IndexMap> { @Override public int compareTo(IndexMap that) { if (this.equals(that)) { return 0; } if (this.isMatched()) { if (that.actualIndex >= 0) { return compareUnequals(this.actualIndex, that.actualIndex, this.isSurplus()); } return compareUnequals(this.expectedIndex, that.expectedIndex, this.isSurplus()); } if (this.isSurplus()) { if (that.actualIndex >= 0) { return compareUnequals(this.actualIndex, that.actualIndex, this.isSurplus()); } return compareUnequals(this.actualIndex, that.expectedIndex, this.isSurplus()); } if (that.expectedIndex >= 0) { return compareUnequals(this.expectedIndex, that.expectedIndex, this.isSurplus()); } return compareUnequals(this.expectedIndex, that.actualIndex, this.isSurplus()); } IndexMap(int expectedIndex, int actualIndex); @Override boolean equals(Object obj); @Override int hashCode(); @Override int compareTo(IndexMap that); boolean isMissing(); boolean isSurplus(); boolean isMatched(); @Override String toString(); } |
@Test public void compareTo2() { IndexMap im1 = new IndexMap(1, 2); IndexMap im2 = new IndexMap(2, -1); Assert.assertTrue(im1.compareTo(im2) < 0); Assert.assertTrue(im2.compareTo(im1) > 0); } | @Override public int compareTo(IndexMap that) { if (this.equals(that)) { return 0; } if (this.isMatched()) { if (that.actualIndex >= 0) { return compareUnequals(this.actualIndex, that.actualIndex, this.isSurplus()); } return compareUnequals(this.expectedIndex, that.expectedIndex, this.isSurplus()); } if (this.isSurplus()) { if (that.actualIndex >= 0) { return compareUnequals(this.actualIndex, that.actualIndex, this.isSurplus()); } return compareUnequals(this.actualIndex, that.expectedIndex, this.isSurplus()); } if (that.expectedIndex >= 0) { return compareUnequals(this.expectedIndex, that.expectedIndex, this.isSurplus()); } return compareUnequals(this.expectedIndex, that.actualIndex, this.isSurplus()); } | IndexMap implements Comparable<IndexMap> { @Override public int compareTo(IndexMap that) { if (this.equals(that)) { return 0; } if (this.isMatched()) { if (that.actualIndex >= 0) { return compareUnequals(this.actualIndex, that.actualIndex, this.isSurplus()); } return compareUnequals(this.expectedIndex, that.expectedIndex, this.isSurplus()); } if (this.isSurplus()) { if (that.actualIndex >= 0) { return compareUnequals(this.actualIndex, that.actualIndex, this.isSurplus()); } return compareUnequals(this.actualIndex, that.expectedIndex, this.isSurplus()); } if (that.expectedIndex >= 0) { return compareUnequals(this.expectedIndex, that.expectedIndex, this.isSurplus()); } return compareUnequals(this.expectedIndex, that.actualIndex, this.isSurplus()); } } | IndexMap implements Comparable<IndexMap> { @Override public int compareTo(IndexMap that) { if (this.equals(that)) { return 0; } if (this.isMatched()) { if (that.actualIndex >= 0) { return compareUnequals(this.actualIndex, that.actualIndex, this.isSurplus()); } return compareUnequals(this.expectedIndex, that.expectedIndex, this.isSurplus()); } if (this.isSurplus()) { if (that.actualIndex >= 0) { return compareUnequals(this.actualIndex, that.actualIndex, this.isSurplus()); } return compareUnequals(this.actualIndex, that.expectedIndex, this.isSurplus()); } if (that.expectedIndex >= 0) { return compareUnequals(this.expectedIndex, that.expectedIndex, this.isSurplus()); } return compareUnequals(this.expectedIndex, that.actualIndex, this.isSurplus()); } IndexMap(int expectedIndex, int actualIndex); } | IndexMap implements Comparable<IndexMap> { @Override public int compareTo(IndexMap that) { if (this.equals(that)) { return 0; } if (this.isMatched()) { if (that.actualIndex >= 0) { return compareUnequals(this.actualIndex, that.actualIndex, this.isSurplus()); } return compareUnequals(this.expectedIndex, that.expectedIndex, this.isSurplus()); } if (this.isSurplus()) { if (that.actualIndex >= 0) { return compareUnequals(this.actualIndex, that.actualIndex, this.isSurplus()); } return compareUnequals(this.actualIndex, that.expectedIndex, this.isSurplus()); } if (that.expectedIndex >= 0) { return compareUnequals(this.expectedIndex, that.expectedIndex, this.isSurplus()); } return compareUnequals(this.expectedIndex, that.actualIndex, this.isSurplus()); } IndexMap(int expectedIndex, int actualIndex); @Override boolean equals(Object obj); @Override int hashCode(); @Override int compareTo(IndexMap that); boolean isMissing(); boolean isSurplus(); boolean isMatched(); @Override String toString(); } | IndexMap implements Comparable<IndexMap> { @Override public int compareTo(IndexMap that) { if (this.equals(that)) { return 0; } if (this.isMatched()) { if (that.actualIndex >= 0) { return compareUnequals(this.actualIndex, that.actualIndex, this.isSurplus()); } return compareUnequals(this.expectedIndex, that.expectedIndex, this.isSurplus()); } if (this.isSurplus()) { if (that.actualIndex >= 0) { return compareUnequals(this.actualIndex, that.actualIndex, this.isSurplus()); } return compareUnequals(this.actualIndex, that.expectedIndex, this.isSurplus()); } if (that.expectedIndex >= 0) { return compareUnequals(this.expectedIndex, that.expectedIndex, this.isSurplus()); } return compareUnequals(this.expectedIndex, that.actualIndex, this.isSurplus()); } IndexMap(int expectedIndex, int actualIndex); @Override boolean equals(Object obj); @Override int hashCode(); @Override int compareTo(IndexMap that); boolean isMissing(); boolean isSurplus(); boolean isMatched(); @Override String toString(); } |
@Test public void merge() { CellComparator cellComparator = new ToleranceCellComparator(new CellFormatter(1.0, false)); SummaryResultTable table1 = new SummaryResultTable(new ResultTable(new boolean[2], Arrays.asList( Arrays.asList(ResultCell.createMatchedCell(cellComparator, "Key", "Val")), Arrays.asList(ResultCell.createMatchedCell(cellComparator, "A", "A"))))); SummaryResultTable table2 = new SummaryResultTable(new ResultTable(new boolean[2], Arrays.asList( Arrays.asList(ResultCell.createMatchedCell(cellComparator, "Key", "Val")), Arrays.asList(ResultCell.createMatchedCell(cellComparator, "A", "B"))))); SummaryResultTable table3 = new SummaryResultTable(new ResultTable(new boolean[2], Arrays.asList( Arrays.asList(ResultCell.createMatchedCell(cellComparator, "Key", "Val")), Arrays.asList(ResultCell.createMatchedCell(cellComparator, "A", "B"))))); table1.merge(table2); table1.merge(table3); Assert.assertEquals("{0={firstFew=1, totalRows=1}, 31={firstFew=2, totalRows=2}}", asString(table1)); Assert.assertEquals("{31={firstFew=1, totalRows=1}}", asString(table2)); Assert.assertEquals("{31={firstFew=1, totalRows=1}}", asString(table3)); } | public SummaryResultTable merge(SummaryResultTable resultTable) { List<ResultCell> nextHeaders = resultTable.getHeaders(); if (this.headers == null || nextHeaders.size() > this.headers.size()) { this.headers = nextHeaders; } this.passedCellCount += resultTable.getPassedCellCount(); this.totalCellCount += resultTable.getTotalCellCount(); for (Map.Entry<String, SummaryResult> entry : resultTable.getResultsByKey().entrySet()) { SummaryResult summaryResult = entry.getValue(); SummaryResult mergedResult = this.resultsByKey.get(entry.getKey()); if (mergedResult == null) { mergedResult = new SummaryResult(summaryResult); this.resultsByKey.put(entry.getKey(), mergedResult); } else { for (List<ResultCell> resultCells : summaryResult.firstFew) { mergedResult.addRow(resultCells); } mergedResult.mergeCardinalities(summaryResult.columnCardinalityList); mergedResult.totalRows += summaryResult.totalRows; } } return this; } | SummaryResultTable implements FormattableTable, Serializable { public SummaryResultTable merge(SummaryResultTable resultTable) { List<ResultCell> nextHeaders = resultTable.getHeaders(); if (this.headers == null || nextHeaders.size() > this.headers.size()) { this.headers = nextHeaders; } this.passedCellCount += resultTable.getPassedCellCount(); this.totalCellCount += resultTable.getTotalCellCount(); for (Map.Entry<String, SummaryResult> entry : resultTable.getResultsByKey().entrySet()) { SummaryResult summaryResult = entry.getValue(); SummaryResult mergedResult = this.resultsByKey.get(entry.getKey()); if (mergedResult == null) { mergedResult = new SummaryResult(summaryResult); this.resultsByKey.put(entry.getKey(), mergedResult); } else { for (List<ResultCell> resultCells : summaryResult.firstFew) { mergedResult.addRow(resultCells); } mergedResult.mergeCardinalities(summaryResult.columnCardinalityList); mergedResult.totalRows += summaryResult.totalRows; } } return this; } } | SummaryResultTable implements FormattableTable, Serializable { public SummaryResultTable merge(SummaryResultTable resultTable) { List<ResultCell> nextHeaders = resultTable.getHeaders(); if (this.headers == null || nextHeaders.size() > this.headers.size()) { this.headers = nextHeaders; } this.passedCellCount += resultTable.getPassedCellCount(); this.totalCellCount += resultTable.getTotalCellCount(); for (Map.Entry<String, SummaryResult> entry : resultTable.getResultsByKey().entrySet()) { SummaryResult summaryResult = entry.getValue(); SummaryResult mergedResult = this.resultsByKey.get(entry.getKey()); if (mergedResult == null) { mergedResult = new SummaryResult(summaryResult); this.resultsByKey.put(entry.getKey(), mergedResult); } else { for (List<ResultCell> resultCells : summaryResult.firstFew) { mergedResult.addRow(resultCells); } mergedResult.mergeCardinalities(summaryResult.columnCardinalityList); mergedResult.totalRows += summaryResult.totalRows; } } return this; } SummaryResultTable(ResultTable resultTable); } | SummaryResultTable implements FormattableTable, Serializable { public SummaryResultTable merge(SummaryResultTable resultTable) { List<ResultCell> nextHeaders = resultTable.getHeaders(); if (this.headers == null || nextHeaders.size() > this.headers.size()) { this.headers = nextHeaders; } this.passedCellCount += resultTable.getPassedCellCount(); this.totalCellCount += resultTable.getTotalCellCount(); for (Map.Entry<String, SummaryResult> entry : resultTable.getResultsByKey().entrySet()) { SummaryResult summaryResult = entry.getValue(); SummaryResult mergedResult = this.resultsByKey.get(entry.getKey()); if (mergedResult == null) { mergedResult = new SummaryResult(summaryResult); this.resultsByKey.put(entry.getKey(), mergedResult); } else { for (List<ResultCell> resultCells : summaryResult.firstFew) { mergedResult.addRow(resultCells); } mergedResult.mergeCardinalities(summaryResult.columnCardinalityList); mergedResult.totalRows += summaryResult.totalRows; } } return this; } SummaryResultTable(ResultTable resultTable); SummaryResultTable merge(SummaryResultTable resultTable); @Override boolean isSuccess(); @Override int getPassedCellCount(); @Override int getTotalCellCount(); @Override List<ResultCell> getHeaders(); @Override int getMatchedColumnsAhead(int col); @Override void appendTo(final String testName, final String tableName, final Element table, final HtmlOptions htmlOptions); } | SummaryResultTable implements FormattableTable, Serializable { public SummaryResultTable merge(SummaryResultTable resultTable) { List<ResultCell> nextHeaders = resultTable.getHeaders(); if (this.headers == null || nextHeaders.size() > this.headers.size()) { this.headers = nextHeaders; } this.passedCellCount += resultTable.getPassedCellCount(); this.totalCellCount += resultTable.getTotalCellCount(); for (Map.Entry<String, SummaryResult> entry : resultTable.getResultsByKey().entrySet()) { SummaryResult summaryResult = entry.getValue(); SummaryResult mergedResult = this.resultsByKey.get(entry.getKey()); if (mergedResult == null) { mergedResult = new SummaryResult(summaryResult); this.resultsByKey.put(entry.getKey(), mergedResult); } else { for (List<ResultCell> resultCells : summaryResult.firstFew) { mergedResult.addRow(resultCells); } mergedResult.mergeCardinalities(summaryResult.columnCardinalityList); mergedResult.totalRows += summaryResult.totalRows; } } return this; } SummaryResultTable(ResultTable resultTable); SummaryResultTable merge(SummaryResultTable resultTable); @Override boolean isSuccess(); @Override int getPassedCellCount(); @Override int getTotalCellCount(); @Override List<ResultCell> getHeaders(); @Override int getMatchedColumnsAhead(int col); @Override void appendTo(final String testName, final String tableName, final Element table, final HtmlOptions htmlOptions); } |
@Test public void missingTable() { Map<String, ResultTable> results = verifyTables(createTables("assets"), createTables("assets", "liabs")); Assert.assertEquals(newPassTable(), results.get("assets").getVerifiedRows()); Assert.assertEquals(newMissingTable(), results.get("liabs").getVerifiedRows()); this.expectedTables = 2; } | public Map<String, ResultTable> verifyTables(Map<String, ? extends VerifiableTable> expectedResults, Map<String, ? extends VerifiableTable> actualResults) { Map<String, ResultTable> results = new LinkedHashMap<>(); List<String> allTableNames = new ArrayList<>(expectedResults.keySet()); for (String actualTable : actualResults.keySet()) { if (!expectedResults.containsKey(actualTable)) { allTableNames.add(actualTable); } } for (String tableName : allTableNames) { verifyTable(tableName, actualResults, expectedResults, results); } return results; } | MultiTableVerifier { public Map<String, ResultTable> verifyTables(Map<String, ? extends VerifiableTable> expectedResults, Map<String, ? extends VerifiableTable> actualResults) { Map<String, ResultTable> results = new LinkedHashMap<>(); List<String> allTableNames = new ArrayList<>(expectedResults.keySet()); for (String actualTable : actualResults.keySet()) { if (!expectedResults.containsKey(actualTable)) { allTableNames.add(actualTable); } } for (String tableName : allTableNames) { verifyTable(tableName, actualResults, expectedResults, results); } return results; } } | MultiTableVerifier { public Map<String, ResultTable> verifyTables(Map<String, ? extends VerifiableTable> expectedResults, Map<String, ? extends VerifiableTable> actualResults) { Map<String, ResultTable> results = new LinkedHashMap<>(); List<String> allTableNames = new ArrayList<>(expectedResults.keySet()); for (String actualTable : actualResults.keySet()) { if (!expectedResults.containsKey(actualTable)) { allTableNames.add(actualTable); } } for (String tableName : allTableNames) { verifyTable(tableName, actualResults, expectedResults, results); } return results; } MultiTableVerifier(SingleTableVerifier singleSingleTableVerifier); } | MultiTableVerifier { public Map<String, ResultTable> verifyTables(Map<String, ? extends VerifiableTable> expectedResults, Map<String, ? extends VerifiableTable> actualResults) { Map<String, ResultTable> results = new LinkedHashMap<>(); List<String> allTableNames = new ArrayList<>(expectedResults.keySet()); for (String actualTable : actualResults.keySet()) { if (!expectedResults.containsKey(actualTable)) { allTableNames.add(actualTable); } } for (String tableName : allTableNames) { verifyTable(tableName, actualResults, expectedResults, results); } return results; } MultiTableVerifier(SingleTableVerifier singleSingleTableVerifier); Map<String, ResultTable> verifyTables(Map<String, ? extends VerifiableTable> expectedResults, Map<String, ? extends VerifiableTable> actualResults); } | MultiTableVerifier { public Map<String, ResultTable> verifyTables(Map<String, ? extends VerifiableTable> expectedResults, Map<String, ? extends VerifiableTable> actualResults) { Map<String, ResultTable> results = new LinkedHashMap<>(); List<String> allTableNames = new ArrayList<>(expectedResults.keySet()); for (String actualTable : actualResults.keySet()) { if (!expectedResults.containsKey(actualTable)) { allTableNames.add(actualTable); } } for (String tableName : allTableNames) { verifyTable(tableName, actualResults, expectedResults, results); } return results; } MultiTableVerifier(SingleTableVerifier singleSingleTableVerifier); Map<String, ResultTable> verifyTables(Map<String, ? extends VerifiableTable> expectedResults, Map<String, ? extends VerifiableTable> actualResults); } |
@Test public void surplusTable() { Map<String, ResultTable> results = this.verifyTables(createTables("assets", "liabs"), createTables("liabs")); Assert.assertEquals(newSurplusTable(), results.get("assets").getVerifiedRows()); Assert.assertEquals(newPassTable(), results.get("liabs").getVerifiedRows()); this.expectedTables = 2; } | public Map<String, ResultTable> verifyTables(Map<String, ? extends VerifiableTable> expectedResults, Map<String, ? extends VerifiableTable> actualResults) { Map<String, ResultTable> results = new LinkedHashMap<>(); List<String> allTableNames = new ArrayList<>(expectedResults.keySet()); for (String actualTable : actualResults.keySet()) { if (!expectedResults.containsKey(actualTable)) { allTableNames.add(actualTable); } } for (String tableName : allTableNames) { verifyTable(tableName, actualResults, expectedResults, results); } return results; } | MultiTableVerifier { public Map<String, ResultTable> verifyTables(Map<String, ? extends VerifiableTable> expectedResults, Map<String, ? extends VerifiableTable> actualResults) { Map<String, ResultTable> results = new LinkedHashMap<>(); List<String> allTableNames = new ArrayList<>(expectedResults.keySet()); for (String actualTable : actualResults.keySet()) { if (!expectedResults.containsKey(actualTable)) { allTableNames.add(actualTable); } } for (String tableName : allTableNames) { verifyTable(tableName, actualResults, expectedResults, results); } return results; } } | MultiTableVerifier { public Map<String, ResultTable> verifyTables(Map<String, ? extends VerifiableTable> expectedResults, Map<String, ? extends VerifiableTable> actualResults) { Map<String, ResultTable> results = new LinkedHashMap<>(); List<String> allTableNames = new ArrayList<>(expectedResults.keySet()); for (String actualTable : actualResults.keySet()) { if (!expectedResults.containsKey(actualTable)) { allTableNames.add(actualTable); } } for (String tableName : allTableNames) { verifyTable(tableName, actualResults, expectedResults, results); } return results; } MultiTableVerifier(SingleTableVerifier singleSingleTableVerifier); } | MultiTableVerifier { public Map<String, ResultTable> verifyTables(Map<String, ? extends VerifiableTable> expectedResults, Map<String, ? extends VerifiableTable> actualResults) { Map<String, ResultTable> results = new LinkedHashMap<>(); List<String> allTableNames = new ArrayList<>(expectedResults.keySet()); for (String actualTable : actualResults.keySet()) { if (!expectedResults.containsKey(actualTable)) { allTableNames.add(actualTable); } } for (String tableName : allTableNames) { verifyTable(tableName, actualResults, expectedResults, results); } return results; } MultiTableVerifier(SingleTableVerifier singleSingleTableVerifier); Map<String, ResultTable> verifyTables(Map<String, ? extends VerifiableTable> expectedResults, Map<String, ? extends VerifiableTable> actualResults); } | MultiTableVerifier { public Map<String, ResultTable> verifyTables(Map<String, ? extends VerifiableTable> expectedResults, Map<String, ? extends VerifiableTable> actualResults) { Map<String, ResultTable> results = new LinkedHashMap<>(); List<String> allTableNames = new ArrayList<>(expectedResults.keySet()); for (String actualTable : actualResults.keySet()) { if (!expectedResults.containsKey(actualTable)) { allTableNames.add(actualTable); } } for (String tableName : allTableNames) { verifyTable(tableName, actualResults, expectedResults, results); } return results; } MultiTableVerifier(SingleTableVerifier singleSingleTableVerifier); Map<String, ResultTable> verifyTables(Map<String, ? extends VerifiableTable> expectedResults, Map<String, ? extends VerifiableTable> actualResults); } |
@Test public void misnamedTable() { Map<String, ResultTable> results = this.verifyTables(createTables("assets", "liabs"), createTables("assets", "liabz")); Assert.assertEquals(newPassTable(), results.get("assets").getVerifiedRows()); Assert.assertEquals(newSurplusTable(), results.get("liabs").getVerifiedRows()); Assert.assertEquals(newMissingTable(), results.get("liabz").getVerifiedRows()); this.expectedTables = 3; } | public Map<String, ResultTable> verifyTables(Map<String, ? extends VerifiableTable> expectedResults, Map<String, ? extends VerifiableTable> actualResults) { Map<String, ResultTable> results = new LinkedHashMap<>(); List<String> allTableNames = new ArrayList<>(expectedResults.keySet()); for (String actualTable : actualResults.keySet()) { if (!expectedResults.containsKey(actualTable)) { allTableNames.add(actualTable); } } for (String tableName : allTableNames) { verifyTable(tableName, actualResults, expectedResults, results); } return results; } | MultiTableVerifier { public Map<String, ResultTable> verifyTables(Map<String, ? extends VerifiableTable> expectedResults, Map<String, ? extends VerifiableTable> actualResults) { Map<String, ResultTable> results = new LinkedHashMap<>(); List<String> allTableNames = new ArrayList<>(expectedResults.keySet()); for (String actualTable : actualResults.keySet()) { if (!expectedResults.containsKey(actualTable)) { allTableNames.add(actualTable); } } for (String tableName : allTableNames) { verifyTable(tableName, actualResults, expectedResults, results); } return results; } } | MultiTableVerifier { public Map<String, ResultTable> verifyTables(Map<String, ? extends VerifiableTable> expectedResults, Map<String, ? extends VerifiableTable> actualResults) { Map<String, ResultTable> results = new LinkedHashMap<>(); List<String> allTableNames = new ArrayList<>(expectedResults.keySet()); for (String actualTable : actualResults.keySet()) { if (!expectedResults.containsKey(actualTable)) { allTableNames.add(actualTable); } } for (String tableName : allTableNames) { verifyTable(tableName, actualResults, expectedResults, results); } return results; } MultiTableVerifier(SingleTableVerifier singleSingleTableVerifier); } | MultiTableVerifier { public Map<String, ResultTable> verifyTables(Map<String, ? extends VerifiableTable> expectedResults, Map<String, ? extends VerifiableTable> actualResults) { Map<String, ResultTable> results = new LinkedHashMap<>(); List<String> allTableNames = new ArrayList<>(expectedResults.keySet()); for (String actualTable : actualResults.keySet()) { if (!expectedResults.containsKey(actualTable)) { allTableNames.add(actualTable); } } for (String tableName : allTableNames) { verifyTable(tableName, actualResults, expectedResults, results); } return results; } MultiTableVerifier(SingleTableVerifier singleSingleTableVerifier); Map<String, ResultTable> verifyTables(Map<String, ? extends VerifiableTable> expectedResults, Map<String, ? extends VerifiableTable> actualResults); } | MultiTableVerifier { public Map<String, ResultTable> verifyTables(Map<String, ? extends VerifiableTable> expectedResults, Map<String, ? extends VerifiableTable> actualResults) { Map<String, ResultTable> results = new LinkedHashMap<>(); List<String> allTableNames = new ArrayList<>(expectedResults.keySet()); for (String actualTable : actualResults.keySet()) { if (!expectedResults.containsKey(actualTable)) { allTableNames.add(actualTable); } } for (String tableName : allTableNames) { verifyTable(tableName, actualResults, expectedResults, results); } return results; } MultiTableVerifier(SingleTableVerifier singleSingleTableVerifier); Map<String, ResultTable> verifyTables(Map<String, ? extends VerifiableTable> expectedResults, Map<String, ? extends VerifiableTable> actualResults); } |
@Test(expected = IllegalStateException.class) public void noExpectedColumns() { this.verifyTables( Collections.singletonMap("table", TableTestUtils.createTable(1, "Col")), Collections.singletonMap("table", TableTestUtils.createTable(0))); } | public Map<String, ResultTable> verifyTables(Map<String, ? extends VerifiableTable> expectedResults, Map<String, ? extends VerifiableTable> actualResults) { Map<String, ResultTable> results = new LinkedHashMap<>(); List<String> allTableNames = new ArrayList<>(expectedResults.keySet()); for (String actualTable : actualResults.keySet()) { if (!expectedResults.containsKey(actualTable)) { allTableNames.add(actualTable); } } for (String tableName : allTableNames) { verifyTable(tableName, actualResults, expectedResults, results); } return results; } | MultiTableVerifier { public Map<String, ResultTable> verifyTables(Map<String, ? extends VerifiableTable> expectedResults, Map<String, ? extends VerifiableTable> actualResults) { Map<String, ResultTable> results = new LinkedHashMap<>(); List<String> allTableNames = new ArrayList<>(expectedResults.keySet()); for (String actualTable : actualResults.keySet()) { if (!expectedResults.containsKey(actualTable)) { allTableNames.add(actualTable); } } for (String tableName : allTableNames) { verifyTable(tableName, actualResults, expectedResults, results); } return results; } } | MultiTableVerifier { public Map<String, ResultTable> verifyTables(Map<String, ? extends VerifiableTable> expectedResults, Map<String, ? extends VerifiableTable> actualResults) { Map<String, ResultTable> results = new LinkedHashMap<>(); List<String> allTableNames = new ArrayList<>(expectedResults.keySet()); for (String actualTable : actualResults.keySet()) { if (!expectedResults.containsKey(actualTable)) { allTableNames.add(actualTable); } } for (String tableName : allTableNames) { verifyTable(tableName, actualResults, expectedResults, results); } return results; } MultiTableVerifier(SingleTableVerifier singleSingleTableVerifier); } | MultiTableVerifier { public Map<String, ResultTable> verifyTables(Map<String, ? extends VerifiableTable> expectedResults, Map<String, ? extends VerifiableTable> actualResults) { Map<String, ResultTable> results = new LinkedHashMap<>(); List<String> allTableNames = new ArrayList<>(expectedResults.keySet()); for (String actualTable : actualResults.keySet()) { if (!expectedResults.containsKey(actualTable)) { allTableNames.add(actualTable); } } for (String tableName : allTableNames) { verifyTable(tableName, actualResults, expectedResults, results); } return results; } MultiTableVerifier(SingleTableVerifier singleSingleTableVerifier); Map<String, ResultTable> verifyTables(Map<String, ? extends VerifiableTable> expectedResults, Map<String, ? extends VerifiableTable> actualResults); } | MultiTableVerifier { public Map<String, ResultTable> verifyTables(Map<String, ? extends VerifiableTable> expectedResults, Map<String, ? extends VerifiableTable> actualResults) { Map<String, ResultTable> results = new LinkedHashMap<>(); List<String> allTableNames = new ArrayList<>(expectedResults.keySet()); for (String actualTable : actualResults.keySet()) { if (!expectedResults.containsKey(actualTable)) { allTableNames.add(actualTable); } } for (String tableName : allTableNames) { verifyTable(tableName, actualResults, expectedResults, results); } return results; } MultiTableVerifier(SingleTableVerifier singleSingleTableVerifier); Map<String, ResultTable> verifyTables(Map<String, ? extends VerifiableTable> expectedResults, Map<String, ? extends VerifiableTable> actualResults); } |
@Test(expected = IllegalArgumentException.class) public void runTestWithInvalidShardColumn() throws IOException { runTest(AVRO, AVRO_X, false, newSparkVerifier(Collections.singletonList("foo")) .withMaxGroupSize(2)); } | public SparkVerifier withMaxGroupSize(int maxGroupSize) { this.maxGroupSize = maxGroupSize; return this; } | SparkVerifier { public SparkVerifier withMaxGroupSize(int maxGroupSize) { this.maxGroupSize = maxGroupSize; return this; } } | SparkVerifier { public SparkVerifier withMaxGroupSize(int maxGroupSize) { this.maxGroupSize = maxGroupSize; return this; } SparkVerifier(List<String> groupKeyColumns); } | SparkVerifier { public SparkVerifier withMaxGroupSize(int maxGroupSize) { this.maxGroupSize = maxGroupSize; return this; } SparkVerifier(List<String> groupKeyColumns); final SparkVerifier withMetadata(String name, String value); SparkVerifier withIgnoreSurplusColumns(boolean ignoreSurplusColumns); SparkVerifier withColumnsToIgnore(Set<String> columnsToIgnore); SparkVerifier withTolerance(double tolerance); SparkVerifier withTolerance(String columnName, double tolerance); SparkVerifier withMaxGroupSize(int maxGroupSize); SparkResult verify(String dataName, Supplier<DistributedTable> actualDataSupplier, Supplier<DistributedTable> expectedDataSupplier); } | SparkVerifier { public SparkVerifier withMaxGroupSize(int maxGroupSize) { this.maxGroupSize = maxGroupSize; return this; } SparkVerifier(List<String> groupKeyColumns); final SparkVerifier withMetadata(String name, String value); SparkVerifier withIgnoreSurplusColumns(boolean ignoreSurplusColumns); SparkVerifier withColumnsToIgnore(Set<String> columnsToIgnore); SparkVerifier withTolerance(double tolerance); SparkVerifier withTolerance(String columnName, double tolerance); SparkVerifier withMaxGroupSize(int maxGroupSize); SparkResult verify(String dataName, Supplier<DistributedTable> actualDataSupplier, Supplier<DistributedTable> expectedDataSupplier); } |
@Test(expected = IllegalStateException.class) public void noActualColumns() { this.verifyTables( Collections.singletonMap("table", TableTestUtils.createTable(0)), Collections.singletonMap("table", TableTestUtils.createTable(1, "Col"))); } | public Map<String, ResultTable> verifyTables(Map<String, ? extends VerifiableTable> expectedResults, Map<String, ? extends VerifiableTable> actualResults) { Map<String, ResultTable> results = new LinkedHashMap<>(); List<String> allTableNames = new ArrayList<>(expectedResults.keySet()); for (String actualTable : actualResults.keySet()) { if (!expectedResults.containsKey(actualTable)) { allTableNames.add(actualTable); } } for (String tableName : allTableNames) { verifyTable(tableName, actualResults, expectedResults, results); } return results; } | MultiTableVerifier { public Map<String, ResultTable> verifyTables(Map<String, ? extends VerifiableTable> expectedResults, Map<String, ? extends VerifiableTable> actualResults) { Map<String, ResultTable> results = new LinkedHashMap<>(); List<String> allTableNames = new ArrayList<>(expectedResults.keySet()); for (String actualTable : actualResults.keySet()) { if (!expectedResults.containsKey(actualTable)) { allTableNames.add(actualTable); } } for (String tableName : allTableNames) { verifyTable(tableName, actualResults, expectedResults, results); } return results; } } | MultiTableVerifier { public Map<String, ResultTable> verifyTables(Map<String, ? extends VerifiableTable> expectedResults, Map<String, ? extends VerifiableTable> actualResults) { Map<String, ResultTable> results = new LinkedHashMap<>(); List<String> allTableNames = new ArrayList<>(expectedResults.keySet()); for (String actualTable : actualResults.keySet()) { if (!expectedResults.containsKey(actualTable)) { allTableNames.add(actualTable); } } for (String tableName : allTableNames) { verifyTable(tableName, actualResults, expectedResults, results); } return results; } MultiTableVerifier(SingleTableVerifier singleSingleTableVerifier); } | MultiTableVerifier { public Map<String, ResultTable> verifyTables(Map<String, ? extends VerifiableTable> expectedResults, Map<String, ? extends VerifiableTable> actualResults) { Map<String, ResultTable> results = new LinkedHashMap<>(); List<String> allTableNames = new ArrayList<>(expectedResults.keySet()); for (String actualTable : actualResults.keySet()) { if (!expectedResults.containsKey(actualTable)) { allTableNames.add(actualTable); } } for (String tableName : allTableNames) { verifyTable(tableName, actualResults, expectedResults, results); } return results; } MultiTableVerifier(SingleTableVerifier singleSingleTableVerifier); Map<String, ResultTable> verifyTables(Map<String, ? extends VerifiableTable> expectedResults, Map<String, ? extends VerifiableTable> actualResults); } | MultiTableVerifier { public Map<String, ResultTable> verifyTables(Map<String, ? extends VerifiableTable> expectedResults, Map<String, ? extends VerifiableTable> actualResults) { Map<String, ResultTable> results = new LinkedHashMap<>(); List<String> allTableNames = new ArrayList<>(expectedResults.keySet()); for (String actualTable : actualResults.keySet()) { if (!expectedResults.containsKey(actualTable)) { allTableNames.add(actualTable); } } for (String tableName : allTableNames) { verifyTable(tableName, actualResults, expectedResults, results); } return results; } MultiTableVerifier(SingleTableVerifier singleSingleTableVerifier); Map<String, ResultTable> verifyTables(Map<String, ? extends VerifiableTable> expectedResults, Map<String, ? extends VerifiableTable> actualResults); } |
@Test public void runManyRowTest() throws IOException { List<GenericRecord> data = new ArrayList<>(); for (Integer i = 1230001; i <= 1230100; i++) { data.add(row(AVSC, i, i.toString(), i, i * 1.0)); } runTest(data, data, true, newSparkVerifier(Collections.singletonList("k1")) .withMaxGroupSize(10_000)); } | public SparkVerifier withMaxGroupSize(int maxGroupSize) { this.maxGroupSize = maxGroupSize; return this; } | SparkVerifier { public SparkVerifier withMaxGroupSize(int maxGroupSize) { this.maxGroupSize = maxGroupSize; return this; } } | SparkVerifier { public SparkVerifier withMaxGroupSize(int maxGroupSize) { this.maxGroupSize = maxGroupSize; return this; } SparkVerifier(List<String> groupKeyColumns); } | SparkVerifier { public SparkVerifier withMaxGroupSize(int maxGroupSize) { this.maxGroupSize = maxGroupSize; return this; } SparkVerifier(List<String> groupKeyColumns); final SparkVerifier withMetadata(String name, String value); SparkVerifier withIgnoreSurplusColumns(boolean ignoreSurplusColumns); SparkVerifier withColumnsToIgnore(Set<String> columnsToIgnore); SparkVerifier withTolerance(double tolerance); SparkVerifier withTolerance(String columnName, double tolerance); SparkVerifier withMaxGroupSize(int maxGroupSize); SparkResult verify(String dataName, Supplier<DistributedTable> actualDataSupplier, Supplier<DistributedTable> expectedDataSupplier); } | SparkVerifier { public SparkVerifier withMaxGroupSize(int maxGroupSize) { this.maxGroupSize = maxGroupSize; return this; } SparkVerifier(List<String> groupKeyColumns); final SparkVerifier withMetadata(String name, String value); SparkVerifier withIgnoreSurplusColumns(boolean ignoreSurplusColumns); SparkVerifier withColumnsToIgnore(Set<String> columnsToIgnore); SparkVerifier withTolerance(double tolerance); SparkVerifier withTolerance(String columnName, double tolerance); SparkVerifier withMaxGroupSize(int maxGroupSize); SparkResult verify(String dataName, Supplier<DistributedTable> actualDataSupplier, Supplier<DistributedTable> expectedDataSupplier); } |
@Test public void runManyRowTestWithMissingColumn() throws IOException { List<GenericRecord> actual = new ArrayList<>(); for (Integer i = 1230001; i <= 1230100; i++) { actual.add(row(AVSC_MISSING_COL, i, i.toString(), i)); } List<GenericRecord> expected = new ArrayList<>(); for (Integer i = 1230001; i <= 1230100; i++) { expected.add(row(AVSC, i, i.toString(), i, i * 1.0)); } runTest(actual, expected, false, newSparkVerifier(Collections.singletonList("k1")) .withMaxGroupSize(10_000)); } | public SparkVerifier withMaxGroupSize(int maxGroupSize) { this.maxGroupSize = maxGroupSize; return this; } | SparkVerifier { public SparkVerifier withMaxGroupSize(int maxGroupSize) { this.maxGroupSize = maxGroupSize; return this; } } | SparkVerifier { public SparkVerifier withMaxGroupSize(int maxGroupSize) { this.maxGroupSize = maxGroupSize; return this; } SparkVerifier(List<String> groupKeyColumns); } | SparkVerifier { public SparkVerifier withMaxGroupSize(int maxGroupSize) { this.maxGroupSize = maxGroupSize; return this; } SparkVerifier(List<String> groupKeyColumns); final SparkVerifier withMetadata(String name, String value); SparkVerifier withIgnoreSurplusColumns(boolean ignoreSurplusColumns); SparkVerifier withColumnsToIgnore(Set<String> columnsToIgnore); SparkVerifier withTolerance(double tolerance); SparkVerifier withTolerance(String columnName, double tolerance); SparkVerifier withMaxGroupSize(int maxGroupSize); SparkResult verify(String dataName, Supplier<DistributedTable> actualDataSupplier, Supplier<DistributedTable> expectedDataSupplier); } | SparkVerifier { public SparkVerifier withMaxGroupSize(int maxGroupSize) { this.maxGroupSize = maxGroupSize; return this; } SparkVerifier(List<String> groupKeyColumns); final SparkVerifier withMetadata(String name, String value); SparkVerifier withIgnoreSurplusColumns(boolean ignoreSurplusColumns); SparkVerifier withColumnsToIgnore(Set<String> columnsToIgnore); SparkVerifier withTolerance(double tolerance); SparkVerifier withTolerance(String columnName, double tolerance); SparkVerifier withMaxGroupSize(int maxGroupSize); SparkResult verify(String dataName, Supplier<DistributedTable> actualDataSupplier, Supplier<DistributedTable> expectedDataSupplier); } |
@Test public void runManyRowTestWithManyBreaks() throws IOException { List<GenericRecord> actual = new ArrayList<>(); for (Integer i = 1230001; i <= 1230100; i++) { actual.add(row(AVSC, (i&8) == 0 ? i : i + 1, (i&4) == 0 ? String.valueOf(i) : String.valueOf(i + 1), (i&2) == 0 ? i : i + 1, (i&1) == 0 ? i * 1.0 : i * 1.0 + 1)); } List<GenericRecord> expected = new ArrayList<>(); for (Integer i = 1230001; i <= 1230100; i++) { expected.add(row(AVSC, i, i.toString(), i, i * 1.0)); } runTest(actual, expected, false, newSparkVerifier(Collections.emptyList()) .withMaxGroupSize(10_000)); } | public SparkVerifier withMaxGroupSize(int maxGroupSize) { this.maxGroupSize = maxGroupSize; return this; } | SparkVerifier { public SparkVerifier withMaxGroupSize(int maxGroupSize) { this.maxGroupSize = maxGroupSize; return this; } } | SparkVerifier { public SparkVerifier withMaxGroupSize(int maxGroupSize) { this.maxGroupSize = maxGroupSize; return this; } SparkVerifier(List<String> groupKeyColumns); } | SparkVerifier { public SparkVerifier withMaxGroupSize(int maxGroupSize) { this.maxGroupSize = maxGroupSize; return this; } SparkVerifier(List<String> groupKeyColumns); final SparkVerifier withMetadata(String name, String value); SparkVerifier withIgnoreSurplusColumns(boolean ignoreSurplusColumns); SparkVerifier withColumnsToIgnore(Set<String> columnsToIgnore); SparkVerifier withTolerance(double tolerance); SparkVerifier withTolerance(String columnName, double tolerance); SparkVerifier withMaxGroupSize(int maxGroupSize); SparkResult verify(String dataName, Supplier<DistributedTable> actualDataSupplier, Supplier<DistributedTable> expectedDataSupplier); } | SparkVerifier { public SparkVerifier withMaxGroupSize(int maxGroupSize) { this.maxGroupSize = maxGroupSize; return this; } SparkVerifier(List<String> groupKeyColumns); final SparkVerifier withMetadata(String name, String value); SparkVerifier withIgnoreSurplusColumns(boolean ignoreSurplusColumns); SparkVerifier withColumnsToIgnore(Set<String> columnsToIgnore); SparkVerifier withTolerance(double tolerance); SparkVerifier withTolerance(String columnName, double tolerance); SparkVerifier withMaxGroupSize(int maxGroupSize); SparkResult verify(String dataName, Supplier<DistributedTable> actualDataSupplier, Supplier<DistributedTable> expectedDataSupplier); } |
@Test public void runManyRowTestWithManyBreaksAndRenamedColumn() throws IOException { List<GenericRecord> actual = new ArrayList<>(); Schema schema = new Schema.Parser().parse("{\"namespace\": \"verify.avro\",\n" + " \"type\": \"record\",\n" + " \"name\": \"Row\",\n" + " \"fields\": [\n" + " {\"name\": \"k1\", \"type\": \"int\"},\n" + " {\"name\": \"v1\", \"type\": \"string\"},\n" + " {\"name\": \"k2\", \"type\": \"int\"},\n" + " {\"name\": \"v3\", \"type\": \"double\"}\n" + " ]\n" + '}'); for (Integer i = 1230001; i <= 1230100; i++) { GenericRecord record = row( schema, (i & 4) == 0 ? i : i + 1, (i & 2) == 0 ? String.valueOf(i) : String.valueOf(i + 1), (i & 1) == 0 ? i : i + 1, i * 1.0); actual.add(record); } List<GenericRecord> expected = new ArrayList<>(); for (Integer i = 1230001; i <= 1230100; i++) { expected.add(row(AVSC, i, i.toString(), i, i * 1.0)); } runTest(actual, expected, false, newSparkVerifier(Collections.emptyList()) .withMaxGroupSize(10_000)); } | public SparkVerifier withMaxGroupSize(int maxGroupSize) { this.maxGroupSize = maxGroupSize; return this; } | SparkVerifier { public SparkVerifier withMaxGroupSize(int maxGroupSize) { this.maxGroupSize = maxGroupSize; return this; } } | SparkVerifier { public SparkVerifier withMaxGroupSize(int maxGroupSize) { this.maxGroupSize = maxGroupSize; return this; } SparkVerifier(List<String> groupKeyColumns); } | SparkVerifier { public SparkVerifier withMaxGroupSize(int maxGroupSize) { this.maxGroupSize = maxGroupSize; return this; } SparkVerifier(List<String> groupKeyColumns); final SparkVerifier withMetadata(String name, String value); SparkVerifier withIgnoreSurplusColumns(boolean ignoreSurplusColumns); SparkVerifier withColumnsToIgnore(Set<String> columnsToIgnore); SparkVerifier withTolerance(double tolerance); SparkVerifier withTolerance(String columnName, double tolerance); SparkVerifier withMaxGroupSize(int maxGroupSize); SparkResult verify(String dataName, Supplier<DistributedTable> actualDataSupplier, Supplier<DistributedTable> expectedDataSupplier); } | SparkVerifier { public SparkVerifier withMaxGroupSize(int maxGroupSize) { this.maxGroupSize = maxGroupSize; return this; } SparkVerifier(List<String> groupKeyColumns); final SparkVerifier withMetadata(String name, String value); SparkVerifier withIgnoreSurplusColumns(boolean ignoreSurplusColumns); SparkVerifier withColumnsToIgnore(Set<String> columnsToIgnore); SparkVerifier withTolerance(double tolerance); SparkVerifier withTolerance(String columnName, double tolerance); SparkVerifier withMaxGroupSize(int maxGroupSize); SparkResult verify(String dataName, Supplier<DistributedTable> actualDataSupplier, Supplier<DistributedTable> expectedDataSupplier); } |
@Test public void withTolerance() throws IOException { List<GenericRecord> actual = Arrays.asList( row(AVSC, 12301, "123011", 12301, 123011.1), row(AVSC, 12301, "123012", 12302, 123012.2), row(AVSC, 12301, "123013", 12303, 123012.9), row(AVSC, 12302, "123021", 12301, 123020.8) ); List<GenericRecord> expected = Arrays.asList( row(AVSC, 12301, "123011", 12301, 123011.19), row(AVSC, 12301, "123012", 12302, 123012.11), row(AVSC, 12301, "123013", 12303, 123012.79), row(AVSC, 12302, "123021", 12301, 123020.91) ); runTest(actual, expected, false, newSparkVerifier(Collections.emptyList()) .withMaxGroupSize(2) .withTolerance(0.1)); } | public SparkVerifier withTolerance(double tolerance) { this.columnComparatorsBuilder.withTolerance(tolerance); return this; } | SparkVerifier { public SparkVerifier withTolerance(double tolerance) { this.columnComparatorsBuilder.withTolerance(tolerance); return this; } } | SparkVerifier { public SparkVerifier withTolerance(double tolerance) { this.columnComparatorsBuilder.withTolerance(tolerance); return this; } SparkVerifier(List<String> groupKeyColumns); } | SparkVerifier { public SparkVerifier withTolerance(double tolerance) { this.columnComparatorsBuilder.withTolerance(tolerance); return this; } SparkVerifier(List<String> groupKeyColumns); final SparkVerifier withMetadata(String name, String value); SparkVerifier withIgnoreSurplusColumns(boolean ignoreSurplusColumns); SparkVerifier withColumnsToIgnore(Set<String> columnsToIgnore); SparkVerifier withTolerance(double tolerance); SparkVerifier withTolerance(String columnName, double tolerance); SparkVerifier withMaxGroupSize(int maxGroupSize); SparkResult verify(String dataName, Supplier<DistributedTable> actualDataSupplier, Supplier<DistributedTable> expectedDataSupplier); } | SparkVerifier { public SparkVerifier withTolerance(double tolerance) { this.columnComparatorsBuilder.withTolerance(tolerance); return this; } SparkVerifier(List<String> groupKeyColumns); final SparkVerifier withMetadata(String name, String value); SparkVerifier withIgnoreSurplusColumns(boolean ignoreSurplusColumns); SparkVerifier withColumnsToIgnore(Set<String> columnsToIgnore); SparkVerifier withTolerance(double tolerance); SparkVerifier withTolerance(String columnName, double tolerance); SparkVerifier withMaxGroupSize(int maxGroupSize); SparkResult verify(String dataName, Supplier<DistributedTable> actualDataSupplier, Supplier<DistributedTable> expectedDataSupplier); } |
@Test public void noAnnotation() { Invoker invoker = invokerBuilder.create(fooService, new FooInvoker(), null); this.setTargetMethod(exchange, "foo"); Object result = invoker.invoke(exchange, null); assertEquals("foo return", result); verifyZeroInteractions(sessionFactory); verifyZeroInteractions(session); verifyZeroInteractions(transaction); } | public Invoker create(Object service, Invoker rootInvoker, SessionFactory sessionFactory) { ImmutableMap.Builder<String, UnitOfWork> unitOfWorkMethodsBuilder = new ImmutableMap.Builder<>(); for (Method m : service.getClass().getMethods()) { if (m.isAnnotationPresent(UnitOfWork.class)) { unitOfWorkMethodsBuilder.put(m.getName(), m.getAnnotation(UnitOfWork.class)); } } ImmutableMap<String, UnitOfWork> unitOfWorkMethods = unitOfWorkMethodsBuilder.build(); Invoker invoker = rootInvoker; if (unitOfWorkMethods.size() > 0) { invoker = new UnitOfWorkInvoker(invoker, unitOfWorkMethods, sessionFactory); } return invoker; } | UnitOfWorkInvokerFactory { public Invoker create(Object service, Invoker rootInvoker, SessionFactory sessionFactory) { ImmutableMap.Builder<String, UnitOfWork> unitOfWorkMethodsBuilder = new ImmutableMap.Builder<>(); for (Method m : service.getClass().getMethods()) { if (m.isAnnotationPresent(UnitOfWork.class)) { unitOfWorkMethodsBuilder.put(m.getName(), m.getAnnotation(UnitOfWork.class)); } } ImmutableMap<String, UnitOfWork> unitOfWorkMethods = unitOfWorkMethodsBuilder.build(); Invoker invoker = rootInvoker; if (unitOfWorkMethods.size() > 0) { invoker = new UnitOfWorkInvoker(invoker, unitOfWorkMethods, sessionFactory); } return invoker; } } | UnitOfWorkInvokerFactory { public Invoker create(Object service, Invoker rootInvoker, SessionFactory sessionFactory) { ImmutableMap.Builder<String, UnitOfWork> unitOfWorkMethodsBuilder = new ImmutableMap.Builder<>(); for (Method m : service.getClass().getMethods()) { if (m.isAnnotationPresent(UnitOfWork.class)) { unitOfWorkMethodsBuilder.put(m.getName(), m.getAnnotation(UnitOfWork.class)); } } ImmutableMap<String, UnitOfWork> unitOfWorkMethods = unitOfWorkMethodsBuilder.build(); Invoker invoker = rootInvoker; if (unitOfWorkMethods.size() > 0) { invoker = new UnitOfWorkInvoker(invoker, unitOfWorkMethods, sessionFactory); } return invoker; } } | UnitOfWorkInvokerFactory { public Invoker create(Object service, Invoker rootInvoker, SessionFactory sessionFactory) { ImmutableMap.Builder<String, UnitOfWork> unitOfWorkMethodsBuilder = new ImmutableMap.Builder<>(); for (Method m : service.getClass().getMethods()) { if (m.isAnnotationPresent(UnitOfWork.class)) { unitOfWorkMethodsBuilder.put(m.getName(), m.getAnnotation(UnitOfWork.class)); } } ImmutableMap<String, UnitOfWork> unitOfWorkMethods = unitOfWorkMethodsBuilder.build(); Invoker invoker = rootInvoker; if (unitOfWorkMethods.size() > 0) { invoker = new UnitOfWorkInvoker(invoker, unitOfWorkMethods, sessionFactory); } return invoker; } Invoker create(Object service, Invoker rootInvoker, SessionFactory sessionFactory); } | UnitOfWorkInvokerFactory { public Invoker create(Object service, Invoker rootInvoker, SessionFactory sessionFactory) { ImmutableMap.Builder<String, UnitOfWork> unitOfWorkMethodsBuilder = new ImmutableMap.Builder<>(); for (Method m : service.getClass().getMethods()) { if (m.isAnnotationPresent(UnitOfWork.class)) { unitOfWorkMethodsBuilder.put(m.getName(), m.getAnnotation(UnitOfWork.class)); } } ImmutableMap<String, UnitOfWork> unitOfWorkMethods = unitOfWorkMethodsBuilder.build(); Invoker invoker = rootInvoker; if (unitOfWorkMethods.size() > 0) { invoker = new UnitOfWorkInvoker(invoker, unitOfWorkMethods, sessionFactory); } return invoker; } Invoker create(Object service, Invoker rootInvoker, SessionFactory sessionFactory); } |
@Test public void publishEndpointWithProperties() throws Exception { HashMap<String, Object> props = new HashMap<>(); props.put("key", "value"); Endpoint e = jaxwsEnvironment.publishEndpoint( new EndpointBuilder("local: .properties(props)); assertThat(e, is(notNullValue())); assertThat(e.getProperties().get("key"), equalTo("value")); verify(mockInvokerBuilder).create(any(), any(Invoker.class)); verifyZeroInteractions(mockUnitOfWorkInvokerBuilder); Node soapResponse = testutils.invoke("local: LocalTransportFactory.TRANSPORT_ID, soapRequest.getBytes()); verify(mockInvoker).invoke(any(Exchange.class), any()); testutils.assertValid("/soap:Envelope/soap:Body/a:fooResponse", soapResponse); } | public Endpoint publishEndpoint(EndpointBuilder endpointBuilder) { checkArgument(endpointBuilder != null, "EndpointBuilder is null"); EndpointImpl cxfendpoint = new EndpointImpl(bus, endpointBuilder.getService()); if(endpointBuilder.publishedEndpointUrl() != null) { cxfendpoint.setPublishedEndpointUrl(endpointBuilder.publishedEndpointUrl()); } else if(publishedEndpointUrlPrefix != null) { cxfendpoint.setPublishedEndpointUrl(publishedEndpointUrlPrefix + endpointBuilder.getPath()); } cxfendpoint.publish(endpointBuilder.getPath()); if (endpointBuilder.isMtomEnabled()) { ((SOAPBinding)cxfendpoint.getBinding()).setMTOMEnabled(true); } Invoker invoker = cxfendpoint.getService().getInvoker(); ValidatorFactory vf = Validation.buildDefaultValidatorFactory(); invoker = this.createValidatingInvoker(invoker, vf.getValidator()); if (endpointBuilder.getSessionFactory() != null) { invoker = unitOfWorkInvokerBuilder.create( endpointBuilder.getService(), invoker, endpointBuilder.getSessionFactory()); cxfendpoint.getService().setInvoker(invoker); } invoker = instrumentedInvokerBuilder.create(endpointBuilder.getService(), invoker); cxfendpoint.getService().setInvoker(invoker); if (endpointBuilder.getAuthentication() != null) { BasicAuthenticationInterceptor basicAuthInterceptor = this.createBasicAuthenticationInterceptor(); basicAuthInterceptor.setAuthenticator(endpointBuilder.getAuthentication()); cxfendpoint.getInInterceptors().add(basicAuthInterceptor); } if (endpointBuilder.getCxfInInterceptors() != null) { cxfendpoint.getInInterceptors().addAll(endpointBuilder.getCxfInInterceptors()); } if (endpointBuilder.getCxfInFaultInterceptors() != null) { cxfendpoint.getInFaultInterceptors().addAll(endpointBuilder.getCxfInFaultInterceptors()); } if (endpointBuilder.getCxfOutInterceptors() != null) { cxfendpoint.getOutInterceptors().addAll(endpointBuilder.getCxfOutInterceptors()); } if (endpointBuilder.getCxfOutFaultInterceptors() != null) { cxfendpoint.getOutFaultInterceptors().addAll(endpointBuilder.getCxfOutFaultInterceptors()); } if (endpointBuilder.getProperties() != null) { cxfendpoint.getProperties().putAll( endpointBuilder.getProperties()); } return cxfendpoint; } | JAXWSEnvironment { public Endpoint publishEndpoint(EndpointBuilder endpointBuilder) { checkArgument(endpointBuilder != null, "EndpointBuilder is null"); EndpointImpl cxfendpoint = new EndpointImpl(bus, endpointBuilder.getService()); if(endpointBuilder.publishedEndpointUrl() != null) { cxfendpoint.setPublishedEndpointUrl(endpointBuilder.publishedEndpointUrl()); } else if(publishedEndpointUrlPrefix != null) { cxfendpoint.setPublishedEndpointUrl(publishedEndpointUrlPrefix + endpointBuilder.getPath()); } cxfendpoint.publish(endpointBuilder.getPath()); if (endpointBuilder.isMtomEnabled()) { ((SOAPBinding)cxfendpoint.getBinding()).setMTOMEnabled(true); } Invoker invoker = cxfendpoint.getService().getInvoker(); ValidatorFactory vf = Validation.buildDefaultValidatorFactory(); invoker = this.createValidatingInvoker(invoker, vf.getValidator()); if (endpointBuilder.getSessionFactory() != null) { invoker = unitOfWorkInvokerBuilder.create( endpointBuilder.getService(), invoker, endpointBuilder.getSessionFactory()); cxfendpoint.getService().setInvoker(invoker); } invoker = instrumentedInvokerBuilder.create(endpointBuilder.getService(), invoker); cxfendpoint.getService().setInvoker(invoker); if (endpointBuilder.getAuthentication() != null) { BasicAuthenticationInterceptor basicAuthInterceptor = this.createBasicAuthenticationInterceptor(); basicAuthInterceptor.setAuthenticator(endpointBuilder.getAuthentication()); cxfendpoint.getInInterceptors().add(basicAuthInterceptor); } if (endpointBuilder.getCxfInInterceptors() != null) { cxfendpoint.getInInterceptors().addAll(endpointBuilder.getCxfInInterceptors()); } if (endpointBuilder.getCxfInFaultInterceptors() != null) { cxfendpoint.getInFaultInterceptors().addAll(endpointBuilder.getCxfInFaultInterceptors()); } if (endpointBuilder.getCxfOutInterceptors() != null) { cxfendpoint.getOutInterceptors().addAll(endpointBuilder.getCxfOutInterceptors()); } if (endpointBuilder.getCxfOutFaultInterceptors() != null) { cxfendpoint.getOutFaultInterceptors().addAll(endpointBuilder.getCxfOutFaultInterceptors()); } if (endpointBuilder.getProperties() != null) { cxfendpoint.getProperties().putAll( endpointBuilder.getProperties()); } return cxfendpoint; } } | JAXWSEnvironment { public Endpoint publishEndpoint(EndpointBuilder endpointBuilder) { checkArgument(endpointBuilder != null, "EndpointBuilder is null"); EndpointImpl cxfendpoint = new EndpointImpl(bus, endpointBuilder.getService()); if(endpointBuilder.publishedEndpointUrl() != null) { cxfendpoint.setPublishedEndpointUrl(endpointBuilder.publishedEndpointUrl()); } else if(publishedEndpointUrlPrefix != null) { cxfendpoint.setPublishedEndpointUrl(publishedEndpointUrlPrefix + endpointBuilder.getPath()); } cxfendpoint.publish(endpointBuilder.getPath()); if (endpointBuilder.isMtomEnabled()) { ((SOAPBinding)cxfendpoint.getBinding()).setMTOMEnabled(true); } Invoker invoker = cxfendpoint.getService().getInvoker(); ValidatorFactory vf = Validation.buildDefaultValidatorFactory(); invoker = this.createValidatingInvoker(invoker, vf.getValidator()); if (endpointBuilder.getSessionFactory() != null) { invoker = unitOfWorkInvokerBuilder.create( endpointBuilder.getService(), invoker, endpointBuilder.getSessionFactory()); cxfendpoint.getService().setInvoker(invoker); } invoker = instrumentedInvokerBuilder.create(endpointBuilder.getService(), invoker); cxfendpoint.getService().setInvoker(invoker); if (endpointBuilder.getAuthentication() != null) { BasicAuthenticationInterceptor basicAuthInterceptor = this.createBasicAuthenticationInterceptor(); basicAuthInterceptor.setAuthenticator(endpointBuilder.getAuthentication()); cxfendpoint.getInInterceptors().add(basicAuthInterceptor); } if (endpointBuilder.getCxfInInterceptors() != null) { cxfendpoint.getInInterceptors().addAll(endpointBuilder.getCxfInInterceptors()); } if (endpointBuilder.getCxfInFaultInterceptors() != null) { cxfendpoint.getInFaultInterceptors().addAll(endpointBuilder.getCxfInFaultInterceptors()); } if (endpointBuilder.getCxfOutInterceptors() != null) { cxfendpoint.getOutInterceptors().addAll(endpointBuilder.getCxfOutInterceptors()); } if (endpointBuilder.getCxfOutFaultInterceptors() != null) { cxfendpoint.getOutFaultInterceptors().addAll(endpointBuilder.getCxfOutFaultInterceptors()); } if (endpointBuilder.getProperties() != null) { cxfendpoint.getProperties().putAll( endpointBuilder.getProperties()); } return cxfendpoint; } JAXWSEnvironment(String defaultPath); } | JAXWSEnvironment { public Endpoint publishEndpoint(EndpointBuilder endpointBuilder) { checkArgument(endpointBuilder != null, "EndpointBuilder is null"); EndpointImpl cxfendpoint = new EndpointImpl(bus, endpointBuilder.getService()); if(endpointBuilder.publishedEndpointUrl() != null) { cxfendpoint.setPublishedEndpointUrl(endpointBuilder.publishedEndpointUrl()); } else if(publishedEndpointUrlPrefix != null) { cxfendpoint.setPublishedEndpointUrl(publishedEndpointUrlPrefix + endpointBuilder.getPath()); } cxfendpoint.publish(endpointBuilder.getPath()); if (endpointBuilder.isMtomEnabled()) { ((SOAPBinding)cxfendpoint.getBinding()).setMTOMEnabled(true); } Invoker invoker = cxfendpoint.getService().getInvoker(); ValidatorFactory vf = Validation.buildDefaultValidatorFactory(); invoker = this.createValidatingInvoker(invoker, vf.getValidator()); if (endpointBuilder.getSessionFactory() != null) { invoker = unitOfWorkInvokerBuilder.create( endpointBuilder.getService(), invoker, endpointBuilder.getSessionFactory()); cxfendpoint.getService().setInvoker(invoker); } invoker = instrumentedInvokerBuilder.create(endpointBuilder.getService(), invoker); cxfendpoint.getService().setInvoker(invoker); if (endpointBuilder.getAuthentication() != null) { BasicAuthenticationInterceptor basicAuthInterceptor = this.createBasicAuthenticationInterceptor(); basicAuthInterceptor.setAuthenticator(endpointBuilder.getAuthentication()); cxfendpoint.getInInterceptors().add(basicAuthInterceptor); } if (endpointBuilder.getCxfInInterceptors() != null) { cxfendpoint.getInInterceptors().addAll(endpointBuilder.getCxfInInterceptors()); } if (endpointBuilder.getCxfInFaultInterceptors() != null) { cxfendpoint.getInFaultInterceptors().addAll(endpointBuilder.getCxfInFaultInterceptors()); } if (endpointBuilder.getCxfOutInterceptors() != null) { cxfendpoint.getOutInterceptors().addAll(endpointBuilder.getCxfOutInterceptors()); } if (endpointBuilder.getCxfOutFaultInterceptors() != null) { cxfendpoint.getOutFaultInterceptors().addAll(endpointBuilder.getCxfOutFaultInterceptors()); } if (endpointBuilder.getProperties() != null) { cxfendpoint.getProperties().putAll( endpointBuilder.getProperties()); } return cxfendpoint; } JAXWSEnvironment(String defaultPath); String getDefaultPath(); HttpServlet buildServlet(); void setPublishedEndpointUrlPrefix(String publishedEndpointUrlPrefix); void setInstrumentedInvokerBuilder(InstrumentedInvokerFactory instrumentedInvokerBuilder); void setUnitOfWorkInvokerBuilder(UnitOfWorkInvokerFactory unitOfWorkInvokerBuilder); void logEndpoints(); Endpoint publishEndpoint(EndpointBuilder endpointBuilder); T getClient(ClientBuilder<T> clientBuilder); } | JAXWSEnvironment { public Endpoint publishEndpoint(EndpointBuilder endpointBuilder) { checkArgument(endpointBuilder != null, "EndpointBuilder is null"); EndpointImpl cxfendpoint = new EndpointImpl(bus, endpointBuilder.getService()); if(endpointBuilder.publishedEndpointUrl() != null) { cxfendpoint.setPublishedEndpointUrl(endpointBuilder.publishedEndpointUrl()); } else if(publishedEndpointUrlPrefix != null) { cxfendpoint.setPublishedEndpointUrl(publishedEndpointUrlPrefix + endpointBuilder.getPath()); } cxfendpoint.publish(endpointBuilder.getPath()); if (endpointBuilder.isMtomEnabled()) { ((SOAPBinding)cxfendpoint.getBinding()).setMTOMEnabled(true); } Invoker invoker = cxfendpoint.getService().getInvoker(); ValidatorFactory vf = Validation.buildDefaultValidatorFactory(); invoker = this.createValidatingInvoker(invoker, vf.getValidator()); if (endpointBuilder.getSessionFactory() != null) { invoker = unitOfWorkInvokerBuilder.create( endpointBuilder.getService(), invoker, endpointBuilder.getSessionFactory()); cxfendpoint.getService().setInvoker(invoker); } invoker = instrumentedInvokerBuilder.create(endpointBuilder.getService(), invoker); cxfendpoint.getService().setInvoker(invoker); if (endpointBuilder.getAuthentication() != null) { BasicAuthenticationInterceptor basicAuthInterceptor = this.createBasicAuthenticationInterceptor(); basicAuthInterceptor.setAuthenticator(endpointBuilder.getAuthentication()); cxfendpoint.getInInterceptors().add(basicAuthInterceptor); } if (endpointBuilder.getCxfInInterceptors() != null) { cxfendpoint.getInInterceptors().addAll(endpointBuilder.getCxfInInterceptors()); } if (endpointBuilder.getCxfInFaultInterceptors() != null) { cxfendpoint.getInFaultInterceptors().addAll(endpointBuilder.getCxfInFaultInterceptors()); } if (endpointBuilder.getCxfOutInterceptors() != null) { cxfendpoint.getOutInterceptors().addAll(endpointBuilder.getCxfOutInterceptors()); } if (endpointBuilder.getCxfOutFaultInterceptors() != null) { cxfendpoint.getOutFaultInterceptors().addAll(endpointBuilder.getCxfOutFaultInterceptors()); } if (endpointBuilder.getProperties() != null) { cxfendpoint.getProperties().putAll( endpointBuilder.getProperties()); } return cxfendpoint; } JAXWSEnvironment(String defaultPath); String getDefaultPath(); HttpServlet buildServlet(); void setPublishedEndpointUrlPrefix(String publishedEndpointUrlPrefix); void setInstrumentedInvokerBuilder(InstrumentedInvokerFactory instrumentedInvokerBuilder); void setUnitOfWorkInvokerBuilder(UnitOfWorkInvokerFactory unitOfWorkInvokerBuilder); void logEndpoints(); Endpoint publishEndpoint(EndpointBuilder endpointBuilder); T getClient(ClientBuilder<T> clientBuilder); } |
@Test public void publishEndpointWithInvalidArguments() throws Exception { try { jaxwsEnvironment.publishEndpoint(new EndpointBuilder("foo", null)); } catch (IllegalArgumentException e) { } try { jaxwsEnvironment.publishEndpoint(new EndpointBuilder(null, service)); } catch (IllegalArgumentException e) { } try { jaxwsEnvironment.publishEndpoint(new EndpointBuilder(" ", service)); } catch (IllegalArgumentException e) { } } | public Endpoint publishEndpoint(EndpointBuilder endpointBuilder) { checkArgument(endpointBuilder != null, "EndpointBuilder is null"); EndpointImpl cxfendpoint = new EndpointImpl(bus, endpointBuilder.getService()); if(endpointBuilder.publishedEndpointUrl() != null) { cxfendpoint.setPublishedEndpointUrl(endpointBuilder.publishedEndpointUrl()); } else if(publishedEndpointUrlPrefix != null) { cxfendpoint.setPublishedEndpointUrl(publishedEndpointUrlPrefix + endpointBuilder.getPath()); } cxfendpoint.publish(endpointBuilder.getPath()); if (endpointBuilder.isMtomEnabled()) { ((SOAPBinding)cxfendpoint.getBinding()).setMTOMEnabled(true); } Invoker invoker = cxfendpoint.getService().getInvoker(); ValidatorFactory vf = Validation.buildDefaultValidatorFactory(); invoker = this.createValidatingInvoker(invoker, vf.getValidator()); if (endpointBuilder.getSessionFactory() != null) { invoker = unitOfWorkInvokerBuilder.create( endpointBuilder.getService(), invoker, endpointBuilder.getSessionFactory()); cxfendpoint.getService().setInvoker(invoker); } invoker = instrumentedInvokerBuilder.create(endpointBuilder.getService(), invoker); cxfendpoint.getService().setInvoker(invoker); if (endpointBuilder.getAuthentication() != null) { BasicAuthenticationInterceptor basicAuthInterceptor = this.createBasicAuthenticationInterceptor(); basicAuthInterceptor.setAuthenticator(endpointBuilder.getAuthentication()); cxfendpoint.getInInterceptors().add(basicAuthInterceptor); } if (endpointBuilder.getCxfInInterceptors() != null) { cxfendpoint.getInInterceptors().addAll(endpointBuilder.getCxfInInterceptors()); } if (endpointBuilder.getCxfInFaultInterceptors() != null) { cxfendpoint.getInFaultInterceptors().addAll(endpointBuilder.getCxfInFaultInterceptors()); } if (endpointBuilder.getCxfOutInterceptors() != null) { cxfendpoint.getOutInterceptors().addAll(endpointBuilder.getCxfOutInterceptors()); } if (endpointBuilder.getCxfOutFaultInterceptors() != null) { cxfendpoint.getOutFaultInterceptors().addAll(endpointBuilder.getCxfOutFaultInterceptors()); } if (endpointBuilder.getProperties() != null) { cxfendpoint.getProperties().putAll( endpointBuilder.getProperties()); } return cxfendpoint; } | JAXWSEnvironment { public Endpoint publishEndpoint(EndpointBuilder endpointBuilder) { checkArgument(endpointBuilder != null, "EndpointBuilder is null"); EndpointImpl cxfendpoint = new EndpointImpl(bus, endpointBuilder.getService()); if(endpointBuilder.publishedEndpointUrl() != null) { cxfendpoint.setPublishedEndpointUrl(endpointBuilder.publishedEndpointUrl()); } else if(publishedEndpointUrlPrefix != null) { cxfendpoint.setPublishedEndpointUrl(publishedEndpointUrlPrefix + endpointBuilder.getPath()); } cxfendpoint.publish(endpointBuilder.getPath()); if (endpointBuilder.isMtomEnabled()) { ((SOAPBinding)cxfendpoint.getBinding()).setMTOMEnabled(true); } Invoker invoker = cxfendpoint.getService().getInvoker(); ValidatorFactory vf = Validation.buildDefaultValidatorFactory(); invoker = this.createValidatingInvoker(invoker, vf.getValidator()); if (endpointBuilder.getSessionFactory() != null) { invoker = unitOfWorkInvokerBuilder.create( endpointBuilder.getService(), invoker, endpointBuilder.getSessionFactory()); cxfendpoint.getService().setInvoker(invoker); } invoker = instrumentedInvokerBuilder.create(endpointBuilder.getService(), invoker); cxfendpoint.getService().setInvoker(invoker); if (endpointBuilder.getAuthentication() != null) { BasicAuthenticationInterceptor basicAuthInterceptor = this.createBasicAuthenticationInterceptor(); basicAuthInterceptor.setAuthenticator(endpointBuilder.getAuthentication()); cxfendpoint.getInInterceptors().add(basicAuthInterceptor); } if (endpointBuilder.getCxfInInterceptors() != null) { cxfendpoint.getInInterceptors().addAll(endpointBuilder.getCxfInInterceptors()); } if (endpointBuilder.getCxfInFaultInterceptors() != null) { cxfendpoint.getInFaultInterceptors().addAll(endpointBuilder.getCxfInFaultInterceptors()); } if (endpointBuilder.getCxfOutInterceptors() != null) { cxfendpoint.getOutInterceptors().addAll(endpointBuilder.getCxfOutInterceptors()); } if (endpointBuilder.getCxfOutFaultInterceptors() != null) { cxfendpoint.getOutFaultInterceptors().addAll(endpointBuilder.getCxfOutFaultInterceptors()); } if (endpointBuilder.getProperties() != null) { cxfendpoint.getProperties().putAll( endpointBuilder.getProperties()); } return cxfendpoint; } } | JAXWSEnvironment { public Endpoint publishEndpoint(EndpointBuilder endpointBuilder) { checkArgument(endpointBuilder != null, "EndpointBuilder is null"); EndpointImpl cxfendpoint = new EndpointImpl(bus, endpointBuilder.getService()); if(endpointBuilder.publishedEndpointUrl() != null) { cxfendpoint.setPublishedEndpointUrl(endpointBuilder.publishedEndpointUrl()); } else if(publishedEndpointUrlPrefix != null) { cxfendpoint.setPublishedEndpointUrl(publishedEndpointUrlPrefix + endpointBuilder.getPath()); } cxfendpoint.publish(endpointBuilder.getPath()); if (endpointBuilder.isMtomEnabled()) { ((SOAPBinding)cxfendpoint.getBinding()).setMTOMEnabled(true); } Invoker invoker = cxfendpoint.getService().getInvoker(); ValidatorFactory vf = Validation.buildDefaultValidatorFactory(); invoker = this.createValidatingInvoker(invoker, vf.getValidator()); if (endpointBuilder.getSessionFactory() != null) { invoker = unitOfWorkInvokerBuilder.create( endpointBuilder.getService(), invoker, endpointBuilder.getSessionFactory()); cxfendpoint.getService().setInvoker(invoker); } invoker = instrumentedInvokerBuilder.create(endpointBuilder.getService(), invoker); cxfendpoint.getService().setInvoker(invoker); if (endpointBuilder.getAuthentication() != null) { BasicAuthenticationInterceptor basicAuthInterceptor = this.createBasicAuthenticationInterceptor(); basicAuthInterceptor.setAuthenticator(endpointBuilder.getAuthentication()); cxfendpoint.getInInterceptors().add(basicAuthInterceptor); } if (endpointBuilder.getCxfInInterceptors() != null) { cxfendpoint.getInInterceptors().addAll(endpointBuilder.getCxfInInterceptors()); } if (endpointBuilder.getCxfInFaultInterceptors() != null) { cxfendpoint.getInFaultInterceptors().addAll(endpointBuilder.getCxfInFaultInterceptors()); } if (endpointBuilder.getCxfOutInterceptors() != null) { cxfendpoint.getOutInterceptors().addAll(endpointBuilder.getCxfOutInterceptors()); } if (endpointBuilder.getCxfOutFaultInterceptors() != null) { cxfendpoint.getOutFaultInterceptors().addAll(endpointBuilder.getCxfOutFaultInterceptors()); } if (endpointBuilder.getProperties() != null) { cxfendpoint.getProperties().putAll( endpointBuilder.getProperties()); } return cxfendpoint; } JAXWSEnvironment(String defaultPath); } | JAXWSEnvironment { public Endpoint publishEndpoint(EndpointBuilder endpointBuilder) { checkArgument(endpointBuilder != null, "EndpointBuilder is null"); EndpointImpl cxfendpoint = new EndpointImpl(bus, endpointBuilder.getService()); if(endpointBuilder.publishedEndpointUrl() != null) { cxfendpoint.setPublishedEndpointUrl(endpointBuilder.publishedEndpointUrl()); } else if(publishedEndpointUrlPrefix != null) { cxfendpoint.setPublishedEndpointUrl(publishedEndpointUrlPrefix + endpointBuilder.getPath()); } cxfendpoint.publish(endpointBuilder.getPath()); if (endpointBuilder.isMtomEnabled()) { ((SOAPBinding)cxfendpoint.getBinding()).setMTOMEnabled(true); } Invoker invoker = cxfendpoint.getService().getInvoker(); ValidatorFactory vf = Validation.buildDefaultValidatorFactory(); invoker = this.createValidatingInvoker(invoker, vf.getValidator()); if (endpointBuilder.getSessionFactory() != null) { invoker = unitOfWorkInvokerBuilder.create( endpointBuilder.getService(), invoker, endpointBuilder.getSessionFactory()); cxfendpoint.getService().setInvoker(invoker); } invoker = instrumentedInvokerBuilder.create(endpointBuilder.getService(), invoker); cxfendpoint.getService().setInvoker(invoker); if (endpointBuilder.getAuthentication() != null) { BasicAuthenticationInterceptor basicAuthInterceptor = this.createBasicAuthenticationInterceptor(); basicAuthInterceptor.setAuthenticator(endpointBuilder.getAuthentication()); cxfendpoint.getInInterceptors().add(basicAuthInterceptor); } if (endpointBuilder.getCxfInInterceptors() != null) { cxfendpoint.getInInterceptors().addAll(endpointBuilder.getCxfInInterceptors()); } if (endpointBuilder.getCxfInFaultInterceptors() != null) { cxfendpoint.getInFaultInterceptors().addAll(endpointBuilder.getCxfInFaultInterceptors()); } if (endpointBuilder.getCxfOutInterceptors() != null) { cxfendpoint.getOutInterceptors().addAll(endpointBuilder.getCxfOutInterceptors()); } if (endpointBuilder.getCxfOutFaultInterceptors() != null) { cxfendpoint.getOutFaultInterceptors().addAll(endpointBuilder.getCxfOutFaultInterceptors()); } if (endpointBuilder.getProperties() != null) { cxfendpoint.getProperties().putAll( endpointBuilder.getProperties()); } return cxfendpoint; } JAXWSEnvironment(String defaultPath); String getDefaultPath(); HttpServlet buildServlet(); void setPublishedEndpointUrlPrefix(String publishedEndpointUrlPrefix); void setInstrumentedInvokerBuilder(InstrumentedInvokerFactory instrumentedInvokerBuilder); void setUnitOfWorkInvokerBuilder(UnitOfWorkInvokerFactory unitOfWorkInvokerBuilder); void logEndpoints(); Endpoint publishEndpoint(EndpointBuilder endpointBuilder); T getClient(ClientBuilder<T> clientBuilder); } | JAXWSEnvironment { public Endpoint publishEndpoint(EndpointBuilder endpointBuilder) { checkArgument(endpointBuilder != null, "EndpointBuilder is null"); EndpointImpl cxfendpoint = new EndpointImpl(bus, endpointBuilder.getService()); if(endpointBuilder.publishedEndpointUrl() != null) { cxfendpoint.setPublishedEndpointUrl(endpointBuilder.publishedEndpointUrl()); } else if(publishedEndpointUrlPrefix != null) { cxfendpoint.setPublishedEndpointUrl(publishedEndpointUrlPrefix + endpointBuilder.getPath()); } cxfendpoint.publish(endpointBuilder.getPath()); if (endpointBuilder.isMtomEnabled()) { ((SOAPBinding)cxfendpoint.getBinding()).setMTOMEnabled(true); } Invoker invoker = cxfendpoint.getService().getInvoker(); ValidatorFactory vf = Validation.buildDefaultValidatorFactory(); invoker = this.createValidatingInvoker(invoker, vf.getValidator()); if (endpointBuilder.getSessionFactory() != null) { invoker = unitOfWorkInvokerBuilder.create( endpointBuilder.getService(), invoker, endpointBuilder.getSessionFactory()); cxfendpoint.getService().setInvoker(invoker); } invoker = instrumentedInvokerBuilder.create(endpointBuilder.getService(), invoker); cxfendpoint.getService().setInvoker(invoker); if (endpointBuilder.getAuthentication() != null) { BasicAuthenticationInterceptor basicAuthInterceptor = this.createBasicAuthenticationInterceptor(); basicAuthInterceptor.setAuthenticator(endpointBuilder.getAuthentication()); cxfendpoint.getInInterceptors().add(basicAuthInterceptor); } if (endpointBuilder.getCxfInInterceptors() != null) { cxfendpoint.getInInterceptors().addAll(endpointBuilder.getCxfInInterceptors()); } if (endpointBuilder.getCxfInFaultInterceptors() != null) { cxfendpoint.getInFaultInterceptors().addAll(endpointBuilder.getCxfInFaultInterceptors()); } if (endpointBuilder.getCxfOutInterceptors() != null) { cxfendpoint.getOutInterceptors().addAll(endpointBuilder.getCxfOutInterceptors()); } if (endpointBuilder.getCxfOutFaultInterceptors() != null) { cxfendpoint.getOutFaultInterceptors().addAll(endpointBuilder.getCxfOutFaultInterceptors()); } if (endpointBuilder.getProperties() != null) { cxfendpoint.getProperties().putAll( endpointBuilder.getProperties()); } return cxfendpoint; } JAXWSEnvironment(String defaultPath); String getDefaultPath(); HttpServlet buildServlet(); void setPublishedEndpointUrlPrefix(String publishedEndpointUrlPrefix); void setInstrumentedInvokerBuilder(InstrumentedInvokerFactory instrumentedInvokerBuilder); void setUnitOfWorkInvokerBuilder(UnitOfWorkInvokerFactory unitOfWorkInvokerBuilder); void logEndpoints(); Endpoint publishEndpoint(EndpointBuilder endpointBuilder); T getClient(ClientBuilder<T> clientBuilder); } |
@Test public void getClient() { String address = "http: Handler handler = mock(Handler.class); DummyInterface clientProxy = jaxwsEnvironment.getClient( new ClientBuilder<>(DummyInterface.class, address) ); assertThat(clientProxy, is(instanceOf(Proxy.class))); Client c = ClientProxy.getClient(clientProxy); assertThat(c.getEndpoint().getEndpointInfo().getAddress(), equalTo(address)); assertThat(c.getEndpoint().getService().get("endpoint.class").equals(DummyInterface.class), equalTo(true)); assertThat(((BindingProvider)clientProxy).getBinding() .getHandlerChain().size(), equalTo(0)); HTTPClientPolicy httpclient = ((HTTPConduit)c.getConduit()).getClient(); assertThat(httpclient.getConnectionTimeout(), equalTo(500L)); assertThat(httpclient.getReceiveTimeout(), equalTo(2000L)); TestInterceptor inInterceptor = new TestInterceptor(Phase.UNMARSHAL); TestInterceptor inInterceptor2 = new TestInterceptor(Phase.PRE_INVOKE); TestInterceptor outInterceptor = new TestInterceptor(Phase.MARSHAL); clientProxy = jaxwsEnvironment.getClient( new ClientBuilder<>(DummyInterface.class, address) .connectTimeout(123) .receiveTimeout(456) .handlers(handler) .bindingId(SoapBindingFactory.SOAP_12_BINDING) .cxfInInterceptors(inInterceptor, inInterceptor2) .cxfOutInterceptors(outInterceptor) .enableMtom()); c = ClientProxy.getClient(clientProxy); assertThat(((BindingProvider) clientProxy).getBinding().getBindingID(), equalTo("http: assertThat(c.getEndpoint().getEndpointInfo().getAddress(), equalTo(address)); assertThat(c.getEndpoint().getService().get("endpoint.class").equals(DummyInterface.class), equalTo(true)); httpclient = ((HTTPConduit)c.getConduit()).getClient(); assertThat(httpclient.getConnectionTimeout(), equalTo(123L)); assertThat(httpclient.getReceiveTimeout(), equalTo(456L)); assertThat(((BindingProvider)clientProxy).getBinding().getHandlerChain(), contains(handler)); BindingProvider bp = (BindingProvider)clientProxy; SOAPBinding binding = (SOAPBinding)bp.getBinding(); assertThat(binding.isMTOMEnabled(), equalTo(true)); } | public <T> T getClient(ClientBuilder<T> clientBuilder) { JaxWsProxyFactoryBean proxyFactory = new JaxWsProxyFactoryBean(); proxyFactory.setServiceClass(clientBuilder.getServiceClass()); proxyFactory.setAddress(clientBuilder.getAddress()); if (clientBuilder.getHandlers() != null) { for (Handler h : clientBuilder.getHandlers()) { proxyFactory.getHandlers().add(h); } } if (clientBuilder.getBindingId() != null) { proxyFactory.setBindingId(clientBuilder.getBindingId()); } if (clientBuilder.getCxfInInterceptors() != null) { proxyFactory.getInInterceptors().addAll(clientBuilder.getCxfInInterceptors()); } if (clientBuilder.getCxfInFaultInterceptors() != null) { proxyFactory.getInFaultInterceptors().addAll(clientBuilder.getCxfInFaultInterceptors()); } if (clientBuilder.getCxfOutInterceptors() != null) { proxyFactory.getOutInterceptors().addAll(clientBuilder.getCxfOutInterceptors()); } if (clientBuilder.getCxfOutFaultInterceptors() != null) { proxyFactory.getOutFaultInterceptors().addAll(clientBuilder.getCxfOutFaultInterceptors()); } T proxy = clientBuilder.getServiceClass().cast(proxyFactory.create()); if (clientBuilder.isMtomEnabled()) { BindingProvider bp = (BindingProvider)proxy; SOAPBinding binding = (SOAPBinding)bp.getBinding(); binding.setMTOMEnabled(true); } HTTPConduit http = (HTTPConduit)ClientProxy.getClient(proxy).getConduit(); HTTPClientPolicy client = http.getClient(); client.setConnectionTimeout(clientBuilder.getConnectTimeout()); client.setReceiveTimeout(clientBuilder.getReceiveTimeout()); return proxy; } | JAXWSEnvironment { public <T> T getClient(ClientBuilder<T> clientBuilder) { JaxWsProxyFactoryBean proxyFactory = new JaxWsProxyFactoryBean(); proxyFactory.setServiceClass(clientBuilder.getServiceClass()); proxyFactory.setAddress(clientBuilder.getAddress()); if (clientBuilder.getHandlers() != null) { for (Handler h : clientBuilder.getHandlers()) { proxyFactory.getHandlers().add(h); } } if (clientBuilder.getBindingId() != null) { proxyFactory.setBindingId(clientBuilder.getBindingId()); } if (clientBuilder.getCxfInInterceptors() != null) { proxyFactory.getInInterceptors().addAll(clientBuilder.getCxfInInterceptors()); } if (clientBuilder.getCxfInFaultInterceptors() != null) { proxyFactory.getInFaultInterceptors().addAll(clientBuilder.getCxfInFaultInterceptors()); } if (clientBuilder.getCxfOutInterceptors() != null) { proxyFactory.getOutInterceptors().addAll(clientBuilder.getCxfOutInterceptors()); } if (clientBuilder.getCxfOutFaultInterceptors() != null) { proxyFactory.getOutFaultInterceptors().addAll(clientBuilder.getCxfOutFaultInterceptors()); } T proxy = clientBuilder.getServiceClass().cast(proxyFactory.create()); if (clientBuilder.isMtomEnabled()) { BindingProvider bp = (BindingProvider)proxy; SOAPBinding binding = (SOAPBinding)bp.getBinding(); binding.setMTOMEnabled(true); } HTTPConduit http = (HTTPConduit)ClientProxy.getClient(proxy).getConduit(); HTTPClientPolicy client = http.getClient(); client.setConnectionTimeout(clientBuilder.getConnectTimeout()); client.setReceiveTimeout(clientBuilder.getReceiveTimeout()); return proxy; } } | JAXWSEnvironment { public <T> T getClient(ClientBuilder<T> clientBuilder) { JaxWsProxyFactoryBean proxyFactory = new JaxWsProxyFactoryBean(); proxyFactory.setServiceClass(clientBuilder.getServiceClass()); proxyFactory.setAddress(clientBuilder.getAddress()); if (clientBuilder.getHandlers() != null) { for (Handler h : clientBuilder.getHandlers()) { proxyFactory.getHandlers().add(h); } } if (clientBuilder.getBindingId() != null) { proxyFactory.setBindingId(clientBuilder.getBindingId()); } if (clientBuilder.getCxfInInterceptors() != null) { proxyFactory.getInInterceptors().addAll(clientBuilder.getCxfInInterceptors()); } if (clientBuilder.getCxfInFaultInterceptors() != null) { proxyFactory.getInFaultInterceptors().addAll(clientBuilder.getCxfInFaultInterceptors()); } if (clientBuilder.getCxfOutInterceptors() != null) { proxyFactory.getOutInterceptors().addAll(clientBuilder.getCxfOutInterceptors()); } if (clientBuilder.getCxfOutFaultInterceptors() != null) { proxyFactory.getOutFaultInterceptors().addAll(clientBuilder.getCxfOutFaultInterceptors()); } T proxy = clientBuilder.getServiceClass().cast(proxyFactory.create()); if (clientBuilder.isMtomEnabled()) { BindingProvider bp = (BindingProvider)proxy; SOAPBinding binding = (SOAPBinding)bp.getBinding(); binding.setMTOMEnabled(true); } HTTPConduit http = (HTTPConduit)ClientProxy.getClient(proxy).getConduit(); HTTPClientPolicy client = http.getClient(); client.setConnectionTimeout(clientBuilder.getConnectTimeout()); client.setReceiveTimeout(clientBuilder.getReceiveTimeout()); return proxy; } JAXWSEnvironment(String defaultPath); } | JAXWSEnvironment { public <T> T getClient(ClientBuilder<T> clientBuilder) { JaxWsProxyFactoryBean proxyFactory = new JaxWsProxyFactoryBean(); proxyFactory.setServiceClass(clientBuilder.getServiceClass()); proxyFactory.setAddress(clientBuilder.getAddress()); if (clientBuilder.getHandlers() != null) { for (Handler h : clientBuilder.getHandlers()) { proxyFactory.getHandlers().add(h); } } if (clientBuilder.getBindingId() != null) { proxyFactory.setBindingId(clientBuilder.getBindingId()); } if (clientBuilder.getCxfInInterceptors() != null) { proxyFactory.getInInterceptors().addAll(clientBuilder.getCxfInInterceptors()); } if (clientBuilder.getCxfInFaultInterceptors() != null) { proxyFactory.getInFaultInterceptors().addAll(clientBuilder.getCxfInFaultInterceptors()); } if (clientBuilder.getCxfOutInterceptors() != null) { proxyFactory.getOutInterceptors().addAll(clientBuilder.getCxfOutInterceptors()); } if (clientBuilder.getCxfOutFaultInterceptors() != null) { proxyFactory.getOutFaultInterceptors().addAll(clientBuilder.getCxfOutFaultInterceptors()); } T proxy = clientBuilder.getServiceClass().cast(proxyFactory.create()); if (clientBuilder.isMtomEnabled()) { BindingProvider bp = (BindingProvider)proxy; SOAPBinding binding = (SOAPBinding)bp.getBinding(); binding.setMTOMEnabled(true); } HTTPConduit http = (HTTPConduit)ClientProxy.getClient(proxy).getConduit(); HTTPClientPolicy client = http.getClient(); client.setConnectionTimeout(clientBuilder.getConnectTimeout()); client.setReceiveTimeout(clientBuilder.getReceiveTimeout()); return proxy; } JAXWSEnvironment(String defaultPath); String getDefaultPath(); HttpServlet buildServlet(); void setPublishedEndpointUrlPrefix(String publishedEndpointUrlPrefix); void setInstrumentedInvokerBuilder(InstrumentedInvokerFactory instrumentedInvokerBuilder); void setUnitOfWorkInvokerBuilder(UnitOfWorkInvokerFactory unitOfWorkInvokerBuilder); void logEndpoints(); Endpoint publishEndpoint(EndpointBuilder endpointBuilder); T getClient(ClientBuilder<T> clientBuilder); } | JAXWSEnvironment { public <T> T getClient(ClientBuilder<T> clientBuilder) { JaxWsProxyFactoryBean proxyFactory = new JaxWsProxyFactoryBean(); proxyFactory.setServiceClass(clientBuilder.getServiceClass()); proxyFactory.setAddress(clientBuilder.getAddress()); if (clientBuilder.getHandlers() != null) { for (Handler h : clientBuilder.getHandlers()) { proxyFactory.getHandlers().add(h); } } if (clientBuilder.getBindingId() != null) { proxyFactory.setBindingId(clientBuilder.getBindingId()); } if (clientBuilder.getCxfInInterceptors() != null) { proxyFactory.getInInterceptors().addAll(clientBuilder.getCxfInInterceptors()); } if (clientBuilder.getCxfInFaultInterceptors() != null) { proxyFactory.getInFaultInterceptors().addAll(clientBuilder.getCxfInFaultInterceptors()); } if (clientBuilder.getCxfOutInterceptors() != null) { proxyFactory.getOutInterceptors().addAll(clientBuilder.getCxfOutInterceptors()); } if (clientBuilder.getCxfOutFaultInterceptors() != null) { proxyFactory.getOutFaultInterceptors().addAll(clientBuilder.getCxfOutFaultInterceptors()); } T proxy = clientBuilder.getServiceClass().cast(proxyFactory.create()); if (clientBuilder.isMtomEnabled()) { BindingProvider bp = (BindingProvider)proxy; SOAPBinding binding = (SOAPBinding)bp.getBinding(); binding.setMTOMEnabled(true); } HTTPConduit http = (HTTPConduit)ClientProxy.getClient(proxy).getConduit(); HTTPClientPolicy client = http.getClient(); client.setConnectionTimeout(clientBuilder.getConnectTimeout()); client.setReceiveTimeout(clientBuilder.getReceiveTimeout()); return proxy; } JAXWSEnvironment(String defaultPath); String getDefaultPath(); HttpServlet buildServlet(); void setPublishedEndpointUrlPrefix(String publishedEndpointUrlPrefix); void setInstrumentedInvokerBuilder(InstrumentedInvokerFactory instrumentedInvokerBuilder); void setUnitOfWorkInvokerBuilder(UnitOfWorkInvokerFactory unitOfWorkInvokerBuilder); void logEndpoints(); Endpoint publishEndpoint(EndpointBuilder endpointBuilder); T getClient(ClientBuilder<T> clientBuilder); } |
@Test public void invokeWithoutParams() { setTargetMethod(exchange, "noParams"); invoker.invoke(exchange, null); verify(underlying).invoke(exchange, null); } | @Override public Object invoke(Exchange exchange, Object o) { Annotation[][] parameterAnnotations = this.getTargetMethod(exchange).getParameterAnnotations(); List<Object> params = null; if (o instanceof List) { params = CastUtils.cast((List<?>) o); } else if (o != null) { params = new MessageContentsList(o); } if (params != null) { int i = 0; try { for (Object parameter : params) { if(parameter == null || !AsyncHandler.class.isAssignableFrom(parameter.getClass())) { validate(parameterAnnotations[i++], parameter); } } } catch (ValidationException ve) { exchange.getInMessage().put(FaultMode.class, FaultMode.CHECKED_APPLICATION_FAULT); throw ve; } } return underlying.invoke(exchange, o); } | ValidatingInvoker extends AbstractInvoker { @Override public Object invoke(Exchange exchange, Object o) { Annotation[][] parameterAnnotations = this.getTargetMethod(exchange).getParameterAnnotations(); List<Object> params = null; if (o instanceof List) { params = CastUtils.cast((List<?>) o); } else if (o != null) { params = new MessageContentsList(o); } if (params != null) { int i = 0; try { for (Object parameter : params) { if(parameter == null || !AsyncHandler.class.isAssignableFrom(parameter.getClass())) { validate(parameterAnnotations[i++], parameter); } } } catch (ValidationException ve) { exchange.getInMessage().put(FaultMode.class, FaultMode.CHECKED_APPLICATION_FAULT); throw ve; } } return underlying.invoke(exchange, o); } } | ValidatingInvoker extends AbstractInvoker { @Override public Object invoke(Exchange exchange, Object o) { Annotation[][] parameterAnnotations = this.getTargetMethod(exchange).getParameterAnnotations(); List<Object> params = null; if (o instanceof List) { params = CastUtils.cast((List<?>) o); } else if (o != null) { params = new MessageContentsList(o); } if (params != null) { int i = 0; try { for (Object parameter : params) { if(parameter == null || !AsyncHandler.class.isAssignableFrom(parameter.getClass())) { validate(parameterAnnotations[i++], parameter); } } } catch (ValidationException ve) { exchange.getInMessage().put(FaultMode.class, FaultMode.CHECKED_APPLICATION_FAULT); throw ve; } } return underlying.invoke(exchange, o); } ValidatingInvoker(Invoker underlying, Validator validator); } | ValidatingInvoker extends AbstractInvoker { @Override public Object invoke(Exchange exchange, Object o) { Annotation[][] parameterAnnotations = this.getTargetMethod(exchange).getParameterAnnotations(); List<Object> params = null; if (o instanceof List) { params = CastUtils.cast((List<?>) o); } else if (o != null) { params = new MessageContentsList(o); } if (params != null) { int i = 0; try { for (Object parameter : params) { if(parameter == null || !AsyncHandler.class.isAssignableFrom(parameter.getClass())) { validate(parameterAnnotations[i++], parameter); } } } catch (ValidationException ve) { exchange.getInMessage().put(FaultMode.class, FaultMode.CHECKED_APPLICATION_FAULT); throw ve; } } return underlying.invoke(exchange, o); } ValidatingInvoker(Invoker underlying, Validator validator); @Override Object invoke(Exchange exchange, Object o); } | ValidatingInvoker extends AbstractInvoker { @Override public Object invoke(Exchange exchange, Object o) { Annotation[][] parameterAnnotations = this.getTargetMethod(exchange).getParameterAnnotations(); List<Object> params = null; if (o instanceof List) { params = CastUtils.cast((List<?>) o); } else if (o != null) { params = new MessageContentsList(o); } if (params != null) { int i = 0; try { for (Object parameter : params) { if(parameter == null || !AsyncHandler.class.isAssignableFrom(parameter.getClass())) { validate(parameterAnnotations[i++], parameter); } } } catch (ValidationException ve) { exchange.getInMessage().put(FaultMode.class, FaultMode.CHECKED_APPLICATION_FAULT); throw ve; } } return underlying.invoke(exchange, o); } ValidatingInvoker(Invoker underlying, Validator validator); @Override Object invoke(Exchange exchange, Object o); } |
@Test public void invokeWithoutValidation() { setTargetMethod(exchange, "noValidation", RootParam1.class, RootParam2.class); List<Object> params = Arrays.asList(null, null); invoker.invoke(exchange, params); verify(underlying).invoke(exchange, params); params = Arrays.asList(new RootParam1(null), new RootParam2(null)); invoker.invoke(exchange, params); verify(underlying).invoke(exchange, params); } | @Override public Object invoke(Exchange exchange, Object o) { Annotation[][] parameterAnnotations = this.getTargetMethod(exchange).getParameterAnnotations(); List<Object> params = null; if (o instanceof List) { params = CastUtils.cast((List<?>) o); } else if (o != null) { params = new MessageContentsList(o); } if (params != null) { int i = 0; try { for (Object parameter : params) { if(parameter == null || !AsyncHandler.class.isAssignableFrom(parameter.getClass())) { validate(parameterAnnotations[i++], parameter); } } } catch (ValidationException ve) { exchange.getInMessage().put(FaultMode.class, FaultMode.CHECKED_APPLICATION_FAULT); throw ve; } } return underlying.invoke(exchange, o); } | ValidatingInvoker extends AbstractInvoker { @Override public Object invoke(Exchange exchange, Object o) { Annotation[][] parameterAnnotations = this.getTargetMethod(exchange).getParameterAnnotations(); List<Object> params = null; if (o instanceof List) { params = CastUtils.cast((List<?>) o); } else if (o != null) { params = new MessageContentsList(o); } if (params != null) { int i = 0; try { for (Object parameter : params) { if(parameter == null || !AsyncHandler.class.isAssignableFrom(parameter.getClass())) { validate(parameterAnnotations[i++], parameter); } } } catch (ValidationException ve) { exchange.getInMessage().put(FaultMode.class, FaultMode.CHECKED_APPLICATION_FAULT); throw ve; } } return underlying.invoke(exchange, o); } } | ValidatingInvoker extends AbstractInvoker { @Override public Object invoke(Exchange exchange, Object o) { Annotation[][] parameterAnnotations = this.getTargetMethod(exchange).getParameterAnnotations(); List<Object> params = null; if (o instanceof List) { params = CastUtils.cast((List<?>) o); } else if (o != null) { params = new MessageContentsList(o); } if (params != null) { int i = 0; try { for (Object parameter : params) { if(parameter == null || !AsyncHandler.class.isAssignableFrom(parameter.getClass())) { validate(parameterAnnotations[i++], parameter); } } } catch (ValidationException ve) { exchange.getInMessage().put(FaultMode.class, FaultMode.CHECKED_APPLICATION_FAULT); throw ve; } } return underlying.invoke(exchange, o); } ValidatingInvoker(Invoker underlying, Validator validator); } | ValidatingInvoker extends AbstractInvoker { @Override public Object invoke(Exchange exchange, Object o) { Annotation[][] parameterAnnotations = this.getTargetMethod(exchange).getParameterAnnotations(); List<Object> params = null; if (o instanceof List) { params = CastUtils.cast((List<?>) o); } else if (o != null) { params = new MessageContentsList(o); } if (params != null) { int i = 0; try { for (Object parameter : params) { if(parameter == null || !AsyncHandler.class.isAssignableFrom(parameter.getClass())) { validate(parameterAnnotations[i++], parameter); } } } catch (ValidationException ve) { exchange.getInMessage().put(FaultMode.class, FaultMode.CHECKED_APPLICATION_FAULT); throw ve; } } return underlying.invoke(exchange, o); } ValidatingInvoker(Invoker underlying, Validator validator); @Override Object invoke(Exchange exchange, Object o); } | ValidatingInvoker extends AbstractInvoker { @Override public Object invoke(Exchange exchange, Object o) { Annotation[][] parameterAnnotations = this.getTargetMethod(exchange).getParameterAnnotations(); List<Object> params = null; if (o instanceof List) { params = CastUtils.cast((List<?>) o); } else if (o != null) { params = new MessageContentsList(o); } if (params != null) { int i = 0; try { for (Object parameter : params) { if(parameter == null || !AsyncHandler.class.isAssignableFrom(parameter.getClass())) { validate(parameterAnnotations[i++], parameter); } } } catch (ValidationException ve) { exchange.getInMessage().put(FaultMode.class, FaultMode.CHECKED_APPLICATION_FAULT); throw ve; } } return underlying.invoke(exchange, o); } ValidatingInvoker(Invoker underlying, Validator validator); @Override Object invoke(Exchange exchange, Object o); } |
@Test public void invokeWithAsycHandler() { setTargetMethod(exchange, "asyncMethod", String.class); List<Object> params = Arrays.<Object>asList(null, new AsyncHandler(){ @Override public void handleResponse(Response res) { } }); invoker.invoke(exchange, params); verify(underlying).invoke(exchange, params); params = Arrays.asList("foo", new AsyncHandler(){ @Override public void handleResponse(Response res) { } }); invoker.invoke(exchange, params); verify(underlying).invoke(exchange, params); } | @Override public Object invoke(Exchange exchange, Object o) { Annotation[][] parameterAnnotations = this.getTargetMethod(exchange).getParameterAnnotations(); List<Object> params = null; if (o instanceof List) { params = CastUtils.cast((List<?>) o); } else if (o != null) { params = new MessageContentsList(o); } if (params != null) { int i = 0; try { for (Object parameter : params) { if(parameter == null || !AsyncHandler.class.isAssignableFrom(parameter.getClass())) { validate(parameterAnnotations[i++], parameter); } } } catch (ValidationException ve) { exchange.getInMessage().put(FaultMode.class, FaultMode.CHECKED_APPLICATION_FAULT); throw ve; } } return underlying.invoke(exchange, o); } | ValidatingInvoker extends AbstractInvoker { @Override public Object invoke(Exchange exchange, Object o) { Annotation[][] parameterAnnotations = this.getTargetMethod(exchange).getParameterAnnotations(); List<Object> params = null; if (o instanceof List) { params = CastUtils.cast((List<?>) o); } else if (o != null) { params = new MessageContentsList(o); } if (params != null) { int i = 0; try { for (Object parameter : params) { if(parameter == null || !AsyncHandler.class.isAssignableFrom(parameter.getClass())) { validate(parameterAnnotations[i++], parameter); } } } catch (ValidationException ve) { exchange.getInMessage().put(FaultMode.class, FaultMode.CHECKED_APPLICATION_FAULT); throw ve; } } return underlying.invoke(exchange, o); } } | ValidatingInvoker extends AbstractInvoker { @Override public Object invoke(Exchange exchange, Object o) { Annotation[][] parameterAnnotations = this.getTargetMethod(exchange).getParameterAnnotations(); List<Object> params = null; if (o instanceof List) { params = CastUtils.cast((List<?>) o); } else if (o != null) { params = new MessageContentsList(o); } if (params != null) { int i = 0; try { for (Object parameter : params) { if(parameter == null || !AsyncHandler.class.isAssignableFrom(parameter.getClass())) { validate(parameterAnnotations[i++], parameter); } } } catch (ValidationException ve) { exchange.getInMessage().put(FaultMode.class, FaultMode.CHECKED_APPLICATION_FAULT); throw ve; } } return underlying.invoke(exchange, o); } ValidatingInvoker(Invoker underlying, Validator validator); } | ValidatingInvoker extends AbstractInvoker { @Override public Object invoke(Exchange exchange, Object o) { Annotation[][] parameterAnnotations = this.getTargetMethod(exchange).getParameterAnnotations(); List<Object> params = null; if (o instanceof List) { params = CastUtils.cast((List<?>) o); } else if (o != null) { params = new MessageContentsList(o); } if (params != null) { int i = 0; try { for (Object parameter : params) { if(parameter == null || !AsyncHandler.class.isAssignableFrom(parameter.getClass())) { validate(parameterAnnotations[i++], parameter); } } } catch (ValidationException ve) { exchange.getInMessage().put(FaultMode.class, FaultMode.CHECKED_APPLICATION_FAULT); throw ve; } } return underlying.invoke(exchange, o); } ValidatingInvoker(Invoker underlying, Validator validator); @Override Object invoke(Exchange exchange, Object o); } | ValidatingInvoker extends AbstractInvoker { @Override public Object invoke(Exchange exchange, Object o) { Annotation[][] parameterAnnotations = this.getTargetMethod(exchange).getParameterAnnotations(); List<Object> params = null; if (o instanceof List) { params = CastUtils.cast((List<?>) o); } else if (o != null) { params = new MessageContentsList(o); } if (params != null) { int i = 0; try { for (Object parameter : params) { if(parameter == null || !AsyncHandler.class.isAssignableFrom(parameter.getClass())) { validate(parameterAnnotations[i++], parameter); } } } catch (ValidationException ve) { exchange.getInMessage().put(FaultMode.class, FaultMode.CHECKED_APPLICATION_FAULT); throw ve; } } return underlying.invoke(exchange, o); } ValidatingInvoker(Invoker underlying, Validator validator); @Override Object invoke(Exchange exchange, Object o); } |
@Test public void invokeWithValidation() { setTargetMethod(exchange, "withValidation", RootParam1.class, RootParam2.class); List<Object> params = Arrays.asList(new RootParam1(new ChildParam("")), new RootParam2("ok")); try { invoker.invoke(exchange, params); fail(); } catch(Exception e) { assertThat(e, is(instanceOf(ValidationException.class))); } params = Arrays.asList(new RootParam1(new ChildParam("")), new RootParam2("ok")); try { invoker.invoke(exchange, params); fail(); } catch(Exception e) { assertThat(e, is(instanceOf(ValidationException.class))); } params = Arrays.asList(new RootParam1(new ChildParam("John")), new RootParam2("ok")); try { invoker.invoke(exchange, params); fail(); } catch(Exception e) { assertThat(e, is(instanceOf(ValidationException.class))); } verifyNoMoreInteractions(underlying); params = Arrays.asList(new RootParam1(new ChildParam("ok")), new RootParam2("ok")); invoker.invoke(exchange, params); verify(underlying).invoke(exchange, params); } | @Override public Object invoke(Exchange exchange, Object o) { Annotation[][] parameterAnnotations = this.getTargetMethod(exchange).getParameterAnnotations(); List<Object> params = null; if (o instanceof List) { params = CastUtils.cast((List<?>) o); } else if (o != null) { params = new MessageContentsList(o); } if (params != null) { int i = 0; try { for (Object parameter : params) { if(parameter == null || !AsyncHandler.class.isAssignableFrom(parameter.getClass())) { validate(parameterAnnotations[i++], parameter); } } } catch (ValidationException ve) { exchange.getInMessage().put(FaultMode.class, FaultMode.CHECKED_APPLICATION_FAULT); throw ve; } } return underlying.invoke(exchange, o); } | ValidatingInvoker extends AbstractInvoker { @Override public Object invoke(Exchange exchange, Object o) { Annotation[][] parameterAnnotations = this.getTargetMethod(exchange).getParameterAnnotations(); List<Object> params = null; if (o instanceof List) { params = CastUtils.cast((List<?>) o); } else if (o != null) { params = new MessageContentsList(o); } if (params != null) { int i = 0; try { for (Object parameter : params) { if(parameter == null || !AsyncHandler.class.isAssignableFrom(parameter.getClass())) { validate(parameterAnnotations[i++], parameter); } } } catch (ValidationException ve) { exchange.getInMessage().put(FaultMode.class, FaultMode.CHECKED_APPLICATION_FAULT); throw ve; } } return underlying.invoke(exchange, o); } } | ValidatingInvoker extends AbstractInvoker { @Override public Object invoke(Exchange exchange, Object o) { Annotation[][] parameterAnnotations = this.getTargetMethod(exchange).getParameterAnnotations(); List<Object> params = null; if (o instanceof List) { params = CastUtils.cast((List<?>) o); } else if (o != null) { params = new MessageContentsList(o); } if (params != null) { int i = 0; try { for (Object parameter : params) { if(parameter == null || !AsyncHandler.class.isAssignableFrom(parameter.getClass())) { validate(parameterAnnotations[i++], parameter); } } } catch (ValidationException ve) { exchange.getInMessage().put(FaultMode.class, FaultMode.CHECKED_APPLICATION_FAULT); throw ve; } } return underlying.invoke(exchange, o); } ValidatingInvoker(Invoker underlying, Validator validator); } | ValidatingInvoker extends AbstractInvoker { @Override public Object invoke(Exchange exchange, Object o) { Annotation[][] parameterAnnotations = this.getTargetMethod(exchange).getParameterAnnotations(); List<Object> params = null; if (o instanceof List) { params = CastUtils.cast((List<?>) o); } else if (o != null) { params = new MessageContentsList(o); } if (params != null) { int i = 0; try { for (Object parameter : params) { if(parameter == null || !AsyncHandler.class.isAssignableFrom(parameter.getClass())) { validate(parameterAnnotations[i++], parameter); } } } catch (ValidationException ve) { exchange.getInMessage().put(FaultMode.class, FaultMode.CHECKED_APPLICATION_FAULT); throw ve; } } return underlying.invoke(exchange, o); } ValidatingInvoker(Invoker underlying, Validator validator); @Override Object invoke(Exchange exchange, Object o); } | ValidatingInvoker extends AbstractInvoker { @Override public Object invoke(Exchange exchange, Object o) { Annotation[][] parameterAnnotations = this.getTargetMethod(exchange).getParameterAnnotations(); List<Object> params = null; if (o instanceof List) { params = CastUtils.cast((List<?>) o); } else if (o != null) { params = new MessageContentsList(o); } if (params != null) { int i = 0; try { for (Object parameter : params) { if(parameter == null || !AsyncHandler.class.isAssignableFrom(parameter.getClass())) { validate(parameterAnnotations[i++], parameter); } } } catch (ValidationException ve) { exchange.getInMessage().put(FaultMode.class, FaultMode.CHECKED_APPLICATION_FAULT); throw ve; } } return underlying.invoke(exchange, o); } ValidatingInvoker(Invoker underlying, Validator validator); @Override Object invoke(Exchange exchange, Object o); } |
@Test public void noAnnotation() { Timer timer = testMetricRegistry.timer("timed"); Meter meter = testMetricRegistry.meter("metered"); when(mockMetricRegistry.timer(anyString())).thenReturn(timer); when(mockMetricRegistry.meter(anyString())).thenReturn(meter); long oldtimervalue = timer.getCount(); long oldmetervalue = meter.getCount(); Invoker invoker = invokerBuilder.create(instrumentedService, new FooInvoker()); this.setTargetMethod(exchange, "foo"); Object result = invoker.invoke(exchange, null); assertEquals("fooReturn", result); assertThat(timer.getCount(), is(oldtimervalue)); assertThat(meter.getCount(), is(oldmetervalue)); } | public Invoker create(Object service, Invoker rootInvoker) { List<Method> timedmethods = new ArrayList<>(); List<Method> meteredmethods = new ArrayList<>(); List<Method> exceptionmeteredmethods = new ArrayList<>(); for (Method m : service.getClass().getMethods()) { if (m.isAnnotationPresent(Timed.class)) { timedmethods.add(m); } if (m.isAnnotationPresent(Metered.class)) { meteredmethods.add(m); } if (m.isAnnotationPresent(ExceptionMetered.class)) { exceptionmeteredmethods.add(m); } } Invoker invoker = rootInvoker; if (timedmethods.size() > 0) { invoker = this.timed(invoker, timedmethods); } if (meteredmethods.size() > 0) { invoker = this.metered(invoker, meteredmethods); } if (exceptionmeteredmethods.size() > 0) { invoker = this.exceptionMetered(invoker, exceptionmeteredmethods); } return invoker; } | InstrumentedInvokerFactory { public Invoker create(Object service, Invoker rootInvoker) { List<Method> timedmethods = new ArrayList<>(); List<Method> meteredmethods = new ArrayList<>(); List<Method> exceptionmeteredmethods = new ArrayList<>(); for (Method m : service.getClass().getMethods()) { if (m.isAnnotationPresent(Timed.class)) { timedmethods.add(m); } if (m.isAnnotationPresent(Metered.class)) { meteredmethods.add(m); } if (m.isAnnotationPresent(ExceptionMetered.class)) { exceptionmeteredmethods.add(m); } } Invoker invoker = rootInvoker; if (timedmethods.size() > 0) { invoker = this.timed(invoker, timedmethods); } if (meteredmethods.size() > 0) { invoker = this.metered(invoker, meteredmethods); } if (exceptionmeteredmethods.size() > 0) { invoker = this.exceptionMetered(invoker, exceptionmeteredmethods); } return invoker; } } | InstrumentedInvokerFactory { public Invoker create(Object service, Invoker rootInvoker) { List<Method> timedmethods = new ArrayList<>(); List<Method> meteredmethods = new ArrayList<>(); List<Method> exceptionmeteredmethods = new ArrayList<>(); for (Method m : service.getClass().getMethods()) { if (m.isAnnotationPresent(Timed.class)) { timedmethods.add(m); } if (m.isAnnotationPresent(Metered.class)) { meteredmethods.add(m); } if (m.isAnnotationPresent(ExceptionMetered.class)) { exceptionmeteredmethods.add(m); } } Invoker invoker = rootInvoker; if (timedmethods.size() > 0) { invoker = this.timed(invoker, timedmethods); } if (meteredmethods.size() > 0) { invoker = this.metered(invoker, meteredmethods); } if (exceptionmeteredmethods.size() > 0) { invoker = this.exceptionMetered(invoker, exceptionmeteredmethods); } return invoker; } InstrumentedInvokerFactory(MetricRegistry metricRegistry); } | InstrumentedInvokerFactory { public Invoker create(Object service, Invoker rootInvoker) { List<Method> timedmethods = new ArrayList<>(); List<Method> meteredmethods = new ArrayList<>(); List<Method> exceptionmeteredmethods = new ArrayList<>(); for (Method m : service.getClass().getMethods()) { if (m.isAnnotationPresent(Timed.class)) { timedmethods.add(m); } if (m.isAnnotationPresent(Metered.class)) { meteredmethods.add(m); } if (m.isAnnotationPresent(ExceptionMetered.class)) { exceptionmeteredmethods.add(m); } } Invoker invoker = rootInvoker; if (timedmethods.size() > 0) { invoker = this.timed(invoker, timedmethods); } if (meteredmethods.size() > 0) { invoker = this.metered(invoker, meteredmethods); } if (exceptionmeteredmethods.size() > 0) { invoker = this.exceptionMetered(invoker, exceptionmeteredmethods); } return invoker; } InstrumentedInvokerFactory(MetricRegistry metricRegistry); Invoker create(Object service, Invoker rootInvoker); } | InstrumentedInvokerFactory { public Invoker create(Object service, Invoker rootInvoker) { List<Method> timedmethods = new ArrayList<>(); List<Method> meteredmethods = new ArrayList<>(); List<Method> exceptionmeteredmethods = new ArrayList<>(); for (Method m : service.getClass().getMethods()) { if (m.isAnnotationPresent(Timed.class)) { timedmethods.add(m); } if (m.isAnnotationPresent(Metered.class)) { meteredmethods.add(m); } if (m.isAnnotationPresent(ExceptionMetered.class)) { exceptionmeteredmethods.add(m); } } Invoker invoker = rootInvoker; if (timedmethods.size() > 0) { invoker = this.timed(invoker, timedmethods); } if (meteredmethods.size() > 0) { invoker = this.metered(invoker, meteredmethods); } if (exceptionmeteredmethods.size() > 0) { invoker = this.exceptionMetered(invoker, exceptionmeteredmethods); } return invoker; } InstrumentedInvokerFactory(MetricRegistry metricRegistry); Invoker create(Object service, Invoker rootInvoker); } |
@Test public void meteredAnnotation() { Timer timer = testMetricRegistry.timer("timed"); Meter meter = testMetricRegistry.meter("metered"); when(mockMetricRegistry.timer(anyString())).thenReturn(timer); when(mockMetricRegistry.meter(anyString())).thenReturn(meter); long oldtimervalue = timer.getCount(); long oldmetervalue = meter.getCount(); Invoker invoker = invokerBuilder.create(instrumentedService, new MeteredInvoker()); this.setTargetMethod(exchange, "metered"); Object result = invoker.invoke(exchange, null); assertEquals("meteredReturn", result); assertThat(timer.getCount(), is(oldtimervalue)); assertThat(meter.getCount(), is(1 + oldmetervalue)); } | public Invoker create(Object service, Invoker rootInvoker) { List<Method> timedmethods = new ArrayList<>(); List<Method> meteredmethods = new ArrayList<>(); List<Method> exceptionmeteredmethods = new ArrayList<>(); for (Method m : service.getClass().getMethods()) { if (m.isAnnotationPresent(Timed.class)) { timedmethods.add(m); } if (m.isAnnotationPresent(Metered.class)) { meteredmethods.add(m); } if (m.isAnnotationPresent(ExceptionMetered.class)) { exceptionmeteredmethods.add(m); } } Invoker invoker = rootInvoker; if (timedmethods.size() > 0) { invoker = this.timed(invoker, timedmethods); } if (meteredmethods.size() > 0) { invoker = this.metered(invoker, meteredmethods); } if (exceptionmeteredmethods.size() > 0) { invoker = this.exceptionMetered(invoker, exceptionmeteredmethods); } return invoker; } | InstrumentedInvokerFactory { public Invoker create(Object service, Invoker rootInvoker) { List<Method> timedmethods = new ArrayList<>(); List<Method> meteredmethods = new ArrayList<>(); List<Method> exceptionmeteredmethods = new ArrayList<>(); for (Method m : service.getClass().getMethods()) { if (m.isAnnotationPresent(Timed.class)) { timedmethods.add(m); } if (m.isAnnotationPresent(Metered.class)) { meteredmethods.add(m); } if (m.isAnnotationPresent(ExceptionMetered.class)) { exceptionmeteredmethods.add(m); } } Invoker invoker = rootInvoker; if (timedmethods.size() > 0) { invoker = this.timed(invoker, timedmethods); } if (meteredmethods.size() > 0) { invoker = this.metered(invoker, meteredmethods); } if (exceptionmeteredmethods.size() > 0) { invoker = this.exceptionMetered(invoker, exceptionmeteredmethods); } return invoker; } } | InstrumentedInvokerFactory { public Invoker create(Object service, Invoker rootInvoker) { List<Method> timedmethods = new ArrayList<>(); List<Method> meteredmethods = new ArrayList<>(); List<Method> exceptionmeteredmethods = new ArrayList<>(); for (Method m : service.getClass().getMethods()) { if (m.isAnnotationPresent(Timed.class)) { timedmethods.add(m); } if (m.isAnnotationPresent(Metered.class)) { meteredmethods.add(m); } if (m.isAnnotationPresent(ExceptionMetered.class)) { exceptionmeteredmethods.add(m); } } Invoker invoker = rootInvoker; if (timedmethods.size() > 0) { invoker = this.timed(invoker, timedmethods); } if (meteredmethods.size() > 0) { invoker = this.metered(invoker, meteredmethods); } if (exceptionmeteredmethods.size() > 0) { invoker = this.exceptionMetered(invoker, exceptionmeteredmethods); } return invoker; } InstrumentedInvokerFactory(MetricRegistry metricRegistry); } | InstrumentedInvokerFactory { public Invoker create(Object service, Invoker rootInvoker) { List<Method> timedmethods = new ArrayList<>(); List<Method> meteredmethods = new ArrayList<>(); List<Method> exceptionmeteredmethods = new ArrayList<>(); for (Method m : service.getClass().getMethods()) { if (m.isAnnotationPresent(Timed.class)) { timedmethods.add(m); } if (m.isAnnotationPresent(Metered.class)) { meteredmethods.add(m); } if (m.isAnnotationPresent(ExceptionMetered.class)) { exceptionmeteredmethods.add(m); } } Invoker invoker = rootInvoker; if (timedmethods.size() > 0) { invoker = this.timed(invoker, timedmethods); } if (meteredmethods.size() > 0) { invoker = this.metered(invoker, meteredmethods); } if (exceptionmeteredmethods.size() > 0) { invoker = this.exceptionMetered(invoker, exceptionmeteredmethods); } return invoker; } InstrumentedInvokerFactory(MetricRegistry metricRegistry); Invoker create(Object service, Invoker rootInvoker); } | InstrumentedInvokerFactory { public Invoker create(Object service, Invoker rootInvoker) { List<Method> timedmethods = new ArrayList<>(); List<Method> meteredmethods = new ArrayList<>(); List<Method> exceptionmeteredmethods = new ArrayList<>(); for (Method m : service.getClass().getMethods()) { if (m.isAnnotationPresent(Timed.class)) { timedmethods.add(m); } if (m.isAnnotationPresent(Metered.class)) { meteredmethods.add(m); } if (m.isAnnotationPresent(ExceptionMetered.class)) { exceptionmeteredmethods.add(m); } } Invoker invoker = rootInvoker; if (timedmethods.size() > 0) { invoker = this.timed(invoker, timedmethods); } if (meteredmethods.size() > 0) { invoker = this.metered(invoker, meteredmethods); } if (exceptionmeteredmethods.size() > 0) { invoker = this.exceptionMetered(invoker, exceptionmeteredmethods); } return invoker; } InstrumentedInvokerFactory(MetricRegistry metricRegistry); Invoker create(Object service, Invoker rootInvoker); } |
@Test public void timedAnnotation() { Timer timer = testMetricRegistry.timer("timed"); Meter meter = testMetricRegistry.meter("metered"); when(mockMetricRegistry.timer(anyString())).thenReturn(timer); when(mockMetricRegistry.meter(anyString())).thenReturn(meter); long oldtimervalue = timer.getCount(); long oldmetervalue = meter.getCount(); Invoker invoker = invokerBuilder.create(instrumentedService, new TimedInvoker()); this.setTargetMethod(exchange, "timed"); Object result = invoker.invoke(exchange, null); assertEquals("timedReturn", result); assertThat(timer.getCount(), is(1 + oldtimervalue)); assertThat(meter.getCount(), is(oldmetervalue)); } | public Invoker create(Object service, Invoker rootInvoker) { List<Method> timedmethods = new ArrayList<>(); List<Method> meteredmethods = new ArrayList<>(); List<Method> exceptionmeteredmethods = new ArrayList<>(); for (Method m : service.getClass().getMethods()) { if (m.isAnnotationPresent(Timed.class)) { timedmethods.add(m); } if (m.isAnnotationPresent(Metered.class)) { meteredmethods.add(m); } if (m.isAnnotationPresent(ExceptionMetered.class)) { exceptionmeteredmethods.add(m); } } Invoker invoker = rootInvoker; if (timedmethods.size() > 0) { invoker = this.timed(invoker, timedmethods); } if (meteredmethods.size() > 0) { invoker = this.metered(invoker, meteredmethods); } if (exceptionmeteredmethods.size() > 0) { invoker = this.exceptionMetered(invoker, exceptionmeteredmethods); } return invoker; } | InstrumentedInvokerFactory { public Invoker create(Object service, Invoker rootInvoker) { List<Method> timedmethods = new ArrayList<>(); List<Method> meteredmethods = new ArrayList<>(); List<Method> exceptionmeteredmethods = new ArrayList<>(); for (Method m : service.getClass().getMethods()) { if (m.isAnnotationPresent(Timed.class)) { timedmethods.add(m); } if (m.isAnnotationPresent(Metered.class)) { meteredmethods.add(m); } if (m.isAnnotationPresent(ExceptionMetered.class)) { exceptionmeteredmethods.add(m); } } Invoker invoker = rootInvoker; if (timedmethods.size() > 0) { invoker = this.timed(invoker, timedmethods); } if (meteredmethods.size() > 0) { invoker = this.metered(invoker, meteredmethods); } if (exceptionmeteredmethods.size() > 0) { invoker = this.exceptionMetered(invoker, exceptionmeteredmethods); } return invoker; } } | InstrumentedInvokerFactory { public Invoker create(Object service, Invoker rootInvoker) { List<Method> timedmethods = new ArrayList<>(); List<Method> meteredmethods = new ArrayList<>(); List<Method> exceptionmeteredmethods = new ArrayList<>(); for (Method m : service.getClass().getMethods()) { if (m.isAnnotationPresent(Timed.class)) { timedmethods.add(m); } if (m.isAnnotationPresent(Metered.class)) { meteredmethods.add(m); } if (m.isAnnotationPresent(ExceptionMetered.class)) { exceptionmeteredmethods.add(m); } } Invoker invoker = rootInvoker; if (timedmethods.size() > 0) { invoker = this.timed(invoker, timedmethods); } if (meteredmethods.size() > 0) { invoker = this.metered(invoker, meteredmethods); } if (exceptionmeteredmethods.size() > 0) { invoker = this.exceptionMetered(invoker, exceptionmeteredmethods); } return invoker; } InstrumentedInvokerFactory(MetricRegistry metricRegistry); } | InstrumentedInvokerFactory { public Invoker create(Object service, Invoker rootInvoker) { List<Method> timedmethods = new ArrayList<>(); List<Method> meteredmethods = new ArrayList<>(); List<Method> exceptionmeteredmethods = new ArrayList<>(); for (Method m : service.getClass().getMethods()) { if (m.isAnnotationPresent(Timed.class)) { timedmethods.add(m); } if (m.isAnnotationPresent(Metered.class)) { meteredmethods.add(m); } if (m.isAnnotationPresent(ExceptionMetered.class)) { exceptionmeteredmethods.add(m); } } Invoker invoker = rootInvoker; if (timedmethods.size() > 0) { invoker = this.timed(invoker, timedmethods); } if (meteredmethods.size() > 0) { invoker = this.metered(invoker, meteredmethods); } if (exceptionmeteredmethods.size() > 0) { invoker = this.exceptionMetered(invoker, exceptionmeteredmethods); } return invoker; } InstrumentedInvokerFactory(MetricRegistry metricRegistry); Invoker create(Object service, Invoker rootInvoker); } | InstrumentedInvokerFactory { public Invoker create(Object service, Invoker rootInvoker) { List<Method> timedmethods = new ArrayList<>(); List<Method> meteredmethods = new ArrayList<>(); List<Method> exceptionmeteredmethods = new ArrayList<>(); for (Method m : service.getClass().getMethods()) { if (m.isAnnotationPresent(Timed.class)) { timedmethods.add(m); } if (m.isAnnotationPresent(Metered.class)) { meteredmethods.add(m); } if (m.isAnnotationPresent(ExceptionMetered.class)) { exceptionmeteredmethods.add(m); } } Invoker invoker = rootInvoker; if (timedmethods.size() > 0) { invoker = this.timed(invoker, timedmethods); } if (meteredmethods.size() > 0) { invoker = this.metered(invoker, meteredmethods); } if (exceptionmeteredmethods.size() > 0) { invoker = this.exceptionMetered(invoker, exceptionmeteredmethods); } return invoker; } InstrumentedInvokerFactory(MetricRegistry metricRegistry); Invoker create(Object service, Invoker rootInvoker); } |
@Test public void unitOfWorkAnnotation() { Invoker invoker = invokerBuilder.create(fooService, new UnitOfWorkInvoker(false), sessionFactory); this.setTargetMethod(exchange, "unitOfWork", boolean.class); Object result = invoker.invoke(exchange, null); assertEquals("unitOfWork return", result); verify(session, times(1)).beginTransaction(); verify(transaction, times(1)).commit(); verify(transaction, times(0)).rollback(); verify(session, times(1)).close(); } | public Invoker create(Object service, Invoker rootInvoker, SessionFactory sessionFactory) { ImmutableMap.Builder<String, UnitOfWork> unitOfWorkMethodsBuilder = new ImmutableMap.Builder<>(); for (Method m : service.getClass().getMethods()) { if (m.isAnnotationPresent(UnitOfWork.class)) { unitOfWorkMethodsBuilder.put(m.getName(), m.getAnnotation(UnitOfWork.class)); } } ImmutableMap<String, UnitOfWork> unitOfWorkMethods = unitOfWorkMethodsBuilder.build(); Invoker invoker = rootInvoker; if (unitOfWorkMethods.size() > 0) { invoker = new UnitOfWorkInvoker(invoker, unitOfWorkMethods, sessionFactory); } return invoker; } | UnitOfWorkInvokerFactory { public Invoker create(Object service, Invoker rootInvoker, SessionFactory sessionFactory) { ImmutableMap.Builder<String, UnitOfWork> unitOfWorkMethodsBuilder = new ImmutableMap.Builder<>(); for (Method m : service.getClass().getMethods()) { if (m.isAnnotationPresent(UnitOfWork.class)) { unitOfWorkMethodsBuilder.put(m.getName(), m.getAnnotation(UnitOfWork.class)); } } ImmutableMap<String, UnitOfWork> unitOfWorkMethods = unitOfWorkMethodsBuilder.build(); Invoker invoker = rootInvoker; if (unitOfWorkMethods.size() > 0) { invoker = new UnitOfWorkInvoker(invoker, unitOfWorkMethods, sessionFactory); } return invoker; } } | UnitOfWorkInvokerFactory { public Invoker create(Object service, Invoker rootInvoker, SessionFactory sessionFactory) { ImmutableMap.Builder<String, UnitOfWork> unitOfWorkMethodsBuilder = new ImmutableMap.Builder<>(); for (Method m : service.getClass().getMethods()) { if (m.isAnnotationPresent(UnitOfWork.class)) { unitOfWorkMethodsBuilder.put(m.getName(), m.getAnnotation(UnitOfWork.class)); } } ImmutableMap<String, UnitOfWork> unitOfWorkMethods = unitOfWorkMethodsBuilder.build(); Invoker invoker = rootInvoker; if (unitOfWorkMethods.size() > 0) { invoker = new UnitOfWorkInvoker(invoker, unitOfWorkMethods, sessionFactory); } return invoker; } } | UnitOfWorkInvokerFactory { public Invoker create(Object service, Invoker rootInvoker, SessionFactory sessionFactory) { ImmutableMap.Builder<String, UnitOfWork> unitOfWorkMethodsBuilder = new ImmutableMap.Builder<>(); for (Method m : service.getClass().getMethods()) { if (m.isAnnotationPresent(UnitOfWork.class)) { unitOfWorkMethodsBuilder.put(m.getName(), m.getAnnotation(UnitOfWork.class)); } } ImmutableMap<String, UnitOfWork> unitOfWorkMethods = unitOfWorkMethodsBuilder.build(); Invoker invoker = rootInvoker; if (unitOfWorkMethods.size() > 0) { invoker = new UnitOfWorkInvoker(invoker, unitOfWorkMethods, sessionFactory); } return invoker; } Invoker create(Object service, Invoker rootInvoker, SessionFactory sessionFactory); } | UnitOfWorkInvokerFactory { public Invoker create(Object service, Invoker rootInvoker, SessionFactory sessionFactory) { ImmutableMap.Builder<String, UnitOfWork> unitOfWorkMethodsBuilder = new ImmutableMap.Builder<>(); for (Method m : service.getClass().getMethods()) { if (m.isAnnotationPresent(UnitOfWork.class)) { unitOfWorkMethodsBuilder.put(m.getName(), m.getAnnotation(UnitOfWork.class)); } } ImmutableMap<String, UnitOfWork> unitOfWorkMethods = unitOfWorkMethodsBuilder.build(); Invoker invoker = rootInvoker; if (unitOfWorkMethods.size() > 0) { invoker = new UnitOfWorkInvoker(invoker, unitOfWorkMethods, sessionFactory); } return invoker; } Invoker create(Object service, Invoker rootInvoker, SessionFactory sessionFactory); } |
@Test public void exceptionMeteredAnnotation() { Timer timer = testMetricRegistry.timer("timed"); Meter meter = testMetricRegistry.meter("metered"); Meter exceptionmeter = testMetricRegistry.meter("exceptionMeteredExceptions"); when(mockMetricRegistry.timer(anyString())).thenReturn(timer); when(mockMetricRegistry.meter(contains("metered"))).thenReturn(meter); when(mockMetricRegistry.meter(contains("exceptionMetered"))).thenReturn(exceptionmeter); long oldtimervalue = timer.getCount(); long oldmetervalue = meter.getCount(); long oldexceptionmetervalue = exceptionmeter.getCount(); Invoker invoker = invokerBuilder.create(instrumentedService, new ExceptionMeteredInvoker(false)); this.setTargetMethod(exchange, "exceptionMetered", boolean.class); Object result = invoker.invoke(exchange, null); assertEquals("exceptionMeteredReturn", result); assertThat(timer.getCount(), is(oldtimervalue)); assertThat(meter.getCount(), is(oldmetervalue)); assertThat(exceptionmeter.getCount(), is(oldexceptionmetervalue)); invoker = invokerBuilder.create(instrumentedService, new ExceptionMeteredInvoker(true)); try { invoker.invoke(exchange, null); fail("Exception shall be thrown here"); } catch (Exception e) { assertThat(e, is(instanceOf(RuntimeException.class))); } assertThat(timer.getCount(), is(oldtimervalue)); assertThat(meter.getCount(), is(oldmetervalue)); assertThat(exceptionmeter.getCount(), is(1 + oldexceptionmetervalue)); } | public Invoker create(Object service, Invoker rootInvoker) { List<Method> timedmethods = new ArrayList<>(); List<Method> meteredmethods = new ArrayList<>(); List<Method> exceptionmeteredmethods = new ArrayList<>(); for (Method m : service.getClass().getMethods()) { if (m.isAnnotationPresent(Timed.class)) { timedmethods.add(m); } if (m.isAnnotationPresent(Metered.class)) { meteredmethods.add(m); } if (m.isAnnotationPresent(ExceptionMetered.class)) { exceptionmeteredmethods.add(m); } } Invoker invoker = rootInvoker; if (timedmethods.size() > 0) { invoker = this.timed(invoker, timedmethods); } if (meteredmethods.size() > 0) { invoker = this.metered(invoker, meteredmethods); } if (exceptionmeteredmethods.size() > 0) { invoker = this.exceptionMetered(invoker, exceptionmeteredmethods); } return invoker; } | InstrumentedInvokerFactory { public Invoker create(Object service, Invoker rootInvoker) { List<Method> timedmethods = new ArrayList<>(); List<Method> meteredmethods = new ArrayList<>(); List<Method> exceptionmeteredmethods = new ArrayList<>(); for (Method m : service.getClass().getMethods()) { if (m.isAnnotationPresent(Timed.class)) { timedmethods.add(m); } if (m.isAnnotationPresent(Metered.class)) { meteredmethods.add(m); } if (m.isAnnotationPresent(ExceptionMetered.class)) { exceptionmeteredmethods.add(m); } } Invoker invoker = rootInvoker; if (timedmethods.size() > 0) { invoker = this.timed(invoker, timedmethods); } if (meteredmethods.size() > 0) { invoker = this.metered(invoker, meteredmethods); } if (exceptionmeteredmethods.size() > 0) { invoker = this.exceptionMetered(invoker, exceptionmeteredmethods); } return invoker; } } | InstrumentedInvokerFactory { public Invoker create(Object service, Invoker rootInvoker) { List<Method> timedmethods = new ArrayList<>(); List<Method> meteredmethods = new ArrayList<>(); List<Method> exceptionmeteredmethods = new ArrayList<>(); for (Method m : service.getClass().getMethods()) { if (m.isAnnotationPresent(Timed.class)) { timedmethods.add(m); } if (m.isAnnotationPresent(Metered.class)) { meteredmethods.add(m); } if (m.isAnnotationPresent(ExceptionMetered.class)) { exceptionmeteredmethods.add(m); } } Invoker invoker = rootInvoker; if (timedmethods.size() > 0) { invoker = this.timed(invoker, timedmethods); } if (meteredmethods.size() > 0) { invoker = this.metered(invoker, meteredmethods); } if (exceptionmeteredmethods.size() > 0) { invoker = this.exceptionMetered(invoker, exceptionmeteredmethods); } return invoker; } InstrumentedInvokerFactory(MetricRegistry metricRegistry); } | InstrumentedInvokerFactory { public Invoker create(Object service, Invoker rootInvoker) { List<Method> timedmethods = new ArrayList<>(); List<Method> meteredmethods = new ArrayList<>(); List<Method> exceptionmeteredmethods = new ArrayList<>(); for (Method m : service.getClass().getMethods()) { if (m.isAnnotationPresent(Timed.class)) { timedmethods.add(m); } if (m.isAnnotationPresent(Metered.class)) { meteredmethods.add(m); } if (m.isAnnotationPresent(ExceptionMetered.class)) { exceptionmeteredmethods.add(m); } } Invoker invoker = rootInvoker; if (timedmethods.size() > 0) { invoker = this.timed(invoker, timedmethods); } if (meteredmethods.size() > 0) { invoker = this.metered(invoker, meteredmethods); } if (exceptionmeteredmethods.size() > 0) { invoker = this.exceptionMetered(invoker, exceptionmeteredmethods); } return invoker; } InstrumentedInvokerFactory(MetricRegistry metricRegistry); Invoker create(Object service, Invoker rootInvoker); } | InstrumentedInvokerFactory { public Invoker create(Object service, Invoker rootInvoker) { List<Method> timedmethods = new ArrayList<>(); List<Method> meteredmethods = new ArrayList<>(); List<Method> exceptionmeteredmethods = new ArrayList<>(); for (Method m : service.getClass().getMethods()) { if (m.isAnnotationPresent(Timed.class)) { timedmethods.add(m); } if (m.isAnnotationPresent(Metered.class)) { meteredmethods.add(m); } if (m.isAnnotationPresent(ExceptionMetered.class)) { exceptionmeteredmethods.add(m); } } Invoker invoker = rootInvoker; if (timedmethods.size() > 0) { invoker = this.timed(invoker, timedmethods); } if (meteredmethods.size() > 0) { invoker = this.metered(invoker, meteredmethods); } if (exceptionmeteredmethods.size() > 0) { invoker = this.exceptionMetered(invoker, exceptionmeteredmethods); } return invoker; } InstrumentedInvokerFactory(MetricRegistry metricRegistry); Invoker create(Object service, Invoker rootInvoker); } |
@Test public void publishEndpoint() { JAXWSBundle<?> jaxwsBundle = new JAXWSBundle<>("/soap", jaxwsEnvironment); Object service = new Object(); try { jaxwsBundle.publishEndpoint(new EndpointBuilder("foo", null)); fail(); } catch (Exception e) { assertThat(e, is(instanceOf(IllegalArgumentException.class))); } try { jaxwsBundle.publishEndpoint(new EndpointBuilder(null, service)); fail(); } catch (Exception e) { assertThat(e, is(instanceOf(IllegalArgumentException.class))); } try { jaxwsBundle.publishEndpoint(new EndpointBuilder(" ", service)); fail(); } catch (Exception e) { assertThat(e, is(instanceOf(IllegalArgumentException.class))); } EndpointBuilder builder = mock(EndpointBuilder.class); jaxwsBundle.publishEndpoint(builder); verify(jaxwsEnvironment).publishEndpoint(builder); } | public Endpoint publishEndpoint(EndpointBuilder endpointBuilder) { checkArgument(endpointBuilder != null, "EndpointBuilder is null"); return this.jaxwsEnvironment.publishEndpoint(endpointBuilder); } | JAXWSBundle implements ConfiguredBundle<C> { public Endpoint publishEndpoint(EndpointBuilder endpointBuilder) { checkArgument(endpointBuilder != null, "EndpointBuilder is null"); return this.jaxwsEnvironment.publishEndpoint(endpointBuilder); } } | JAXWSBundle implements ConfiguredBundle<C> { public Endpoint publishEndpoint(EndpointBuilder endpointBuilder) { checkArgument(endpointBuilder != null, "EndpointBuilder is null"); return this.jaxwsEnvironment.publishEndpoint(endpointBuilder); } JAXWSBundle(); JAXWSBundle(String servletPath); JAXWSBundle(String servletPath, JAXWSEnvironment jaxwsEnvironment); } | JAXWSBundle implements ConfiguredBundle<C> { public Endpoint publishEndpoint(EndpointBuilder endpointBuilder) { checkArgument(endpointBuilder != null, "EndpointBuilder is null"); return this.jaxwsEnvironment.publishEndpoint(endpointBuilder); } JAXWSBundle(); JAXWSBundle(String servletPath); JAXWSBundle(String servletPath, JAXWSEnvironment jaxwsEnvironment); @Override void initialize(Bootstrap<?> bootstrap); @Override void run(C configuration, Environment environment); Endpoint publishEndpoint(EndpointBuilder endpointBuilder); Endpoint publishEndpoint(String path, Object service); Endpoint publishEndpoint(String path, Object service, SessionFactory sessionFactory); Endpoint publishEndpoint(String path, Object service, BasicAuthentication authentication); Endpoint publishEndpoint(String path, Object service, BasicAuthentication auth,
SessionFactory sessionFactory); @Deprecated T getClient(Class<T> serviceClass, String address, Handler...handlers); T getClient(ClientBuilder<T> clientBuilder); } | JAXWSBundle implements ConfiguredBundle<C> { public Endpoint publishEndpoint(EndpointBuilder endpointBuilder) { checkArgument(endpointBuilder != null, "EndpointBuilder is null"); return this.jaxwsEnvironment.publishEndpoint(endpointBuilder); } JAXWSBundle(); JAXWSBundle(String servletPath); JAXWSBundle(String servletPath, JAXWSEnvironment jaxwsEnvironment); @Override void initialize(Bootstrap<?> bootstrap); @Override void run(C configuration, Environment environment); Endpoint publishEndpoint(EndpointBuilder endpointBuilder); Endpoint publishEndpoint(String path, Object service); Endpoint publishEndpoint(String path, Object service, SessionFactory sessionFactory); Endpoint publishEndpoint(String path, Object service, BasicAuthentication authentication); Endpoint publishEndpoint(String path, Object service, BasicAuthentication auth,
SessionFactory sessionFactory); @Deprecated T getClient(Class<T> serviceClass, String address, Handler...handlers); T getClient(ClientBuilder<T> clientBuilder); } |
@Test public void getClient() { JAXWSBundle<?> jaxwsBundle = new JAXWSBundle<>("/soap", jaxwsEnvironment); Class<?> cls = Object.class; String url = "http: try { jaxwsBundle.getClient(new ClientBuilder<>(null, null)); fail(); } catch (Exception e) { assertThat(e, is(instanceOf(IllegalArgumentException.class))); } try { jaxwsBundle.getClient(new ClientBuilder<>(null, url)); fail(); } catch (Exception e) { assertThat(e, is(instanceOf(IllegalArgumentException.class))); } try { jaxwsBundle.getClient(new ClientBuilder<>(cls, " ")); fail(); } catch (Exception e) { assertThat(e, is(instanceOf(IllegalArgumentException.class))); } ClientBuilder<?> builder = new ClientBuilder<>(cls, url); jaxwsBundle.getClient(builder); verify(jaxwsEnvironment).getClient(builder); } | @Deprecated public <T> T getClient(Class<T> serviceClass, String address, Handler...handlers) { checkArgument(serviceClass != null, "ServiceClass is null"); checkArgument(address != null, "Address is null"); checkArgument((address).trim().length() > 0, "Address is empty"); return jaxwsEnvironment.getClient( new ClientBuilder<>(serviceClass, address).handlers(handlers)); } | JAXWSBundle implements ConfiguredBundle<C> { @Deprecated public <T> T getClient(Class<T> serviceClass, String address, Handler...handlers) { checkArgument(serviceClass != null, "ServiceClass is null"); checkArgument(address != null, "Address is null"); checkArgument((address).trim().length() > 0, "Address is empty"); return jaxwsEnvironment.getClient( new ClientBuilder<>(serviceClass, address).handlers(handlers)); } } | JAXWSBundle implements ConfiguredBundle<C> { @Deprecated public <T> T getClient(Class<T> serviceClass, String address, Handler...handlers) { checkArgument(serviceClass != null, "ServiceClass is null"); checkArgument(address != null, "Address is null"); checkArgument((address).trim().length() > 0, "Address is empty"); return jaxwsEnvironment.getClient( new ClientBuilder<>(serviceClass, address).handlers(handlers)); } JAXWSBundle(); JAXWSBundle(String servletPath); JAXWSBundle(String servletPath, JAXWSEnvironment jaxwsEnvironment); } | JAXWSBundle implements ConfiguredBundle<C> { @Deprecated public <T> T getClient(Class<T> serviceClass, String address, Handler...handlers) { checkArgument(serviceClass != null, "ServiceClass is null"); checkArgument(address != null, "Address is null"); checkArgument((address).trim().length() > 0, "Address is empty"); return jaxwsEnvironment.getClient( new ClientBuilder<>(serviceClass, address).handlers(handlers)); } JAXWSBundle(); JAXWSBundle(String servletPath); JAXWSBundle(String servletPath, JAXWSEnvironment jaxwsEnvironment); @Override void initialize(Bootstrap<?> bootstrap); @Override void run(C configuration, Environment environment); Endpoint publishEndpoint(EndpointBuilder endpointBuilder); Endpoint publishEndpoint(String path, Object service); Endpoint publishEndpoint(String path, Object service, SessionFactory sessionFactory); Endpoint publishEndpoint(String path, Object service, BasicAuthentication authentication); Endpoint publishEndpoint(String path, Object service, BasicAuthentication auth,
SessionFactory sessionFactory); @Deprecated T getClient(Class<T> serviceClass, String address, Handler...handlers); T getClient(ClientBuilder<T> clientBuilder); } | JAXWSBundle implements ConfiguredBundle<C> { @Deprecated public <T> T getClient(Class<T> serviceClass, String address, Handler...handlers) { checkArgument(serviceClass != null, "ServiceClass is null"); checkArgument(address != null, "Address is null"); checkArgument((address).trim().length() > 0, "Address is empty"); return jaxwsEnvironment.getClient( new ClientBuilder<>(serviceClass, address).handlers(handlers)); } JAXWSBundle(); JAXWSBundle(String servletPath); JAXWSBundle(String servletPath, JAXWSEnvironment jaxwsEnvironment); @Override void initialize(Bootstrap<?> bootstrap); @Override void run(C configuration, Environment environment); Endpoint publishEndpoint(EndpointBuilder endpointBuilder); Endpoint publishEndpoint(String path, Object service); Endpoint publishEndpoint(String path, Object service, SessionFactory sessionFactory); Endpoint publishEndpoint(String path, Object service, BasicAuthentication authentication); Endpoint publishEndpoint(String path, Object service, BasicAuthentication auth,
SessionFactory sessionFactory); @Deprecated T getClient(Class<T> serviceClass, String address, Handler...handlers); T getClient(ClientBuilder<T> clientBuilder); } |
@Test public void unitOfWorkWithException() { Invoker invoker = invokerBuilder.create(fooService, new UnitOfWorkInvoker(true), sessionFactory); this.setTargetMethod(exchange, "unitOfWork", boolean.class); try { invoker.invoke(exchange, null); } catch (Exception e) { assertEquals("Uh oh", e.getMessage()); } verify(session, times(1)).beginTransaction(); verify(transaction, times(0)).commit(); verify(transaction, times(1)).rollback(); verify(session, times(1)).close(); } | public Invoker create(Object service, Invoker rootInvoker, SessionFactory sessionFactory) { ImmutableMap.Builder<String, UnitOfWork> unitOfWorkMethodsBuilder = new ImmutableMap.Builder<>(); for (Method m : service.getClass().getMethods()) { if (m.isAnnotationPresent(UnitOfWork.class)) { unitOfWorkMethodsBuilder.put(m.getName(), m.getAnnotation(UnitOfWork.class)); } } ImmutableMap<String, UnitOfWork> unitOfWorkMethods = unitOfWorkMethodsBuilder.build(); Invoker invoker = rootInvoker; if (unitOfWorkMethods.size() > 0) { invoker = new UnitOfWorkInvoker(invoker, unitOfWorkMethods, sessionFactory); } return invoker; } | UnitOfWorkInvokerFactory { public Invoker create(Object service, Invoker rootInvoker, SessionFactory sessionFactory) { ImmutableMap.Builder<String, UnitOfWork> unitOfWorkMethodsBuilder = new ImmutableMap.Builder<>(); for (Method m : service.getClass().getMethods()) { if (m.isAnnotationPresent(UnitOfWork.class)) { unitOfWorkMethodsBuilder.put(m.getName(), m.getAnnotation(UnitOfWork.class)); } } ImmutableMap<String, UnitOfWork> unitOfWorkMethods = unitOfWorkMethodsBuilder.build(); Invoker invoker = rootInvoker; if (unitOfWorkMethods.size() > 0) { invoker = new UnitOfWorkInvoker(invoker, unitOfWorkMethods, sessionFactory); } return invoker; } } | UnitOfWorkInvokerFactory { public Invoker create(Object service, Invoker rootInvoker, SessionFactory sessionFactory) { ImmutableMap.Builder<String, UnitOfWork> unitOfWorkMethodsBuilder = new ImmutableMap.Builder<>(); for (Method m : service.getClass().getMethods()) { if (m.isAnnotationPresent(UnitOfWork.class)) { unitOfWorkMethodsBuilder.put(m.getName(), m.getAnnotation(UnitOfWork.class)); } } ImmutableMap<String, UnitOfWork> unitOfWorkMethods = unitOfWorkMethodsBuilder.build(); Invoker invoker = rootInvoker; if (unitOfWorkMethods.size() > 0) { invoker = new UnitOfWorkInvoker(invoker, unitOfWorkMethods, sessionFactory); } return invoker; } } | UnitOfWorkInvokerFactory { public Invoker create(Object service, Invoker rootInvoker, SessionFactory sessionFactory) { ImmutableMap.Builder<String, UnitOfWork> unitOfWorkMethodsBuilder = new ImmutableMap.Builder<>(); for (Method m : service.getClass().getMethods()) { if (m.isAnnotationPresent(UnitOfWork.class)) { unitOfWorkMethodsBuilder.put(m.getName(), m.getAnnotation(UnitOfWork.class)); } } ImmutableMap<String, UnitOfWork> unitOfWorkMethods = unitOfWorkMethodsBuilder.build(); Invoker invoker = rootInvoker; if (unitOfWorkMethods.size() > 0) { invoker = new UnitOfWorkInvoker(invoker, unitOfWorkMethods, sessionFactory); } return invoker; } Invoker create(Object service, Invoker rootInvoker, SessionFactory sessionFactory); } | UnitOfWorkInvokerFactory { public Invoker create(Object service, Invoker rootInvoker, SessionFactory sessionFactory) { ImmutableMap.Builder<String, UnitOfWork> unitOfWorkMethodsBuilder = new ImmutableMap.Builder<>(); for (Method m : service.getClass().getMethods()) { if (m.isAnnotationPresent(UnitOfWork.class)) { unitOfWorkMethodsBuilder.put(m.getName(), m.getAnnotation(UnitOfWork.class)); } } ImmutableMap<String, UnitOfWork> unitOfWorkMethods = unitOfWorkMethodsBuilder.build(); Invoker invoker = rootInvoker; if (unitOfWorkMethods.size() > 0) { invoker = new UnitOfWorkInvoker(invoker, unitOfWorkMethods, sessionFactory); } return invoker; } Invoker create(Object service, Invoker rootInvoker, SessionFactory sessionFactory); } |
@Test public void buildServlet() { Object result = jaxwsEnvironment.buildServlet(); assertThat(result, is(instanceOf(CXFNonSpringServlet.class))); assertThat(((CXFNonSpringServlet) result).getBus(), is(instanceOf(Bus.class))); } | public HttpServlet buildServlet() { CXFNonSpringServlet cxf = new CXFNonSpringServlet(); cxf.setBus(bus); return cxf; } | JAXWSEnvironment { public HttpServlet buildServlet() { CXFNonSpringServlet cxf = new CXFNonSpringServlet(); cxf.setBus(bus); return cxf; } } | JAXWSEnvironment { public HttpServlet buildServlet() { CXFNonSpringServlet cxf = new CXFNonSpringServlet(); cxf.setBus(bus); return cxf; } JAXWSEnvironment(String defaultPath); } | JAXWSEnvironment { public HttpServlet buildServlet() { CXFNonSpringServlet cxf = new CXFNonSpringServlet(); cxf.setBus(bus); return cxf; } JAXWSEnvironment(String defaultPath); String getDefaultPath(); HttpServlet buildServlet(); void setPublishedEndpointUrlPrefix(String publishedEndpointUrlPrefix); void setInstrumentedInvokerBuilder(InstrumentedInvokerFactory instrumentedInvokerBuilder); void setUnitOfWorkInvokerBuilder(UnitOfWorkInvokerFactory unitOfWorkInvokerBuilder); void logEndpoints(); Endpoint publishEndpoint(EndpointBuilder endpointBuilder); T getClient(ClientBuilder<T> clientBuilder); } | JAXWSEnvironment { public HttpServlet buildServlet() { CXFNonSpringServlet cxf = new CXFNonSpringServlet(); cxf.setBus(bus); return cxf; } JAXWSEnvironment(String defaultPath); String getDefaultPath(); HttpServlet buildServlet(); void setPublishedEndpointUrlPrefix(String publishedEndpointUrlPrefix); void setInstrumentedInvokerBuilder(InstrumentedInvokerFactory instrumentedInvokerBuilder); void setUnitOfWorkInvokerBuilder(UnitOfWorkInvokerFactory unitOfWorkInvokerBuilder); void logEndpoints(); Endpoint publishEndpoint(EndpointBuilder endpointBuilder); T getClient(ClientBuilder<T> clientBuilder); } |
@Test public void publishEndpoint() throws Exception { Endpoint e = jaxwsEnvironment.publishEndpoint(new EndpointBuilder("local: assertThat(e, is(notNullValue())); verify(mockInvokerBuilder).create(any(), any(Invoker.class)); verifyZeroInteractions(mockUnitOfWorkInvokerBuilder); Node soapResponse = testutils.invoke("local: LocalTransportFactory.TRANSPORT_ID, soapRequest.getBytes()); verify(mockInvoker).invoke(any(Exchange.class), any()); testutils.assertValid("/soap:Envelope/soap:Body/a:fooResponse", soapResponse); } | public Endpoint publishEndpoint(EndpointBuilder endpointBuilder) { checkArgument(endpointBuilder != null, "EndpointBuilder is null"); EndpointImpl cxfendpoint = new EndpointImpl(bus, endpointBuilder.getService()); if(endpointBuilder.publishedEndpointUrl() != null) { cxfendpoint.setPublishedEndpointUrl(endpointBuilder.publishedEndpointUrl()); } else if(publishedEndpointUrlPrefix != null) { cxfendpoint.setPublishedEndpointUrl(publishedEndpointUrlPrefix + endpointBuilder.getPath()); } cxfendpoint.publish(endpointBuilder.getPath()); if (endpointBuilder.isMtomEnabled()) { ((SOAPBinding)cxfendpoint.getBinding()).setMTOMEnabled(true); } Invoker invoker = cxfendpoint.getService().getInvoker(); ValidatorFactory vf = Validation.buildDefaultValidatorFactory(); invoker = this.createValidatingInvoker(invoker, vf.getValidator()); if (endpointBuilder.getSessionFactory() != null) { invoker = unitOfWorkInvokerBuilder.create( endpointBuilder.getService(), invoker, endpointBuilder.getSessionFactory()); cxfendpoint.getService().setInvoker(invoker); } invoker = instrumentedInvokerBuilder.create(endpointBuilder.getService(), invoker); cxfendpoint.getService().setInvoker(invoker); if (endpointBuilder.getAuthentication() != null) { BasicAuthenticationInterceptor basicAuthInterceptor = this.createBasicAuthenticationInterceptor(); basicAuthInterceptor.setAuthenticator(endpointBuilder.getAuthentication()); cxfendpoint.getInInterceptors().add(basicAuthInterceptor); } if (endpointBuilder.getCxfInInterceptors() != null) { cxfendpoint.getInInterceptors().addAll(endpointBuilder.getCxfInInterceptors()); } if (endpointBuilder.getCxfInFaultInterceptors() != null) { cxfendpoint.getInFaultInterceptors().addAll(endpointBuilder.getCxfInFaultInterceptors()); } if (endpointBuilder.getCxfOutInterceptors() != null) { cxfendpoint.getOutInterceptors().addAll(endpointBuilder.getCxfOutInterceptors()); } if (endpointBuilder.getCxfOutFaultInterceptors() != null) { cxfendpoint.getOutFaultInterceptors().addAll(endpointBuilder.getCxfOutFaultInterceptors()); } if (endpointBuilder.getProperties() != null) { cxfendpoint.getProperties().putAll( endpointBuilder.getProperties()); } return cxfendpoint; } | JAXWSEnvironment { public Endpoint publishEndpoint(EndpointBuilder endpointBuilder) { checkArgument(endpointBuilder != null, "EndpointBuilder is null"); EndpointImpl cxfendpoint = new EndpointImpl(bus, endpointBuilder.getService()); if(endpointBuilder.publishedEndpointUrl() != null) { cxfendpoint.setPublishedEndpointUrl(endpointBuilder.publishedEndpointUrl()); } else if(publishedEndpointUrlPrefix != null) { cxfendpoint.setPublishedEndpointUrl(publishedEndpointUrlPrefix + endpointBuilder.getPath()); } cxfendpoint.publish(endpointBuilder.getPath()); if (endpointBuilder.isMtomEnabled()) { ((SOAPBinding)cxfendpoint.getBinding()).setMTOMEnabled(true); } Invoker invoker = cxfendpoint.getService().getInvoker(); ValidatorFactory vf = Validation.buildDefaultValidatorFactory(); invoker = this.createValidatingInvoker(invoker, vf.getValidator()); if (endpointBuilder.getSessionFactory() != null) { invoker = unitOfWorkInvokerBuilder.create( endpointBuilder.getService(), invoker, endpointBuilder.getSessionFactory()); cxfendpoint.getService().setInvoker(invoker); } invoker = instrumentedInvokerBuilder.create(endpointBuilder.getService(), invoker); cxfendpoint.getService().setInvoker(invoker); if (endpointBuilder.getAuthentication() != null) { BasicAuthenticationInterceptor basicAuthInterceptor = this.createBasicAuthenticationInterceptor(); basicAuthInterceptor.setAuthenticator(endpointBuilder.getAuthentication()); cxfendpoint.getInInterceptors().add(basicAuthInterceptor); } if (endpointBuilder.getCxfInInterceptors() != null) { cxfendpoint.getInInterceptors().addAll(endpointBuilder.getCxfInInterceptors()); } if (endpointBuilder.getCxfInFaultInterceptors() != null) { cxfendpoint.getInFaultInterceptors().addAll(endpointBuilder.getCxfInFaultInterceptors()); } if (endpointBuilder.getCxfOutInterceptors() != null) { cxfendpoint.getOutInterceptors().addAll(endpointBuilder.getCxfOutInterceptors()); } if (endpointBuilder.getCxfOutFaultInterceptors() != null) { cxfendpoint.getOutFaultInterceptors().addAll(endpointBuilder.getCxfOutFaultInterceptors()); } if (endpointBuilder.getProperties() != null) { cxfendpoint.getProperties().putAll( endpointBuilder.getProperties()); } return cxfendpoint; } } | JAXWSEnvironment { public Endpoint publishEndpoint(EndpointBuilder endpointBuilder) { checkArgument(endpointBuilder != null, "EndpointBuilder is null"); EndpointImpl cxfendpoint = new EndpointImpl(bus, endpointBuilder.getService()); if(endpointBuilder.publishedEndpointUrl() != null) { cxfendpoint.setPublishedEndpointUrl(endpointBuilder.publishedEndpointUrl()); } else if(publishedEndpointUrlPrefix != null) { cxfendpoint.setPublishedEndpointUrl(publishedEndpointUrlPrefix + endpointBuilder.getPath()); } cxfendpoint.publish(endpointBuilder.getPath()); if (endpointBuilder.isMtomEnabled()) { ((SOAPBinding)cxfendpoint.getBinding()).setMTOMEnabled(true); } Invoker invoker = cxfendpoint.getService().getInvoker(); ValidatorFactory vf = Validation.buildDefaultValidatorFactory(); invoker = this.createValidatingInvoker(invoker, vf.getValidator()); if (endpointBuilder.getSessionFactory() != null) { invoker = unitOfWorkInvokerBuilder.create( endpointBuilder.getService(), invoker, endpointBuilder.getSessionFactory()); cxfendpoint.getService().setInvoker(invoker); } invoker = instrumentedInvokerBuilder.create(endpointBuilder.getService(), invoker); cxfendpoint.getService().setInvoker(invoker); if (endpointBuilder.getAuthentication() != null) { BasicAuthenticationInterceptor basicAuthInterceptor = this.createBasicAuthenticationInterceptor(); basicAuthInterceptor.setAuthenticator(endpointBuilder.getAuthentication()); cxfendpoint.getInInterceptors().add(basicAuthInterceptor); } if (endpointBuilder.getCxfInInterceptors() != null) { cxfendpoint.getInInterceptors().addAll(endpointBuilder.getCxfInInterceptors()); } if (endpointBuilder.getCxfInFaultInterceptors() != null) { cxfendpoint.getInFaultInterceptors().addAll(endpointBuilder.getCxfInFaultInterceptors()); } if (endpointBuilder.getCxfOutInterceptors() != null) { cxfendpoint.getOutInterceptors().addAll(endpointBuilder.getCxfOutInterceptors()); } if (endpointBuilder.getCxfOutFaultInterceptors() != null) { cxfendpoint.getOutFaultInterceptors().addAll(endpointBuilder.getCxfOutFaultInterceptors()); } if (endpointBuilder.getProperties() != null) { cxfendpoint.getProperties().putAll( endpointBuilder.getProperties()); } return cxfendpoint; } JAXWSEnvironment(String defaultPath); } | JAXWSEnvironment { public Endpoint publishEndpoint(EndpointBuilder endpointBuilder) { checkArgument(endpointBuilder != null, "EndpointBuilder is null"); EndpointImpl cxfendpoint = new EndpointImpl(bus, endpointBuilder.getService()); if(endpointBuilder.publishedEndpointUrl() != null) { cxfendpoint.setPublishedEndpointUrl(endpointBuilder.publishedEndpointUrl()); } else if(publishedEndpointUrlPrefix != null) { cxfendpoint.setPublishedEndpointUrl(publishedEndpointUrlPrefix + endpointBuilder.getPath()); } cxfendpoint.publish(endpointBuilder.getPath()); if (endpointBuilder.isMtomEnabled()) { ((SOAPBinding)cxfendpoint.getBinding()).setMTOMEnabled(true); } Invoker invoker = cxfendpoint.getService().getInvoker(); ValidatorFactory vf = Validation.buildDefaultValidatorFactory(); invoker = this.createValidatingInvoker(invoker, vf.getValidator()); if (endpointBuilder.getSessionFactory() != null) { invoker = unitOfWorkInvokerBuilder.create( endpointBuilder.getService(), invoker, endpointBuilder.getSessionFactory()); cxfendpoint.getService().setInvoker(invoker); } invoker = instrumentedInvokerBuilder.create(endpointBuilder.getService(), invoker); cxfendpoint.getService().setInvoker(invoker); if (endpointBuilder.getAuthentication() != null) { BasicAuthenticationInterceptor basicAuthInterceptor = this.createBasicAuthenticationInterceptor(); basicAuthInterceptor.setAuthenticator(endpointBuilder.getAuthentication()); cxfendpoint.getInInterceptors().add(basicAuthInterceptor); } if (endpointBuilder.getCxfInInterceptors() != null) { cxfendpoint.getInInterceptors().addAll(endpointBuilder.getCxfInInterceptors()); } if (endpointBuilder.getCxfInFaultInterceptors() != null) { cxfendpoint.getInFaultInterceptors().addAll(endpointBuilder.getCxfInFaultInterceptors()); } if (endpointBuilder.getCxfOutInterceptors() != null) { cxfendpoint.getOutInterceptors().addAll(endpointBuilder.getCxfOutInterceptors()); } if (endpointBuilder.getCxfOutFaultInterceptors() != null) { cxfendpoint.getOutFaultInterceptors().addAll(endpointBuilder.getCxfOutFaultInterceptors()); } if (endpointBuilder.getProperties() != null) { cxfendpoint.getProperties().putAll( endpointBuilder.getProperties()); } return cxfendpoint; } JAXWSEnvironment(String defaultPath); String getDefaultPath(); HttpServlet buildServlet(); void setPublishedEndpointUrlPrefix(String publishedEndpointUrlPrefix); void setInstrumentedInvokerBuilder(InstrumentedInvokerFactory instrumentedInvokerBuilder); void setUnitOfWorkInvokerBuilder(UnitOfWorkInvokerFactory unitOfWorkInvokerBuilder); void logEndpoints(); Endpoint publishEndpoint(EndpointBuilder endpointBuilder); T getClient(ClientBuilder<T> clientBuilder); } | JAXWSEnvironment { public Endpoint publishEndpoint(EndpointBuilder endpointBuilder) { checkArgument(endpointBuilder != null, "EndpointBuilder is null"); EndpointImpl cxfendpoint = new EndpointImpl(bus, endpointBuilder.getService()); if(endpointBuilder.publishedEndpointUrl() != null) { cxfendpoint.setPublishedEndpointUrl(endpointBuilder.publishedEndpointUrl()); } else if(publishedEndpointUrlPrefix != null) { cxfendpoint.setPublishedEndpointUrl(publishedEndpointUrlPrefix + endpointBuilder.getPath()); } cxfendpoint.publish(endpointBuilder.getPath()); if (endpointBuilder.isMtomEnabled()) { ((SOAPBinding)cxfendpoint.getBinding()).setMTOMEnabled(true); } Invoker invoker = cxfendpoint.getService().getInvoker(); ValidatorFactory vf = Validation.buildDefaultValidatorFactory(); invoker = this.createValidatingInvoker(invoker, vf.getValidator()); if (endpointBuilder.getSessionFactory() != null) { invoker = unitOfWorkInvokerBuilder.create( endpointBuilder.getService(), invoker, endpointBuilder.getSessionFactory()); cxfendpoint.getService().setInvoker(invoker); } invoker = instrumentedInvokerBuilder.create(endpointBuilder.getService(), invoker); cxfendpoint.getService().setInvoker(invoker); if (endpointBuilder.getAuthentication() != null) { BasicAuthenticationInterceptor basicAuthInterceptor = this.createBasicAuthenticationInterceptor(); basicAuthInterceptor.setAuthenticator(endpointBuilder.getAuthentication()); cxfendpoint.getInInterceptors().add(basicAuthInterceptor); } if (endpointBuilder.getCxfInInterceptors() != null) { cxfendpoint.getInInterceptors().addAll(endpointBuilder.getCxfInInterceptors()); } if (endpointBuilder.getCxfInFaultInterceptors() != null) { cxfendpoint.getInFaultInterceptors().addAll(endpointBuilder.getCxfInFaultInterceptors()); } if (endpointBuilder.getCxfOutInterceptors() != null) { cxfendpoint.getOutInterceptors().addAll(endpointBuilder.getCxfOutInterceptors()); } if (endpointBuilder.getCxfOutFaultInterceptors() != null) { cxfendpoint.getOutFaultInterceptors().addAll(endpointBuilder.getCxfOutFaultInterceptors()); } if (endpointBuilder.getProperties() != null) { cxfendpoint.getProperties().putAll( endpointBuilder.getProperties()); } return cxfendpoint; } JAXWSEnvironment(String defaultPath); String getDefaultPath(); HttpServlet buildServlet(); void setPublishedEndpointUrlPrefix(String publishedEndpointUrlPrefix); void setInstrumentedInvokerBuilder(InstrumentedInvokerFactory instrumentedInvokerBuilder); void setUnitOfWorkInvokerBuilder(UnitOfWorkInvokerFactory unitOfWorkInvokerBuilder); void logEndpoints(); Endpoint publishEndpoint(EndpointBuilder endpointBuilder); T getClient(ClientBuilder<T> clientBuilder); } |
@Test public void publishEndpointWithAuthentication() throws Exception { jaxwsEnvironment.publishEndpoint( new EndpointBuilder("local: .authentication(mock(BasicAuthentication.class))); verify(mockInvokerBuilder).create(any(), any(Invoker.class)); verifyZeroInteractions(mockUnitOfWorkInvokerBuilder); Node soapResponse = testutils.invoke("local: LocalTransportFactory.TRANSPORT_ID, soapRequest.getBytes()); verify(mockInvoker).invoke(any(Exchange.class), any()); testutils.assertValid("/soap:Envelope/soap:Body/a:fooResponse", soapResponse); assertThat(mockBasicAuthInterceptorInvoked, equalTo(1)); } | public Endpoint publishEndpoint(EndpointBuilder endpointBuilder) { checkArgument(endpointBuilder != null, "EndpointBuilder is null"); EndpointImpl cxfendpoint = new EndpointImpl(bus, endpointBuilder.getService()); if(endpointBuilder.publishedEndpointUrl() != null) { cxfendpoint.setPublishedEndpointUrl(endpointBuilder.publishedEndpointUrl()); } else if(publishedEndpointUrlPrefix != null) { cxfendpoint.setPublishedEndpointUrl(publishedEndpointUrlPrefix + endpointBuilder.getPath()); } cxfendpoint.publish(endpointBuilder.getPath()); if (endpointBuilder.isMtomEnabled()) { ((SOAPBinding)cxfendpoint.getBinding()).setMTOMEnabled(true); } Invoker invoker = cxfendpoint.getService().getInvoker(); ValidatorFactory vf = Validation.buildDefaultValidatorFactory(); invoker = this.createValidatingInvoker(invoker, vf.getValidator()); if (endpointBuilder.getSessionFactory() != null) { invoker = unitOfWorkInvokerBuilder.create( endpointBuilder.getService(), invoker, endpointBuilder.getSessionFactory()); cxfendpoint.getService().setInvoker(invoker); } invoker = instrumentedInvokerBuilder.create(endpointBuilder.getService(), invoker); cxfendpoint.getService().setInvoker(invoker); if (endpointBuilder.getAuthentication() != null) { BasicAuthenticationInterceptor basicAuthInterceptor = this.createBasicAuthenticationInterceptor(); basicAuthInterceptor.setAuthenticator(endpointBuilder.getAuthentication()); cxfendpoint.getInInterceptors().add(basicAuthInterceptor); } if (endpointBuilder.getCxfInInterceptors() != null) { cxfendpoint.getInInterceptors().addAll(endpointBuilder.getCxfInInterceptors()); } if (endpointBuilder.getCxfInFaultInterceptors() != null) { cxfendpoint.getInFaultInterceptors().addAll(endpointBuilder.getCxfInFaultInterceptors()); } if (endpointBuilder.getCxfOutInterceptors() != null) { cxfendpoint.getOutInterceptors().addAll(endpointBuilder.getCxfOutInterceptors()); } if (endpointBuilder.getCxfOutFaultInterceptors() != null) { cxfendpoint.getOutFaultInterceptors().addAll(endpointBuilder.getCxfOutFaultInterceptors()); } if (endpointBuilder.getProperties() != null) { cxfendpoint.getProperties().putAll( endpointBuilder.getProperties()); } return cxfendpoint; } | JAXWSEnvironment { public Endpoint publishEndpoint(EndpointBuilder endpointBuilder) { checkArgument(endpointBuilder != null, "EndpointBuilder is null"); EndpointImpl cxfendpoint = new EndpointImpl(bus, endpointBuilder.getService()); if(endpointBuilder.publishedEndpointUrl() != null) { cxfendpoint.setPublishedEndpointUrl(endpointBuilder.publishedEndpointUrl()); } else if(publishedEndpointUrlPrefix != null) { cxfendpoint.setPublishedEndpointUrl(publishedEndpointUrlPrefix + endpointBuilder.getPath()); } cxfendpoint.publish(endpointBuilder.getPath()); if (endpointBuilder.isMtomEnabled()) { ((SOAPBinding)cxfendpoint.getBinding()).setMTOMEnabled(true); } Invoker invoker = cxfendpoint.getService().getInvoker(); ValidatorFactory vf = Validation.buildDefaultValidatorFactory(); invoker = this.createValidatingInvoker(invoker, vf.getValidator()); if (endpointBuilder.getSessionFactory() != null) { invoker = unitOfWorkInvokerBuilder.create( endpointBuilder.getService(), invoker, endpointBuilder.getSessionFactory()); cxfendpoint.getService().setInvoker(invoker); } invoker = instrumentedInvokerBuilder.create(endpointBuilder.getService(), invoker); cxfendpoint.getService().setInvoker(invoker); if (endpointBuilder.getAuthentication() != null) { BasicAuthenticationInterceptor basicAuthInterceptor = this.createBasicAuthenticationInterceptor(); basicAuthInterceptor.setAuthenticator(endpointBuilder.getAuthentication()); cxfendpoint.getInInterceptors().add(basicAuthInterceptor); } if (endpointBuilder.getCxfInInterceptors() != null) { cxfendpoint.getInInterceptors().addAll(endpointBuilder.getCxfInInterceptors()); } if (endpointBuilder.getCxfInFaultInterceptors() != null) { cxfendpoint.getInFaultInterceptors().addAll(endpointBuilder.getCxfInFaultInterceptors()); } if (endpointBuilder.getCxfOutInterceptors() != null) { cxfendpoint.getOutInterceptors().addAll(endpointBuilder.getCxfOutInterceptors()); } if (endpointBuilder.getCxfOutFaultInterceptors() != null) { cxfendpoint.getOutFaultInterceptors().addAll(endpointBuilder.getCxfOutFaultInterceptors()); } if (endpointBuilder.getProperties() != null) { cxfendpoint.getProperties().putAll( endpointBuilder.getProperties()); } return cxfendpoint; } } | JAXWSEnvironment { public Endpoint publishEndpoint(EndpointBuilder endpointBuilder) { checkArgument(endpointBuilder != null, "EndpointBuilder is null"); EndpointImpl cxfendpoint = new EndpointImpl(bus, endpointBuilder.getService()); if(endpointBuilder.publishedEndpointUrl() != null) { cxfendpoint.setPublishedEndpointUrl(endpointBuilder.publishedEndpointUrl()); } else if(publishedEndpointUrlPrefix != null) { cxfendpoint.setPublishedEndpointUrl(publishedEndpointUrlPrefix + endpointBuilder.getPath()); } cxfendpoint.publish(endpointBuilder.getPath()); if (endpointBuilder.isMtomEnabled()) { ((SOAPBinding)cxfendpoint.getBinding()).setMTOMEnabled(true); } Invoker invoker = cxfendpoint.getService().getInvoker(); ValidatorFactory vf = Validation.buildDefaultValidatorFactory(); invoker = this.createValidatingInvoker(invoker, vf.getValidator()); if (endpointBuilder.getSessionFactory() != null) { invoker = unitOfWorkInvokerBuilder.create( endpointBuilder.getService(), invoker, endpointBuilder.getSessionFactory()); cxfendpoint.getService().setInvoker(invoker); } invoker = instrumentedInvokerBuilder.create(endpointBuilder.getService(), invoker); cxfendpoint.getService().setInvoker(invoker); if (endpointBuilder.getAuthentication() != null) { BasicAuthenticationInterceptor basicAuthInterceptor = this.createBasicAuthenticationInterceptor(); basicAuthInterceptor.setAuthenticator(endpointBuilder.getAuthentication()); cxfendpoint.getInInterceptors().add(basicAuthInterceptor); } if (endpointBuilder.getCxfInInterceptors() != null) { cxfendpoint.getInInterceptors().addAll(endpointBuilder.getCxfInInterceptors()); } if (endpointBuilder.getCxfInFaultInterceptors() != null) { cxfendpoint.getInFaultInterceptors().addAll(endpointBuilder.getCxfInFaultInterceptors()); } if (endpointBuilder.getCxfOutInterceptors() != null) { cxfendpoint.getOutInterceptors().addAll(endpointBuilder.getCxfOutInterceptors()); } if (endpointBuilder.getCxfOutFaultInterceptors() != null) { cxfendpoint.getOutFaultInterceptors().addAll(endpointBuilder.getCxfOutFaultInterceptors()); } if (endpointBuilder.getProperties() != null) { cxfendpoint.getProperties().putAll( endpointBuilder.getProperties()); } return cxfendpoint; } JAXWSEnvironment(String defaultPath); } | JAXWSEnvironment { public Endpoint publishEndpoint(EndpointBuilder endpointBuilder) { checkArgument(endpointBuilder != null, "EndpointBuilder is null"); EndpointImpl cxfendpoint = new EndpointImpl(bus, endpointBuilder.getService()); if(endpointBuilder.publishedEndpointUrl() != null) { cxfendpoint.setPublishedEndpointUrl(endpointBuilder.publishedEndpointUrl()); } else if(publishedEndpointUrlPrefix != null) { cxfendpoint.setPublishedEndpointUrl(publishedEndpointUrlPrefix + endpointBuilder.getPath()); } cxfendpoint.publish(endpointBuilder.getPath()); if (endpointBuilder.isMtomEnabled()) { ((SOAPBinding)cxfendpoint.getBinding()).setMTOMEnabled(true); } Invoker invoker = cxfendpoint.getService().getInvoker(); ValidatorFactory vf = Validation.buildDefaultValidatorFactory(); invoker = this.createValidatingInvoker(invoker, vf.getValidator()); if (endpointBuilder.getSessionFactory() != null) { invoker = unitOfWorkInvokerBuilder.create( endpointBuilder.getService(), invoker, endpointBuilder.getSessionFactory()); cxfendpoint.getService().setInvoker(invoker); } invoker = instrumentedInvokerBuilder.create(endpointBuilder.getService(), invoker); cxfendpoint.getService().setInvoker(invoker); if (endpointBuilder.getAuthentication() != null) { BasicAuthenticationInterceptor basicAuthInterceptor = this.createBasicAuthenticationInterceptor(); basicAuthInterceptor.setAuthenticator(endpointBuilder.getAuthentication()); cxfendpoint.getInInterceptors().add(basicAuthInterceptor); } if (endpointBuilder.getCxfInInterceptors() != null) { cxfendpoint.getInInterceptors().addAll(endpointBuilder.getCxfInInterceptors()); } if (endpointBuilder.getCxfInFaultInterceptors() != null) { cxfendpoint.getInFaultInterceptors().addAll(endpointBuilder.getCxfInFaultInterceptors()); } if (endpointBuilder.getCxfOutInterceptors() != null) { cxfendpoint.getOutInterceptors().addAll(endpointBuilder.getCxfOutInterceptors()); } if (endpointBuilder.getCxfOutFaultInterceptors() != null) { cxfendpoint.getOutFaultInterceptors().addAll(endpointBuilder.getCxfOutFaultInterceptors()); } if (endpointBuilder.getProperties() != null) { cxfendpoint.getProperties().putAll( endpointBuilder.getProperties()); } return cxfendpoint; } JAXWSEnvironment(String defaultPath); String getDefaultPath(); HttpServlet buildServlet(); void setPublishedEndpointUrlPrefix(String publishedEndpointUrlPrefix); void setInstrumentedInvokerBuilder(InstrumentedInvokerFactory instrumentedInvokerBuilder); void setUnitOfWorkInvokerBuilder(UnitOfWorkInvokerFactory unitOfWorkInvokerBuilder); void logEndpoints(); Endpoint publishEndpoint(EndpointBuilder endpointBuilder); T getClient(ClientBuilder<T> clientBuilder); } | JAXWSEnvironment { public Endpoint publishEndpoint(EndpointBuilder endpointBuilder) { checkArgument(endpointBuilder != null, "EndpointBuilder is null"); EndpointImpl cxfendpoint = new EndpointImpl(bus, endpointBuilder.getService()); if(endpointBuilder.publishedEndpointUrl() != null) { cxfendpoint.setPublishedEndpointUrl(endpointBuilder.publishedEndpointUrl()); } else if(publishedEndpointUrlPrefix != null) { cxfendpoint.setPublishedEndpointUrl(publishedEndpointUrlPrefix + endpointBuilder.getPath()); } cxfendpoint.publish(endpointBuilder.getPath()); if (endpointBuilder.isMtomEnabled()) { ((SOAPBinding)cxfendpoint.getBinding()).setMTOMEnabled(true); } Invoker invoker = cxfendpoint.getService().getInvoker(); ValidatorFactory vf = Validation.buildDefaultValidatorFactory(); invoker = this.createValidatingInvoker(invoker, vf.getValidator()); if (endpointBuilder.getSessionFactory() != null) { invoker = unitOfWorkInvokerBuilder.create( endpointBuilder.getService(), invoker, endpointBuilder.getSessionFactory()); cxfendpoint.getService().setInvoker(invoker); } invoker = instrumentedInvokerBuilder.create(endpointBuilder.getService(), invoker); cxfendpoint.getService().setInvoker(invoker); if (endpointBuilder.getAuthentication() != null) { BasicAuthenticationInterceptor basicAuthInterceptor = this.createBasicAuthenticationInterceptor(); basicAuthInterceptor.setAuthenticator(endpointBuilder.getAuthentication()); cxfendpoint.getInInterceptors().add(basicAuthInterceptor); } if (endpointBuilder.getCxfInInterceptors() != null) { cxfendpoint.getInInterceptors().addAll(endpointBuilder.getCxfInInterceptors()); } if (endpointBuilder.getCxfInFaultInterceptors() != null) { cxfendpoint.getInFaultInterceptors().addAll(endpointBuilder.getCxfInFaultInterceptors()); } if (endpointBuilder.getCxfOutInterceptors() != null) { cxfendpoint.getOutInterceptors().addAll(endpointBuilder.getCxfOutInterceptors()); } if (endpointBuilder.getCxfOutFaultInterceptors() != null) { cxfendpoint.getOutFaultInterceptors().addAll(endpointBuilder.getCxfOutFaultInterceptors()); } if (endpointBuilder.getProperties() != null) { cxfendpoint.getProperties().putAll( endpointBuilder.getProperties()); } return cxfendpoint; } JAXWSEnvironment(String defaultPath); String getDefaultPath(); HttpServlet buildServlet(); void setPublishedEndpointUrlPrefix(String publishedEndpointUrlPrefix); void setInstrumentedInvokerBuilder(InstrumentedInvokerFactory instrumentedInvokerBuilder); void setUnitOfWorkInvokerBuilder(UnitOfWorkInvokerFactory unitOfWorkInvokerBuilder); void logEndpoints(); Endpoint publishEndpoint(EndpointBuilder endpointBuilder); T getClient(ClientBuilder<T> clientBuilder); } |
@Test public void publishEndpointWithHibernateInvoker() throws Exception { jaxwsEnvironment.publishEndpoint( new EndpointBuilder("local: .sessionFactory(mock(SessionFactory.class))); verify(mockInvokerBuilder).create(any(), any(Invoker.class)); verify(mockUnitOfWorkInvokerBuilder).create(any(), any(Invoker.class), any(SessionFactory.class)); Node soapResponse = testutils.invoke("local: LocalTransportFactory.TRANSPORT_ID, soapRequest.getBytes()); verify(mockInvoker).invoke(any(Exchange.class), any()); testutils.assertValid("/soap:Envelope/soap:Body/a:fooResponse", soapResponse); } | public Endpoint publishEndpoint(EndpointBuilder endpointBuilder) { checkArgument(endpointBuilder != null, "EndpointBuilder is null"); EndpointImpl cxfendpoint = new EndpointImpl(bus, endpointBuilder.getService()); if(endpointBuilder.publishedEndpointUrl() != null) { cxfendpoint.setPublishedEndpointUrl(endpointBuilder.publishedEndpointUrl()); } else if(publishedEndpointUrlPrefix != null) { cxfendpoint.setPublishedEndpointUrl(publishedEndpointUrlPrefix + endpointBuilder.getPath()); } cxfendpoint.publish(endpointBuilder.getPath()); if (endpointBuilder.isMtomEnabled()) { ((SOAPBinding)cxfendpoint.getBinding()).setMTOMEnabled(true); } Invoker invoker = cxfendpoint.getService().getInvoker(); ValidatorFactory vf = Validation.buildDefaultValidatorFactory(); invoker = this.createValidatingInvoker(invoker, vf.getValidator()); if (endpointBuilder.getSessionFactory() != null) { invoker = unitOfWorkInvokerBuilder.create( endpointBuilder.getService(), invoker, endpointBuilder.getSessionFactory()); cxfendpoint.getService().setInvoker(invoker); } invoker = instrumentedInvokerBuilder.create(endpointBuilder.getService(), invoker); cxfendpoint.getService().setInvoker(invoker); if (endpointBuilder.getAuthentication() != null) { BasicAuthenticationInterceptor basicAuthInterceptor = this.createBasicAuthenticationInterceptor(); basicAuthInterceptor.setAuthenticator(endpointBuilder.getAuthentication()); cxfendpoint.getInInterceptors().add(basicAuthInterceptor); } if (endpointBuilder.getCxfInInterceptors() != null) { cxfendpoint.getInInterceptors().addAll(endpointBuilder.getCxfInInterceptors()); } if (endpointBuilder.getCxfInFaultInterceptors() != null) { cxfendpoint.getInFaultInterceptors().addAll(endpointBuilder.getCxfInFaultInterceptors()); } if (endpointBuilder.getCxfOutInterceptors() != null) { cxfendpoint.getOutInterceptors().addAll(endpointBuilder.getCxfOutInterceptors()); } if (endpointBuilder.getCxfOutFaultInterceptors() != null) { cxfendpoint.getOutFaultInterceptors().addAll(endpointBuilder.getCxfOutFaultInterceptors()); } if (endpointBuilder.getProperties() != null) { cxfendpoint.getProperties().putAll( endpointBuilder.getProperties()); } return cxfendpoint; } | JAXWSEnvironment { public Endpoint publishEndpoint(EndpointBuilder endpointBuilder) { checkArgument(endpointBuilder != null, "EndpointBuilder is null"); EndpointImpl cxfendpoint = new EndpointImpl(bus, endpointBuilder.getService()); if(endpointBuilder.publishedEndpointUrl() != null) { cxfendpoint.setPublishedEndpointUrl(endpointBuilder.publishedEndpointUrl()); } else if(publishedEndpointUrlPrefix != null) { cxfendpoint.setPublishedEndpointUrl(publishedEndpointUrlPrefix + endpointBuilder.getPath()); } cxfendpoint.publish(endpointBuilder.getPath()); if (endpointBuilder.isMtomEnabled()) { ((SOAPBinding)cxfendpoint.getBinding()).setMTOMEnabled(true); } Invoker invoker = cxfendpoint.getService().getInvoker(); ValidatorFactory vf = Validation.buildDefaultValidatorFactory(); invoker = this.createValidatingInvoker(invoker, vf.getValidator()); if (endpointBuilder.getSessionFactory() != null) { invoker = unitOfWorkInvokerBuilder.create( endpointBuilder.getService(), invoker, endpointBuilder.getSessionFactory()); cxfendpoint.getService().setInvoker(invoker); } invoker = instrumentedInvokerBuilder.create(endpointBuilder.getService(), invoker); cxfendpoint.getService().setInvoker(invoker); if (endpointBuilder.getAuthentication() != null) { BasicAuthenticationInterceptor basicAuthInterceptor = this.createBasicAuthenticationInterceptor(); basicAuthInterceptor.setAuthenticator(endpointBuilder.getAuthentication()); cxfendpoint.getInInterceptors().add(basicAuthInterceptor); } if (endpointBuilder.getCxfInInterceptors() != null) { cxfendpoint.getInInterceptors().addAll(endpointBuilder.getCxfInInterceptors()); } if (endpointBuilder.getCxfInFaultInterceptors() != null) { cxfendpoint.getInFaultInterceptors().addAll(endpointBuilder.getCxfInFaultInterceptors()); } if (endpointBuilder.getCxfOutInterceptors() != null) { cxfendpoint.getOutInterceptors().addAll(endpointBuilder.getCxfOutInterceptors()); } if (endpointBuilder.getCxfOutFaultInterceptors() != null) { cxfendpoint.getOutFaultInterceptors().addAll(endpointBuilder.getCxfOutFaultInterceptors()); } if (endpointBuilder.getProperties() != null) { cxfendpoint.getProperties().putAll( endpointBuilder.getProperties()); } return cxfendpoint; } } | JAXWSEnvironment { public Endpoint publishEndpoint(EndpointBuilder endpointBuilder) { checkArgument(endpointBuilder != null, "EndpointBuilder is null"); EndpointImpl cxfendpoint = new EndpointImpl(bus, endpointBuilder.getService()); if(endpointBuilder.publishedEndpointUrl() != null) { cxfendpoint.setPublishedEndpointUrl(endpointBuilder.publishedEndpointUrl()); } else if(publishedEndpointUrlPrefix != null) { cxfendpoint.setPublishedEndpointUrl(publishedEndpointUrlPrefix + endpointBuilder.getPath()); } cxfendpoint.publish(endpointBuilder.getPath()); if (endpointBuilder.isMtomEnabled()) { ((SOAPBinding)cxfendpoint.getBinding()).setMTOMEnabled(true); } Invoker invoker = cxfendpoint.getService().getInvoker(); ValidatorFactory vf = Validation.buildDefaultValidatorFactory(); invoker = this.createValidatingInvoker(invoker, vf.getValidator()); if (endpointBuilder.getSessionFactory() != null) { invoker = unitOfWorkInvokerBuilder.create( endpointBuilder.getService(), invoker, endpointBuilder.getSessionFactory()); cxfendpoint.getService().setInvoker(invoker); } invoker = instrumentedInvokerBuilder.create(endpointBuilder.getService(), invoker); cxfendpoint.getService().setInvoker(invoker); if (endpointBuilder.getAuthentication() != null) { BasicAuthenticationInterceptor basicAuthInterceptor = this.createBasicAuthenticationInterceptor(); basicAuthInterceptor.setAuthenticator(endpointBuilder.getAuthentication()); cxfendpoint.getInInterceptors().add(basicAuthInterceptor); } if (endpointBuilder.getCxfInInterceptors() != null) { cxfendpoint.getInInterceptors().addAll(endpointBuilder.getCxfInInterceptors()); } if (endpointBuilder.getCxfInFaultInterceptors() != null) { cxfendpoint.getInFaultInterceptors().addAll(endpointBuilder.getCxfInFaultInterceptors()); } if (endpointBuilder.getCxfOutInterceptors() != null) { cxfendpoint.getOutInterceptors().addAll(endpointBuilder.getCxfOutInterceptors()); } if (endpointBuilder.getCxfOutFaultInterceptors() != null) { cxfendpoint.getOutFaultInterceptors().addAll(endpointBuilder.getCxfOutFaultInterceptors()); } if (endpointBuilder.getProperties() != null) { cxfendpoint.getProperties().putAll( endpointBuilder.getProperties()); } return cxfendpoint; } JAXWSEnvironment(String defaultPath); } | JAXWSEnvironment { public Endpoint publishEndpoint(EndpointBuilder endpointBuilder) { checkArgument(endpointBuilder != null, "EndpointBuilder is null"); EndpointImpl cxfendpoint = new EndpointImpl(bus, endpointBuilder.getService()); if(endpointBuilder.publishedEndpointUrl() != null) { cxfendpoint.setPublishedEndpointUrl(endpointBuilder.publishedEndpointUrl()); } else if(publishedEndpointUrlPrefix != null) { cxfendpoint.setPublishedEndpointUrl(publishedEndpointUrlPrefix + endpointBuilder.getPath()); } cxfendpoint.publish(endpointBuilder.getPath()); if (endpointBuilder.isMtomEnabled()) { ((SOAPBinding)cxfendpoint.getBinding()).setMTOMEnabled(true); } Invoker invoker = cxfendpoint.getService().getInvoker(); ValidatorFactory vf = Validation.buildDefaultValidatorFactory(); invoker = this.createValidatingInvoker(invoker, vf.getValidator()); if (endpointBuilder.getSessionFactory() != null) { invoker = unitOfWorkInvokerBuilder.create( endpointBuilder.getService(), invoker, endpointBuilder.getSessionFactory()); cxfendpoint.getService().setInvoker(invoker); } invoker = instrumentedInvokerBuilder.create(endpointBuilder.getService(), invoker); cxfendpoint.getService().setInvoker(invoker); if (endpointBuilder.getAuthentication() != null) { BasicAuthenticationInterceptor basicAuthInterceptor = this.createBasicAuthenticationInterceptor(); basicAuthInterceptor.setAuthenticator(endpointBuilder.getAuthentication()); cxfendpoint.getInInterceptors().add(basicAuthInterceptor); } if (endpointBuilder.getCxfInInterceptors() != null) { cxfendpoint.getInInterceptors().addAll(endpointBuilder.getCxfInInterceptors()); } if (endpointBuilder.getCxfInFaultInterceptors() != null) { cxfendpoint.getInFaultInterceptors().addAll(endpointBuilder.getCxfInFaultInterceptors()); } if (endpointBuilder.getCxfOutInterceptors() != null) { cxfendpoint.getOutInterceptors().addAll(endpointBuilder.getCxfOutInterceptors()); } if (endpointBuilder.getCxfOutFaultInterceptors() != null) { cxfendpoint.getOutFaultInterceptors().addAll(endpointBuilder.getCxfOutFaultInterceptors()); } if (endpointBuilder.getProperties() != null) { cxfendpoint.getProperties().putAll( endpointBuilder.getProperties()); } return cxfendpoint; } JAXWSEnvironment(String defaultPath); String getDefaultPath(); HttpServlet buildServlet(); void setPublishedEndpointUrlPrefix(String publishedEndpointUrlPrefix); void setInstrumentedInvokerBuilder(InstrumentedInvokerFactory instrumentedInvokerBuilder); void setUnitOfWorkInvokerBuilder(UnitOfWorkInvokerFactory unitOfWorkInvokerBuilder); void logEndpoints(); Endpoint publishEndpoint(EndpointBuilder endpointBuilder); T getClient(ClientBuilder<T> clientBuilder); } | JAXWSEnvironment { public Endpoint publishEndpoint(EndpointBuilder endpointBuilder) { checkArgument(endpointBuilder != null, "EndpointBuilder is null"); EndpointImpl cxfendpoint = new EndpointImpl(bus, endpointBuilder.getService()); if(endpointBuilder.publishedEndpointUrl() != null) { cxfendpoint.setPublishedEndpointUrl(endpointBuilder.publishedEndpointUrl()); } else if(publishedEndpointUrlPrefix != null) { cxfendpoint.setPublishedEndpointUrl(publishedEndpointUrlPrefix + endpointBuilder.getPath()); } cxfendpoint.publish(endpointBuilder.getPath()); if (endpointBuilder.isMtomEnabled()) { ((SOAPBinding)cxfendpoint.getBinding()).setMTOMEnabled(true); } Invoker invoker = cxfendpoint.getService().getInvoker(); ValidatorFactory vf = Validation.buildDefaultValidatorFactory(); invoker = this.createValidatingInvoker(invoker, vf.getValidator()); if (endpointBuilder.getSessionFactory() != null) { invoker = unitOfWorkInvokerBuilder.create( endpointBuilder.getService(), invoker, endpointBuilder.getSessionFactory()); cxfendpoint.getService().setInvoker(invoker); } invoker = instrumentedInvokerBuilder.create(endpointBuilder.getService(), invoker); cxfendpoint.getService().setInvoker(invoker); if (endpointBuilder.getAuthentication() != null) { BasicAuthenticationInterceptor basicAuthInterceptor = this.createBasicAuthenticationInterceptor(); basicAuthInterceptor.setAuthenticator(endpointBuilder.getAuthentication()); cxfendpoint.getInInterceptors().add(basicAuthInterceptor); } if (endpointBuilder.getCxfInInterceptors() != null) { cxfendpoint.getInInterceptors().addAll(endpointBuilder.getCxfInInterceptors()); } if (endpointBuilder.getCxfInFaultInterceptors() != null) { cxfendpoint.getInFaultInterceptors().addAll(endpointBuilder.getCxfInFaultInterceptors()); } if (endpointBuilder.getCxfOutInterceptors() != null) { cxfendpoint.getOutInterceptors().addAll(endpointBuilder.getCxfOutInterceptors()); } if (endpointBuilder.getCxfOutFaultInterceptors() != null) { cxfendpoint.getOutFaultInterceptors().addAll(endpointBuilder.getCxfOutFaultInterceptors()); } if (endpointBuilder.getProperties() != null) { cxfendpoint.getProperties().putAll( endpointBuilder.getProperties()); } return cxfendpoint; } JAXWSEnvironment(String defaultPath); String getDefaultPath(); HttpServlet buildServlet(); void setPublishedEndpointUrlPrefix(String publishedEndpointUrlPrefix); void setInstrumentedInvokerBuilder(InstrumentedInvokerFactory instrumentedInvokerBuilder); void setUnitOfWorkInvokerBuilder(UnitOfWorkInvokerFactory unitOfWorkInvokerBuilder); void logEndpoints(); Endpoint publishEndpoint(EndpointBuilder endpointBuilder); T getClient(ClientBuilder<T> clientBuilder); } |
@Test public void publishEndpointWithCxfInterceptors() throws Exception { TestInterceptor inInterceptor = new TestInterceptor(Phase.UNMARSHAL); TestInterceptor inInterceptor2 = new TestInterceptor(Phase.PRE_INVOKE); TestInterceptor outInterceptor = new TestInterceptor(Phase.MARSHAL); jaxwsEnvironment.publishEndpoint( new EndpointBuilder("local: .cxfInInterceptors(inInterceptor, inInterceptor2) .cxfOutInterceptors(outInterceptor)); verify(mockInvokerBuilder).create(any(), any(Invoker.class)); Node soapResponse = testutils.invoke("local: LocalTransportFactory.TRANSPORT_ID, soapRequest.getBytes()); verify(mockInvoker).invoke(any(Exchange.class), any()); assertThat(inInterceptor.getInvocationCount(), equalTo(1)); assertThat(inInterceptor2.getInvocationCount(), equalTo(1)); assertThat(outInterceptor.getInvocationCount(), equalTo(1)); testutils.assertValid("/soap:Envelope/soap:Body/a:fooResponse", soapResponse); soapResponse = testutils.invoke("local: LocalTransportFactory.TRANSPORT_ID, soapRequest.getBytes()); verify(mockInvoker, times(2)).invoke(any(Exchange.class), any()); assertThat(inInterceptor.getInvocationCount(), equalTo(2)); assertThat(inInterceptor2.getInvocationCount(), equalTo(2)); assertThat(outInterceptor.getInvocationCount(), equalTo(2)); testutils.assertValid("/soap:Envelope/soap:Body/a:fooResponse", soapResponse); } | public Endpoint publishEndpoint(EndpointBuilder endpointBuilder) { checkArgument(endpointBuilder != null, "EndpointBuilder is null"); EndpointImpl cxfendpoint = new EndpointImpl(bus, endpointBuilder.getService()); if(endpointBuilder.publishedEndpointUrl() != null) { cxfendpoint.setPublishedEndpointUrl(endpointBuilder.publishedEndpointUrl()); } else if(publishedEndpointUrlPrefix != null) { cxfendpoint.setPublishedEndpointUrl(publishedEndpointUrlPrefix + endpointBuilder.getPath()); } cxfendpoint.publish(endpointBuilder.getPath()); if (endpointBuilder.isMtomEnabled()) { ((SOAPBinding)cxfendpoint.getBinding()).setMTOMEnabled(true); } Invoker invoker = cxfendpoint.getService().getInvoker(); ValidatorFactory vf = Validation.buildDefaultValidatorFactory(); invoker = this.createValidatingInvoker(invoker, vf.getValidator()); if (endpointBuilder.getSessionFactory() != null) { invoker = unitOfWorkInvokerBuilder.create( endpointBuilder.getService(), invoker, endpointBuilder.getSessionFactory()); cxfendpoint.getService().setInvoker(invoker); } invoker = instrumentedInvokerBuilder.create(endpointBuilder.getService(), invoker); cxfendpoint.getService().setInvoker(invoker); if (endpointBuilder.getAuthentication() != null) { BasicAuthenticationInterceptor basicAuthInterceptor = this.createBasicAuthenticationInterceptor(); basicAuthInterceptor.setAuthenticator(endpointBuilder.getAuthentication()); cxfendpoint.getInInterceptors().add(basicAuthInterceptor); } if (endpointBuilder.getCxfInInterceptors() != null) { cxfendpoint.getInInterceptors().addAll(endpointBuilder.getCxfInInterceptors()); } if (endpointBuilder.getCxfInFaultInterceptors() != null) { cxfendpoint.getInFaultInterceptors().addAll(endpointBuilder.getCxfInFaultInterceptors()); } if (endpointBuilder.getCxfOutInterceptors() != null) { cxfendpoint.getOutInterceptors().addAll(endpointBuilder.getCxfOutInterceptors()); } if (endpointBuilder.getCxfOutFaultInterceptors() != null) { cxfendpoint.getOutFaultInterceptors().addAll(endpointBuilder.getCxfOutFaultInterceptors()); } if (endpointBuilder.getProperties() != null) { cxfendpoint.getProperties().putAll( endpointBuilder.getProperties()); } return cxfendpoint; } | JAXWSEnvironment { public Endpoint publishEndpoint(EndpointBuilder endpointBuilder) { checkArgument(endpointBuilder != null, "EndpointBuilder is null"); EndpointImpl cxfendpoint = new EndpointImpl(bus, endpointBuilder.getService()); if(endpointBuilder.publishedEndpointUrl() != null) { cxfendpoint.setPublishedEndpointUrl(endpointBuilder.publishedEndpointUrl()); } else if(publishedEndpointUrlPrefix != null) { cxfendpoint.setPublishedEndpointUrl(publishedEndpointUrlPrefix + endpointBuilder.getPath()); } cxfendpoint.publish(endpointBuilder.getPath()); if (endpointBuilder.isMtomEnabled()) { ((SOAPBinding)cxfendpoint.getBinding()).setMTOMEnabled(true); } Invoker invoker = cxfendpoint.getService().getInvoker(); ValidatorFactory vf = Validation.buildDefaultValidatorFactory(); invoker = this.createValidatingInvoker(invoker, vf.getValidator()); if (endpointBuilder.getSessionFactory() != null) { invoker = unitOfWorkInvokerBuilder.create( endpointBuilder.getService(), invoker, endpointBuilder.getSessionFactory()); cxfendpoint.getService().setInvoker(invoker); } invoker = instrumentedInvokerBuilder.create(endpointBuilder.getService(), invoker); cxfendpoint.getService().setInvoker(invoker); if (endpointBuilder.getAuthentication() != null) { BasicAuthenticationInterceptor basicAuthInterceptor = this.createBasicAuthenticationInterceptor(); basicAuthInterceptor.setAuthenticator(endpointBuilder.getAuthentication()); cxfendpoint.getInInterceptors().add(basicAuthInterceptor); } if (endpointBuilder.getCxfInInterceptors() != null) { cxfendpoint.getInInterceptors().addAll(endpointBuilder.getCxfInInterceptors()); } if (endpointBuilder.getCxfInFaultInterceptors() != null) { cxfendpoint.getInFaultInterceptors().addAll(endpointBuilder.getCxfInFaultInterceptors()); } if (endpointBuilder.getCxfOutInterceptors() != null) { cxfendpoint.getOutInterceptors().addAll(endpointBuilder.getCxfOutInterceptors()); } if (endpointBuilder.getCxfOutFaultInterceptors() != null) { cxfendpoint.getOutFaultInterceptors().addAll(endpointBuilder.getCxfOutFaultInterceptors()); } if (endpointBuilder.getProperties() != null) { cxfendpoint.getProperties().putAll( endpointBuilder.getProperties()); } return cxfendpoint; } } | JAXWSEnvironment { public Endpoint publishEndpoint(EndpointBuilder endpointBuilder) { checkArgument(endpointBuilder != null, "EndpointBuilder is null"); EndpointImpl cxfendpoint = new EndpointImpl(bus, endpointBuilder.getService()); if(endpointBuilder.publishedEndpointUrl() != null) { cxfendpoint.setPublishedEndpointUrl(endpointBuilder.publishedEndpointUrl()); } else if(publishedEndpointUrlPrefix != null) { cxfendpoint.setPublishedEndpointUrl(publishedEndpointUrlPrefix + endpointBuilder.getPath()); } cxfendpoint.publish(endpointBuilder.getPath()); if (endpointBuilder.isMtomEnabled()) { ((SOAPBinding)cxfendpoint.getBinding()).setMTOMEnabled(true); } Invoker invoker = cxfendpoint.getService().getInvoker(); ValidatorFactory vf = Validation.buildDefaultValidatorFactory(); invoker = this.createValidatingInvoker(invoker, vf.getValidator()); if (endpointBuilder.getSessionFactory() != null) { invoker = unitOfWorkInvokerBuilder.create( endpointBuilder.getService(), invoker, endpointBuilder.getSessionFactory()); cxfendpoint.getService().setInvoker(invoker); } invoker = instrumentedInvokerBuilder.create(endpointBuilder.getService(), invoker); cxfendpoint.getService().setInvoker(invoker); if (endpointBuilder.getAuthentication() != null) { BasicAuthenticationInterceptor basicAuthInterceptor = this.createBasicAuthenticationInterceptor(); basicAuthInterceptor.setAuthenticator(endpointBuilder.getAuthentication()); cxfendpoint.getInInterceptors().add(basicAuthInterceptor); } if (endpointBuilder.getCxfInInterceptors() != null) { cxfendpoint.getInInterceptors().addAll(endpointBuilder.getCxfInInterceptors()); } if (endpointBuilder.getCxfInFaultInterceptors() != null) { cxfendpoint.getInFaultInterceptors().addAll(endpointBuilder.getCxfInFaultInterceptors()); } if (endpointBuilder.getCxfOutInterceptors() != null) { cxfendpoint.getOutInterceptors().addAll(endpointBuilder.getCxfOutInterceptors()); } if (endpointBuilder.getCxfOutFaultInterceptors() != null) { cxfendpoint.getOutFaultInterceptors().addAll(endpointBuilder.getCxfOutFaultInterceptors()); } if (endpointBuilder.getProperties() != null) { cxfendpoint.getProperties().putAll( endpointBuilder.getProperties()); } return cxfendpoint; } JAXWSEnvironment(String defaultPath); } | JAXWSEnvironment { public Endpoint publishEndpoint(EndpointBuilder endpointBuilder) { checkArgument(endpointBuilder != null, "EndpointBuilder is null"); EndpointImpl cxfendpoint = new EndpointImpl(bus, endpointBuilder.getService()); if(endpointBuilder.publishedEndpointUrl() != null) { cxfendpoint.setPublishedEndpointUrl(endpointBuilder.publishedEndpointUrl()); } else if(publishedEndpointUrlPrefix != null) { cxfendpoint.setPublishedEndpointUrl(publishedEndpointUrlPrefix + endpointBuilder.getPath()); } cxfendpoint.publish(endpointBuilder.getPath()); if (endpointBuilder.isMtomEnabled()) { ((SOAPBinding)cxfendpoint.getBinding()).setMTOMEnabled(true); } Invoker invoker = cxfendpoint.getService().getInvoker(); ValidatorFactory vf = Validation.buildDefaultValidatorFactory(); invoker = this.createValidatingInvoker(invoker, vf.getValidator()); if (endpointBuilder.getSessionFactory() != null) { invoker = unitOfWorkInvokerBuilder.create( endpointBuilder.getService(), invoker, endpointBuilder.getSessionFactory()); cxfendpoint.getService().setInvoker(invoker); } invoker = instrumentedInvokerBuilder.create(endpointBuilder.getService(), invoker); cxfendpoint.getService().setInvoker(invoker); if (endpointBuilder.getAuthentication() != null) { BasicAuthenticationInterceptor basicAuthInterceptor = this.createBasicAuthenticationInterceptor(); basicAuthInterceptor.setAuthenticator(endpointBuilder.getAuthentication()); cxfendpoint.getInInterceptors().add(basicAuthInterceptor); } if (endpointBuilder.getCxfInInterceptors() != null) { cxfendpoint.getInInterceptors().addAll(endpointBuilder.getCxfInInterceptors()); } if (endpointBuilder.getCxfInFaultInterceptors() != null) { cxfendpoint.getInFaultInterceptors().addAll(endpointBuilder.getCxfInFaultInterceptors()); } if (endpointBuilder.getCxfOutInterceptors() != null) { cxfendpoint.getOutInterceptors().addAll(endpointBuilder.getCxfOutInterceptors()); } if (endpointBuilder.getCxfOutFaultInterceptors() != null) { cxfendpoint.getOutFaultInterceptors().addAll(endpointBuilder.getCxfOutFaultInterceptors()); } if (endpointBuilder.getProperties() != null) { cxfendpoint.getProperties().putAll( endpointBuilder.getProperties()); } return cxfendpoint; } JAXWSEnvironment(String defaultPath); String getDefaultPath(); HttpServlet buildServlet(); void setPublishedEndpointUrlPrefix(String publishedEndpointUrlPrefix); void setInstrumentedInvokerBuilder(InstrumentedInvokerFactory instrumentedInvokerBuilder); void setUnitOfWorkInvokerBuilder(UnitOfWorkInvokerFactory unitOfWorkInvokerBuilder); void logEndpoints(); Endpoint publishEndpoint(EndpointBuilder endpointBuilder); T getClient(ClientBuilder<T> clientBuilder); } | JAXWSEnvironment { public Endpoint publishEndpoint(EndpointBuilder endpointBuilder) { checkArgument(endpointBuilder != null, "EndpointBuilder is null"); EndpointImpl cxfendpoint = new EndpointImpl(bus, endpointBuilder.getService()); if(endpointBuilder.publishedEndpointUrl() != null) { cxfendpoint.setPublishedEndpointUrl(endpointBuilder.publishedEndpointUrl()); } else if(publishedEndpointUrlPrefix != null) { cxfendpoint.setPublishedEndpointUrl(publishedEndpointUrlPrefix + endpointBuilder.getPath()); } cxfendpoint.publish(endpointBuilder.getPath()); if (endpointBuilder.isMtomEnabled()) { ((SOAPBinding)cxfendpoint.getBinding()).setMTOMEnabled(true); } Invoker invoker = cxfendpoint.getService().getInvoker(); ValidatorFactory vf = Validation.buildDefaultValidatorFactory(); invoker = this.createValidatingInvoker(invoker, vf.getValidator()); if (endpointBuilder.getSessionFactory() != null) { invoker = unitOfWorkInvokerBuilder.create( endpointBuilder.getService(), invoker, endpointBuilder.getSessionFactory()); cxfendpoint.getService().setInvoker(invoker); } invoker = instrumentedInvokerBuilder.create(endpointBuilder.getService(), invoker); cxfendpoint.getService().setInvoker(invoker); if (endpointBuilder.getAuthentication() != null) { BasicAuthenticationInterceptor basicAuthInterceptor = this.createBasicAuthenticationInterceptor(); basicAuthInterceptor.setAuthenticator(endpointBuilder.getAuthentication()); cxfendpoint.getInInterceptors().add(basicAuthInterceptor); } if (endpointBuilder.getCxfInInterceptors() != null) { cxfendpoint.getInInterceptors().addAll(endpointBuilder.getCxfInInterceptors()); } if (endpointBuilder.getCxfInFaultInterceptors() != null) { cxfendpoint.getInFaultInterceptors().addAll(endpointBuilder.getCxfInFaultInterceptors()); } if (endpointBuilder.getCxfOutInterceptors() != null) { cxfendpoint.getOutInterceptors().addAll(endpointBuilder.getCxfOutInterceptors()); } if (endpointBuilder.getCxfOutFaultInterceptors() != null) { cxfendpoint.getOutFaultInterceptors().addAll(endpointBuilder.getCxfOutFaultInterceptors()); } if (endpointBuilder.getProperties() != null) { cxfendpoint.getProperties().putAll( endpointBuilder.getProperties()); } return cxfendpoint; } JAXWSEnvironment(String defaultPath); String getDefaultPath(); HttpServlet buildServlet(); void setPublishedEndpointUrlPrefix(String publishedEndpointUrlPrefix); void setInstrumentedInvokerBuilder(InstrumentedInvokerFactory instrumentedInvokerBuilder); void setUnitOfWorkInvokerBuilder(UnitOfWorkInvokerFactory unitOfWorkInvokerBuilder); void logEndpoints(); Endpoint publishEndpoint(EndpointBuilder endpointBuilder); T getClient(ClientBuilder<T> clientBuilder); } |
@Test public void publishEndpointWithMtom() throws Exception { jaxwsEnvironment.publishEndpoint( new EndpointBuilder("local: .enableMtom()); verify(mockInvokerBuilder).create(any(), any(Invoker.class)); byte[] response = testutils.invokeBytes("local: verify(mockInvoker).invoke(any(Exchange.class), any()); MimeMultipart mimeMultipart = new MimeMultipart(new ByteArrayDataSource(response, "application/xop+xml; charset=UTF-8; type=\"text/xml\"")); assertThat(mimeMultipart.getCount(), equalTo(1)); testutils.assertValid("/soap:Envelope/soap:Body/a:fooResponse", StaxUtils.read(mimeMultipart.getBodyPart(0).getInputStream())); } | public Endpoint publishEndpoint(EndpointBuilder endpointBuilder) { checkArgument(endpointBuilder != null, "EndpointBuilder is null"); EndpointImpl cxfendpoint = new EndpointImpl(bus, endpointBuilder.getService()); if(endpointBuilder.publishedEndpointUrl() != null) { cxfendpoint.setPublishedEndpointUrl(endpointBuilder.publishedEndpointUrl()); } else if(publishedEndpointUrlPrefix != null) { cxfendpoint.setPublishedEndpointUrl(publishedEndpointUrlPrefix + endpointBuilder.getPath()); } cxfendpoint.publish(endpointBuilder.getPath()); if (endpointBuilder.isMtomEnabled()) { ((SOAPBinding)cxfendpoint.getBinding()).setMTOMEnabled(true); } Invoker invoker = cxfendpoint.getService().getInvoker(); ValidatorFactory vf = Validation.buildDefaultValidatorFactory(); invoker = this.createValidatingInvoker(invoker, vf.getValidator()); if (endpointBuilder.getSessionFactory() != null) { invoker = unitOfWorkInvokerBuilder.create( endpointBuilder.getService(), invoker, endpointBuilder.getSessionFactory()); cxfendpoint.getService().setInvoker(invoker); } invoker = instrumentedInvokerBuilder.create(endpointBuilder.getService(), invoker); cxfendpoint.getService().setInvoker(invoker); if (endpointBuilder.getAuthentication() != null) { BasicAuthenticationInterceptor basicAuthInterceptor = this.createBasicAuthenticationInterceptor(); basicAuthInterceptor.setAuthenticator(endpointBuilder.getAuthentication()); cxfendpoint.getInInterceptors().add(basicAuthInterceptor); } if (endpointBuilder.getCxfInInterceptors() != null) { cxfendpoint.getInInterceptors().addAll(endpointBuilder.getCxfInInterceptors()); } if (endpointBuilder.getCxfInFaultInterceptors() != null) { cxfendpoint.getInFaultInterceptors().addAll(endpointBuilder.getCxfInFaultInterceptors()); } if (endpointBuilder.getCxfOutInterceptors() != null) { cxfendpoint.getOutInterceptors().addAll(endpointBuilder.getCxfOutInterceptors()); } if (endpointBuilder.getCxfOutFaultInterceptors() != null) { cxfendpoint.getOutFaultInterceptors().addAll(endpointBuilder.getCxfOutFaultInterceptors()); } if (endpointBuilder.getProperties() != null) { cxfendpoint.getProperties().putAll( endpointBuilder.getProperties()); } return cxfendpoint; } | JAXWSEnvironment { public Endpoint publishEndpoint(EndpointBuilder endpointBuilder) { checkArgument(endpointBuilder != null, "EndpointBuilder is null"); EndpointImpl cxfendpoint = new EndpointImpl(bus, endpointBuilder.getService()); if(endpointBuilder.publishedEndpointUrl() != null) { cxfendpoint.setPublishedEndpointUrl(endpointBuilder.publishedEndpointUrl()); } else if(publishedEndpointUrlPrefix != null) { cxfendpoint.setPublishedEndpointUrl(publishedEndpointUrlPrefix + endpointBuilder.getPath()); } cxfendpoint.publish(endpointBuilder.getPath()); if (endpointBuilder.isMtomEnabled()) { ((SOAPBinding)cxfendpoint.getBinding()).setMTOMEnabled(true); } Invoker invoker = cxfendpoint.getService().getInvoker(); ValidatorFactory vf = Validation.buildDefaultValidatorFactory(); invoker = this.createValidatingInvoker(invoker, vf.getValidator()); if (endpointBuilder.getSessionFactory() != null) { invoker = unitOfWorkInvokerBuilder.create( endpointBuilder.getService(), invoker, endpointBuilder.getSessionFactory()); cxfendpoint.getService().setInvoker(invoker); } invoker = instrumentedInvokerBuilder.create(endpointBuilder.getService(), invoker); cxfendpoint.getService().setInvoker(invoker); if (endpointBuilder.getAuthentication() != null) { BasicAuthenticationInterceptor basicAuthInterceptor = this.createBasicAuthenticationInterceptor(); basicAuthInterceptor.setAuthenticator(endpointBuilder.getAuthentication()); cxfendpoint.getInInterceptors().add(basicAuthInterceptor); } if (endpointBuilder.getCxfInInterceptors() != null) { cxfendpoint.getInInterceptors().addAll(endpointBuilder.getCxfInInterceptors()); } if (endpointBuilder.getCxfInFaultInterceptors() != null) { cxfendpoint.getInFaultInterceptors().addAll(endpointBuilder.getCxfInFaultInterceptors()); } if (endpointBuilder.getCxfOutInterceptors() != null) { cxfendpoint.getOutInterceptors().addAll(endpointBuilder.getCxfOutInterceptors()); } if (endpointBuilder.getCxfOutFaultInterceptors() != null) { cxfendpoint.getOutFaultInterceptors().addAll(endpointBuilder.getCxfOutFaultInterceptors()); } if (endpointBuilder.getProperties() != null) { cxfendpoint.getProperties().putAll( endpointBuilder.getProperties()); } return cxfendpoint; } } | JAXWSEnvironment { public Endpoint publishEndpoint(EndpointBuilder endpointBuilder) { checkArgument(endpointBuilder != null, "EndpointBuilder is null"); EndpointImpl cxfendpoint = new EndpointImpl(bus, endpointBuilder.getService()); if(endpointBuilder.publishedEndpointUrl() != null) { cxfendpoint.setPublishedEndpointUrl(endpointBuilder.publishedEndpointUrl()); } else if(publishedEndpointUrlPrefix != null) { cxfendpoint.setPublishedEndpointUrl(publishedEndpointUrlPrefix + endpointBuilder.getPath()); } cxfendpoint.publish(endpointBuilder.getPath()); if (endpointBuilder.isMtomEnabled()) { ((SOAPBinding)cxfendpoint.getBinding()).setMTOMEnabled(true); } Invoker invoker = cxfendpoint.getService().getInvoker(); ValidatorFactory vf = Validation.buildDefaultValidatorFactory(); invoker = this.createValidatingInvoker(invoker, vf.getValidator()); if (endpointBuilder.getSessionFactory() != null) { invoker = unitOfWorkInvokerBuilder.create( endpointBuilder.getService(), invoker, endpointBuilder.getSessionFactory()); cxfendpoint.getService().setInvoker(invoker); } invoker = instrumentedInvokerBuilder.create(endpointBuilder.getService(), invoker); cxfendpoint.getService().setInvoker(invoker); if (endpointBuilder.getAuthentication() != null) { BasicAuthenticationInterceptor basicAuthInterceptor = this.createBasicAuthenticationInterceptor(); basicAuthInterceptor.setAuthenticator(endpointBuilder.getAuthentication()); cxfendpoint.getInInterceptors().add(basicAuthInterceptor); } if (endpointBuilder.getCxfInInterceptors() != null) { cxfendpoint.getInInterceptors().addAll(endpointBuilder.getCxfInInterceptors()); } if (endpointBuilder.getCxfInFaultInterceptors() != null) { cxfendpoint.getInFaultInterceptors().addAll(endpointBuilder.getCxfInFaultInterceptors()); } if (endpointBuilder.getCxfOutInterceptors() != null) { cxfendpoint.getOutInterceptors().addAll(endpointBuilder.getCxfOutInterceptors()); } if (endpointBuilder.getCxfOutFaultInterceptors() != null) { cxfendpoint.getOutFaultInterceptors().addAll(endpointBuilder.getCxfOutFaultInterceptors()); } if (endpointBuilder.getProperties() != null) { cxfendpoint.getProperties().putAll( endpointBuilder.getProperties()); } return cxfendpoint; } JAXWSEnvironment(String defaultPath); } | JAXWSEnvironment { public Endpoint publishEndpoint(EndpointBuilder endpointBuilder) { checkArgument(endpointBuilder != null, "EndpointBuilder is null"); EndpointImpl cxfendpoint = new EndpointImpl(bus, endpointBuilder.getService()); if(endpointBuilder.publishedEndpointUrl() != null) { cxfendpoint.setPublishedEndpointUrl(endpointBuilder.publishedEndpointUrl()); } else if(publishedEndpointUrlPrefix != null) { cxfendpoint.setPublishedEndpointUrl(publishedEndpointUrlPrefix + endpointBuilder.getPath()); } cxfendpoint.publish(endpointBuilder.getPath()); if (endpointBuilder.isMtomEnabled()) { ((SOAPBinding)cxfendpoint.getBinding()).setMTOMEnabled(true); } Invoker invoker = cxfendpoint.getService().getInvoker(); ValidatorFactory vf = Validation.buildDefaultValidatorFactory(); invoker = this.createValidatingInvoker(invoker, vf.getValidator()); if (endpointBuilder.getSessionFactory() != null) { invoker = unitOfWorkInvokerBuilder.create( endpointBuilder.getService(), invoker, endpointBuilder.getSessionFactory()); cxfendpoint.getService().setInvoker(invoker); } invoker = instrumentedInvokerBuilder.create(endpointBuilder.getService(), invoker); cxfendpoint.getService().setInvoker(invoker); if (endpointBuilder.getAuthentication() != null) { BasicAuthenticationInterceptor basicAuthInterceptor = this.createBasicAuthenticationInterceptor(); basicAuthInterceptor.setAuthenticator(endpointBuilder.getAuthentication()); cxfendpoint.getInInterceptors().add(basicAuthInterceptor); } if (endpointBuilder.getCxfInInterceptors() != null) { cxfendpoint.getInInterceptors().addAll(endpointBuilder.getCxfInInterceptors()); } if (endpointBuilder.getCxfInFaultInterceptors() != null) { cxfendpoint.getInFaultInterceptors().addAll(endpointBuilder.getCxfInFaultInterceptors()); } if (endpointBuilder.getCxfOutInterceptors() != null) { cxfendpoint.getOutInterceptors().addAll(endpointBuilder.getCxfOutInterceptors()); } if (endpointBuilder.getCxfOutFaultInterceptors() != null) { cxfendpoint.getOutFaultInterceptors().addAll(endpointBuilder.getCxfOutFaultInterceptors()); } if (endpointBuilder.getProperties() != null) { cxfendpoint.getProperties().putAll( endpointBuilder.getProperties()); } return cxfendpoint; } JAXWSEnvironment(String defaultPath); String getDefaultPath(); HttpServlet buildServlet(); void setPublishedEndpointUrlPrefix(String publishedEndpointUrlPrefix); void setInstrumentedInvokerBuilder(InstrumentedInvokerFactory instrumentedInvokerBuilder); void setUnitOfWorkInvokerBuilder(UnitOfWorkInvokerFactory unitOfWorkInvokerBuilder); void logEndpoints(); Endpoint publishEndpoint(EndpointBuilder endpointBuilder); T getClient(ClientBuilder<T> clientBuilder); } | JAXWSEnvironment { public Endpoint publishEndpoint(EndpointBuilder endpointBuilder) { checkArgument(endpointBuilder != null, "EndpointBuilder is null"); EndpointImpl cxfendpoint = new EndpointImpl(bus, endpointBuilder.getService()); if(endpointBuilder.publishedEndpointUrl() != null) { cxfendpoint.setPublishedEndpointUrl(endpointBuilder.publishedEndpointUrl()); } else if(publishedEndpointUrlPrefix != null) { cxfendpoint.setPublishedEndpointUrl(publishedEndpointUrlPrefix + endpointBuilder.getPath()); } cxfendpoint.publish(endpointBuilder.getPath()); if (endpointBuilder.isMtomEnabled()) { ((SOAPBinding)cxfendpoint.getBinding()).setMTOMEnabled(true); } Invoker invoker = cxfendpoint.getService().getInvoker(); ValidatorFactory vf = Validation.buildDefaultValidatorFactory(); invoker = this.createValidatingInvoker(invoker, vf.getValidator()); if (endpointBuilder.getSessionFactory() != null) { invoker = unitOfWorkInvokerBuilder.create( endpointBuilder.getService(), invoker, endpointBuilder.getSessionFactory()); cxfendpoint.getService().setInvoker(invoker); } invoker = instrumentedInvokerBuilder.create(endpointBuilder.getService(), invoker); cxfendpoint.getService().setInvoker(invoker); if (endpointBuilder.getAuthentication() != null) { BasicAuthenticationInterceptor basicAuthInterceptor = this.createBasicAuthenticationInterceptor(); basicAuthInterceptor.setAuthenticator(endpointBuilder.getAuthentication()); cxfendpoint.getInInterceptors().add(basicAuthInterceptor); } if (endpointBuilder.getCxfInInterceptors() != null) { cxfendpoint.getInInterceptors().addAll(endpointBuilder.getCxfInInterceptors()); } if (endpointBuilder.getCxfInFaultInterceptors() != null) { cxfendpoint.getInFaultInterceptors().addAll(endpointBuilder.getCxfInFaultInterceptors()); } if (endpointBuilder.getCxfOutInterceptors() != null) { cxfendpoint.getOutInterceptors().addAll(endpointBuilder.getCxfOutInterceptors()); } if (endpointBuilder.getCxfOutFaultInterceptors() != null) { cxfendpoint.getOutFaultInterceptors().addAll(endpointBuilder.getCxfOutFaultInterceptors()); } if (endpointBuilder.getProperties() != null) { cxfendpoint.getProperties().putAll( endpointBuilder.getProperties()); } return cxfendpoint; } JAXWSEnvironment(String defaultPath); String getDefaultPath(); HttpServlet buildServlet(); void setPublishedEndpointUrlPrefix(String publishedEndpointUrlPrefix); void setInstrumentedInvokerBuilder(InstrumentedInvokerFactory instrumentedInvokerBuilder); void setUnitOfWorkInvokerBuilder(UnitOfWorkInvokerFactory unitOfWorkInvokerBuilder); void logEndpoints(); Endpoint publishEndpoint(EndpointBuilder endpointBuilder); T getClient(ClientBuilder<T> clientBuilder); } |
@Test public void publishEndpointWithCustomPublishedUrl() throws Exception { jaxwsEnvironment.publishEndpoint( new EndpointBuilder("local: .publishedEndpointUrl("http: ); verify(mockInvokerBuilder).create(any(), any(Invoker.class)); verifyZeroInteractions(mockUnitOfWorkInvokerBuilder); Server server = testutils.getServerForAddress("local: AbstractDestination destination = (AbstractDestination) server.getDestination(); String publishedEndpointUrl = destination.getEndpointInfo().getProperty(WSDLGetUtils.PUBLISHED_ENDPOINT_URL, String.class); assertThat(publishedEndpointUrl, equalTo("http: } | public Endpoint publishEndpoint(EndpointBuilder endpointBuilder) { checkArgument(endpointBuilder != null, "EndpointBuilder is null"); EndpointImpl cxfendpoint = new EndpointImpl(bus, endpointBuilder.getService()); if(endpointBuilder.publishedEndpointUrl() != null) { cxfendpoint.setPublishedEndpointUrl(endpointBuilder.publishedEndpointUrl()); } else if(publishedEndpointUrlPrefix != null) { cxfendpoint.setPublishedEndpointUrl(publishedEndpointUrlPrefix + endpointBuilder.getPath()); } cxfendpoint.publish(endpointBuilder.getPath()); if (endpointBuilder.isMtomEnabled()) { ((SOAPBinding)cxfendpoint.getBinding()).setMTOMEnabled(true); } Invoker invoker = cxfendpoint.getService().getInvoker(); ValidatorFactory vf = Validation.buildDefaultValidatorFactory(); invoker = this.createValidatingInvoker(invoker, vf.getValidator()); if (endpointBuilder.getSessionFactory() != null) { invoker = unitOfWorkInvokerBuilder.create( endpointBuilder.getService(), invoker, endpointBuilder.getSessionFactory()); cxfendpoint.getService().setInvoker(invoker); } invoker = instrumentedInvokerBuilder.create(endpointBuilder.getService(), invoker); cxfendpoint.getService().setInvoker(invoker); if (endpointBuilder.getAuthentication() != null) { BasicAuthenticationInterceptor basicAuthInterceptor = this.createBasicAuthenticationInterceptor(); basicAuthInterceptor.setAuthenticator(endpointBuilder.getAuthentication()); cxfendpoint.getInInterceptors().add(basicAuthInterceptor); } if (endpointBuilder.getCxfInInterceptors() != null) { cxfendpoint.getInInterceptors().addAll(endpointBuilder.getCxfInInterceptors()); } if (endpointBuilder.getCxfInFaultInterceptors() != null) { cxfendpoint.getInFaultInterceptors().addAll(endpointBuilder.getCxfInFaultInterceptors()); } if (endpointBuilder.getCxfOutInterceptors() != null) { cxfendpoint.getOutInterceptors().addAll(endpointBuilder.getCxfOutInterceptors()); } if (endpointBuilder.getCxfOutFaultInterceptors() != null) { cxfendpoint.getOutFaultInterceptors().addAll(endpointBuilder.getCxfOutFaultInterceptors()); } if (endpointBuilder.getProperties() != null) { cxfendpoint.getProperties().putAll( endpointBuilder.getProperties()); } return cxfendpoint; } | JAXWSEnvironment { public Endpoint publishEndpoint(EndpointBuilder endpointBuilder) { checkArgument(endpointBuilder != null, "EndpointBuilder is null"); EndpointImpl cxfendpoint = new EndpointImpl(bus, endpointBuilder.getService()); if(endpointBuilder.publishedEndpointUrl() != null) { cxfendpoint.setPublishedEndpointUrl(endpointBuilder.publishedEndpointUrl()); } else if(publishedEndpointUrlPrefix != null) { cxfendpoint.setPublishedEndpointUrl(publishedEndpointUrlPrefix + endpointBuilder.getPath()); } cxfendpoint.publish(endpointBuilder.getPath()); if (endpointBuilder.isMtomEnabled()) { ((SOAPBinding)cxfendpoint.getBinding()).setMTOMEnabled(true); } Invoker invoker = cxfendpoint.getService().getInvoker(); ValidatorFactory vf = Validation.buildDefaultValidatorFactory(); invoker = this.createValidatingInvoker(invoker, vf.getValidator()); if (endpointBuilder.getSessionFactory() != null) { invoker = unitOfWorkInvokerBuilder.create( endpointBuilder.getService(), invoker, endpointBuilder.getSessionFactory()); cxfendpoint.getService().setInvoker(invoker); } invoker = instrumentedInvokerBuilder.create(endpointBuilder.getService(), invoker); cxfendpoint.getService().setInvoker(invoker); if (endpointBuilder.getAuthentication() != null) { BasicAuthenticationInterceptor basicAuthInterceptor = this.createBasicAuthenticationInterceptor(); basicAuthInterceptor.setAuthenticator(endpointBuilder.getAuthentication()); cxfendpoint.getInInterceptors().add(basicAuthInterceptor); } if (endpointBuilder.getCxfInInterceptors() != null) { cxfendpoint.getInInterceptors().addAll(endpointBuilder.getCxfInInterceptors()); } if (endpointBuilder.getCxfInFaultInterceptors() != null) { cxfendpoint.getInFaultInterceptors().addAll(endpointBuilder.getCxfInFaultInterceptors()); } if (endpointBuilder.getCxfOutInterceptors() != null) { cxfendpoint.getOutInterceptors().addAll(endpointBuilder.getCxfOutInterceptors()); } if (endpointBuilder.getCxfOutFaultInterceptors() != null) { cxfendpoint.getOutFaultInterceptors().addAll(endpointBuilder.getCxfOutFaultInterceptors()); } if (endpointBuilder.getProperties() != null) { cxfendpoint.getProperties().putAll( endpointBuilder.getProperties()); } return cxfendpoint; } } | JAXWSEnvironment { public Endpoint publishEndpoint(EndpointBuilder endpointBuilder) { checkArgument(endpointBuilder != null, "EndpointBuilder is null"); EndpointImpl cxfendpoint = new EndpointImpl(bus, endpointBuilder.getService()); if(endpointBuilder.publishedEndpointUrl() != null) { cxfendpoint.setPublishedEndpointUrl(endpointBuilder.publishedEndpointUrl()); } else if(publishedEndpointUrlPrefix != null) { cxfendpoint.setPublishedEndpointUrl(publishedEndpointUrlPrefix + endpointBuilder.getPath()); } cxfendpoint.publish(endpointBuilder.getPath()); if (endpointBuilder.isMtomEnabled()) { ((SOAPBinding)cxfendpoint.getBinding()).setMTOMEnabled(true); } Invoker invoker = cxfendpoint.getService().getInvoker(); ValidatorFactory vf = Validation.buildDefaultValidatorFactory(); invoker = this.createValidatingInvoker(invoker, vf.getValidator()); if (endpointBuilder.getSessionFactory() != null) { invoker = unitOfWorkInvokerBuilder.create( endpointBuilder.getService(), invoker, endpointBuilder.getSessionFactory()); cxfendpoint.getService().setInvoker(invoker); } invoker = instrumentedInvokerBuilder.create(endpointBuilder.getService(), invoker); cxfendpoint.getService().setInvoker(invoker); if (endpointBuilder.getAuthentication() != null) { BasicAuthenticationInterceptor basicAuthInterceptor = this.createBasicAuthenticationInterceptor(); basicAuthInterceptor.setAuthenticator(endpointBuilder.getAuthentication()); cxfendpoint.getInInterceptors().add(basicAuthInterceptor); } if (endpointBuilder.getCxfInInterceptors() != null) { cxfendpoint.getInInterceptors().addAll(endpointBuilder.getCxfInInterceptors()); } if (endpointBuilder.getCxfInFaultInterceptors() != null) { cxfendpoint.getInFaultInterceptors().addAll(endpointBuilder.getCxfInFaultInterceptors()); } if (endpointBuilder.getCxfOutInterceptors() != null) { cxfendpoint.getOutInterceptors().addAll(endpointBuilder.getCxfOutInterceptors()); } if (endpointBuilder.getCxfOutFaultInterceptors() != null) { cxfendpoint.getOutFaultInterceptors().addAll(endpointBuilder.getCxfOutFaultInterceptors()); } if (endpointBuilder.getProperties() != null) { cxfendpoint.getProperties().putAll( endpointBuilder.getProperties()); } return cxfendpoint; } JAXWSEnvironment(String defaultPath); } | JAXWSEnvironment { public Endpoint publishEndpoint(EndpointBuilder endpointBuilder) { checkArgument(endpointBuilder != null, "EndpointBuilder is null"); EndpointImpl cxfendpoint = new EndpointImpl(bus, endpointBuilder.getService()); if(endpointBuilder.publishedEndpointUrl() != null) { cxfendpoint.setPublishedEndpointUrl(endpointBuilder.publishedEndpointUrl()); } else if(publishedEndpointUrlPrefix != null) { cxfendpoint.setPublishedEndpointUrl(publishedEndpointUrlPrefix + endpointBuilder.getPath()); } cxfendpoint.publish(endpointBuilder.getPath()); if (endpointBuilder.isMtomEnabled()) { ((SOAPBinding)cxfendpoint.getBinding()).setMTOMEnabled(true); } Invoker invoker = cxfendpoint.getService().getInvoker(); ValidatorFactory vf = Validation.buildDefaultValidatorFactory(); invoker = this.createValidatingInvoker(invoker, vf.getValidator()); if (endpointBuilder.getSessionFactory() != null) { invoker = unitOfWorkInvokerBuilder.create( endpointBuilder.getService(), invoker, endpointBuilder.getSessionFactory()); cxfendpoint.getService().setInvoker(invoker); } invoker = instrumentedInvokerBuilder.create(endpointBuilder.getService(), invoker); cxfendpoint.getService().setInvoker(invoker); if (endpointBuilder.getAuthentication() != null) { BasicAuthenticationInterceptor basicAuthInterceptor = this.createBasicAuthenticationInterceptor(); basicAuthInterceptor.setAuthenticator(endpointBuilder.getAuthentication()); cxfendpoint.getInInterceptors().add(basicAuthInterceptor); } if (endpointBuilder.getCxfInInterceptors() != null) { cxfendpoint.getInInterceptors().addAll(endpointBuilder.getCxfInInterceptors()); } if (endpointBuilder.getCxfInFaultInterceptors() != null) { cxfendpoint.getInFaultInterceptors().addAll(endpointBuilder.getCxfInFaultInterceptors()); } if (endpointBuilder.getCxfOutInterceptors() != null) { cxfendpoint.getOutInterceptors().addAll(endpointBuilder.getCxfOutInterceptors()); } if (endpointBuilder.getCxfOutFaultInterceptors() != null) { cxfendpoint.getOutFaultInterceptors().addAll(endpointBuilder.getCxfOutFaultInterceptors()); } if (endpointBuilder.getProperties() != null) { cxfendpoint.getProperties().putAll( endpointBuilder.getProperties()); } return cxfendpoint; } JAXWSEnvironment(String defaultPath); String getDefaultPath(); HttpServlet buildServlet(); void setPublishedEndpointUrlPrefix(String publishedEndpointUrlPrefix); void setInstrumentedInvokerBuilder(InstrumentedInvokerFactory instrumentedInvokerBuilder); void setUnitOfWorkInvokerBuilder(UnitOfWorkInvokerFactory unitOfWorkInvokerBuilder); void logEndpoints(); Endpoint publishEndpoint(EndpointBuilder endpointBuilder); T getClient(ClientBuilder<T> clientBuilder); } | JAXWSEnvironment { public Endpoint publishEndpoint(EndpointBuilder endpointBuilder) { checkArgument(endpointBuilder != null, "EndpointBuilder is null"); EndpointImpl cxfendpoint = new EndpointImpl(bus, endpointBuilder.getService()); if(endpointBuilder.publishedEndpointUrl() != null) { cxfendpoint.setPublishedEndpointUrl(endpointBuilder.publishedEndpointUrl()); } else if(publishedEndpointUrlPrefix != null) { cxfendpoint.setPublishedEndpointUrl(publishedEndpointUrlPrefix + endpointBuilder.getPath()); } cxfendpoint.publish(endpointBuilder.getPath()); if (endpointBuilder.isMtomEnabled()) { ((SOAPBinding)cxfendpoint.getBinding()).setMTOMEnabled(true); } Invoker invoker = cxfendpoint.getService().getInvoker(); ValidatorFactory vf = Validation.buildDefaultValidatorFactory(); invoker = this.createValidatingInvoker(invoker, vf.getValidator()); if (endpointBuilder.getSessionFactory() != null) { invoker = unitOfWorkInvokerBuilder.create( endpointBuilder.getService(), invoker, endpointBuilder.getSessionFactory()); cxfendpoint.getService().setInvoker(invoker); } invoker = instrumentedInvokerBuilder.create(endpointBuilder.getService(), invoker); cxfendpoint.getService().setInvoker(invoker); if (endpointBuilder.getAuthentication() != null) { BasicAuthenticationInterceptor basicAuthInterceptor = this.createBasicAuthenticationInterceptor(); basicAuthInterceptor.setAuthenticator(endpointBuilder.getAuthentication()); cxfendpoint.getInInterceptors().add(basicAuthInterceptor); } if (endpointBuilder.getCxfInInterceptors() != null) { cxfendpoint.getInInterceptors().addAll(endpointBuilder.getCxfInInterceptors()); } if (endpointBuilder.getCxfInFaultInterceptors() != null) { cxfendpoint.getInFaultInterceptors().addAll(endpointBuilder.getCxfInFaultInterceptors()); } if (endpointBuilder.getCxfOutInterceptors() != null) { cxfendpoint.getOutInterceptors().addAll(endpointBuilder.getCxfOutInterceptors()); } if (endpointBuilder.getCxfOutFaultInterceptors() != null) { cxfendpoint.getOutFaultInterceptors().addAll(endpointBuilder.getCxfOutFaultInterceptors()); } if (endpointBuilder.getProperties() != null) { cxfendpoint.getProperties().putAll( endpointBuilder.getProperties()); } return cxfendpoint; } JAXWSEnvironment(String defaultPath); String getDefaultPath(); HttpServlet buildServlet(); void setPublishedEndpointUrlPrefix(String publishedEndpointUrlPrefix); void setInstrumentedInvokerBuilder(InstrumentedInvokerFactory instrumentedInvokerBuilder); void setUnitOfWorkInvokerBuilder(UnitOfWorkInvokerFactory unitOfWorkInvokerBuilder); void logEndpoints(); Endpoint publishEndpoint(EndpointBuilder endpointBuilder); T getClient(ClientBuilder<T> clientBuilder); } |
@Test public void testToDateDateTime() { DateTime time = new DateTime(1000); assertEquals(new Date(1000), TranslationUtils.toDate(time)); } | public static Date toDate(DateTime date) { return (date == null) ? null : date.toDate(); } | TranslationUtils { public static Date toDate(DateTime date) { return (date == null) ? null : date.toDate(); } } | TranslationUtils { public static Date toDate(DateTime date) { return (date == null) ? null : date.toDate(); } private TranslationUtils(); } | TranslationUtils { public static Date toDate(DateTime date) { return (date == null) ? null : date.toDate(); } private TranslationUtils(); static Date toDate(DateTime date); static Date toDate(LocalDate ldate); static Date toDate(Calendar date); static Date toDate(Number timestamp); static Date toDate(Number timestamp, TimeUnit unit); static DateTime toDateTime(Date date); static LocalDate toLocalDate(Date date); static DataFile toDataFile(File file); static DataFile toDataFile(String filePath); static long toLong(Number longE); static long toLong(Date value); static long toLong(String value); static long toLong(Number longE, long defaultValue); static long toLong(Date value, long defaultValue); static long toLong(String stringContainingANumber, long defaultValue); static int toInt(Number number); static int toInt(String value); static int toInt(Number integer, int defaultV); static int toInt(String value, int defaultV); static Integer toInteger(String value, Integer defaultV); static boolean toBool(Boolean bool); static boolean toBool(String value); static boolean toBool(Boolean bool, boolean defaultB); static boolean toBool(String value, boolean defaultV); static double toDouble(Number value); static double toDouble(String value); static double toDouble(Number value, double defaultD); static double toDouble(String value, double defaultD); static URL toUrl(String url); static String toString(Object obj); static Base64 toBase64(Object obj); static byte[] toByteArray(Object obj); static synchronized Date convertTimestamp(String timestamp); static synchronized Date convertTimestamp(String timestamp, Date defaultDate); static synchronized Date convertTimestamp(String timestamp, DateFormat format, Date defaultDate); static synchronized Date convertTimestamp(String timestamp, DateFormat format); static synchronized Date convertRfc3339Timestamp(String timestamp); static synchronized Date convertRfc3339Timestamp(String timestamp, Date defaultDate); static synchronized String toDefaultTimestamp(Date date); static synchronized String toRfc3339Timestamp(Date date); static String toTimestamp(Date date, DateFormat format); static List<String> parseList(String string, String separator); static DateTime moveToUtc(Date date); static Date moveDateTimeToUtc(Date date); static String toUtcTimestamp(Date date); static Date convertStringToDate(String valueStr); } | TranslationUtils { public static Date toDate(DateTime date) { return (date == null) ? null : date.toDate(); } private TranslationUtils(); static Date toDate(DateTime date); static Date toDate(LocalDate ldate); static Date toDate(Calendar date); static Date toDate(Number timestamp); static Date toDate(Number timestamp, TimeUnit unit); static DateTime toDateTime(Date date); static LocalDate toLocalDate(Date date); static DataFile toDataFile(File file); static DataFile toDataFile(String filePath); static long toLong(Number longE); static long toLong(Date value); static long toLong(String value); static long toLong(Number longE, long defaultValue); static long toLong(Date value, long defaultValue); static long toLong(String stringContainingANumber, long defaultValue); static int toInt(Number number); static int toInt(String value); static int toInt(Number integer, int defaultV); static int toInt(String value, int defaultV); static Integer toInteger(String value, Integer defaultV); static boolean toBool(Boolean bool); static boolean toBool(String value); static boolean toBool(Boolean bool, boolean defaultB); static boolean toBool(String value, boolean defaultV); static double toDouble(Number value); static double toDouble(String value); static double toDouble(Number value, double defaultD); static double toDouble(String value, double defaultD); static URL toUrl(String url); static String toString(Object obj); static Base64 toBase64(Object obj); static byte[] toByteArray(Object obj); static synchronized Date convertTimestamp(String timestamp); static synchronized Date convertTimestamp(String timestamp, Date defaultDate); static synchronized Date convertTimestamp(String timestamp, DateFormat format, Date defaultDate); static synchronized Date convertTimestamp(String timestamp, DateFormat format); static synchronized Date convertRfc3339Timestamp(String timestamp); static synchronized Date convertRfc3339Timestamp(String timestamp, Date defaultDate); static synchronized String toDefaultTimestamp(Date date); static synchronized String toRfc3339Timestamp(Date date); static String toTimestamp(Date date, DateFormat format); static List<String> parseList(String string, String separator); static DateTime moveToUtc(Date date); static Date moveDateTimeToUtc(Date date); static String toUtcTimestamp(Date date); static Date convertStringToDate(String valueStr); static final String METHOD_CONVERT_STRING_TO_DATE; static final String METHOD_CONVERT_OTHER_TO_DATE; static final String METHOD_CONVERT_DATE_TO_DATETIME; static final String METHOD_CONVERT_DATE_TO_LOCALDATE; static final String METHOD_CONVERT_DATE_TO_STRING; static final String METHOD_CONVERT_STRING_TO_URL; static final String METHOD_CONVERT_BOOL_TO_BOOL; static final String METHOD_CONVERT_NUMBER_TO_LONG; static final String METHOD_CONVERT_NUMBER_TO_INT; static final String METHOD_CONVERT_NUMBER_TO_DOUBLE; static final String METHOD_CONVERT_ANY_TO_STRING; static final String METHOD_CONVERT_ANY_TO_BYTE_ARRAY; static final String METHOD_CONVERT_ANY_TO_BASE64; static final String METHOD_CONVERT_TO_DATA_FILE; } |
@SuppressWarnings("resource") @Test public void testClone() { try { CertificateEnrollmentListOptions certificateenrollmentlistoptions1 = new CertificateEnrollmentListOptions(Integer.valueOf(48), Long.valueOf(36), Order.getDefault(), "b0f5fbe1-99ac-48ae-9b47-721559e6ccff", null, null); CertificateEnrollmentListOptions certificateenrollmentlistoptions2 = certificateenrollmentlistoptions1.clone(); assertNotNull(certificateenrollmentlistoptions1); assertNotNull(certificateenrollmentlistoptions2); assertNotSame(certificateenrollmentlistoptions2, certificateenrollmentlistoptions1); assertEquals(certificateenrollmentlistoptions2, certificateenrollmentlistoptions1); } catch (Exception exception) { fail(exception.getMessage()); } } | @Override public CertificateEnrollmentListOptions clone() { final CertificateEnrollmentListOptions opt = new CertificateEnrollmentListOptions(); opt.setOptions(this); return opt; } | CertificateEnrollmentListOptions extends ListOptions { @Override public CertificateEnrollmentListOptions clone() { final CertificateEnrollmentListOptions opt = new CertificateEnrollmentListOptions(); opt.setOptions(this); return opt; } } | CertificateEnrollmentListOptions extends ListOptions { @Override public CertificateEnrollmentListOptions clone() { final CertificateEnrollmentListOptions opt = new CertificateEnrollmentListOptions(); opt.setOptions(this); return opt; } @Internal CertificateEnrollmentListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal CertificateEnrollmentListOptions(CertificateEnrollmentListOptions certificateEnrollmentListOptions); CertificateEnrollmentListOptions(); @Internal CertificateEnrollmentListOptions(String after, Filters filter); } | CertificateEnrollmentListOptions extends ListOptions { @Override public CertificateEnrollmentListOptions clone() { final CertificateEnrollmentListOptions opt = new CertificateEnrollmentListOptions(); opt.setOptions(this); return opt; } @Internal CertificateEnrollmentListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal CertificateEnrollmentListOptions(CertificateEnrollmentListOptions certificateEnrollmentListOptions); CertificateEnrollmentListOptions(); @Internal CertificateEnrollmentListOptions(String after, Filters filter); List<Filter> getUpdatedAtFilters(); void addLessThanUpdatedAtFilter(Date filterByUpdatedAt); @SuppressWarnings("unchecked") T lessThanUpdatedAt(Date filterByUpdatedAt); void addGreaterThanUpdatedAtFilter(Date filterByUpdatedAt); @SuppressWarnings("unchecked") T greaterThanUpdatedAt(Date filterByUpdatedAt); List<Filter> getCertificateNameFilters(); void addEqualToCertificateNameFilter(String filterByCertificateName); @SuppressWarnings("unchecked") T equalToCertificateName(String filterByCertificateName); List<Filter> getDeviceIdFilters(); void addEqualToDeviceIdFilter(String filterByDeviceId); @SuppressWarnings("unchecked") T equalToDeviceId(String filterByDeviceId); List<Filter> getEnrollResultFilters(); void addNotEqualToEnrollResultFilter(CertificateEnrollmentEnrollResult filterByEnrollResult); @SuppressWarnings("unchecked") T notEqualToEnrollResult(CertificateEnrollmentEnrollResult filterByEnrollResult); void addEqualToEnrollResultFilter(CertificateEnrollmentEnrollResult filterByEnrollResult); @SuppressWarnings("unchecked") T equalToEnrollResult(CertificateEnrollmentEnrollResult filterByEnrollResult); List<Filter> getCreatedAtFilters(); void addLessThanCreatedAtFilter(Date filterByCreatedAt); @SuppressWarnings("unchecked") T lessThanCreatedAt(Date filterByCreatedAt); void addGreaterThanCreatedAtFilter(Date filterByCreatedAt); @SuppressWarnings("unchecked") T greaterThanCreatedAt(Date filterByCreatedAt); List<Filter> getEnrollStatusFilters(); void addNotEqualToEnrollStatusFilter(CertificateEnrollmentEnrollStatus filterByEnrollStatus); @SuppressWarnings("unchecked") T notEqualToEnrollStatus(CertificateEnrollmentEnrollStatus filterByEnrollStatus); void addEqualToEnrollStatusFilter(CertificateEnrollmentEnrollStatus filterByEnrollStatus); @SuppressWarnings("unchecked") T equalToEnrollStatus(CertificateEnrollmentEnrollStatus filterByEnrollStatus); @Override String toString(); @Override CertificateEnrollmentListOptions clone(); @Override boolean equals(Object obj); @Override @SuppressWarnings("PMD.UselessOverridingMethod") int hashCode(); } | CertificateEnrollmentListOptions extends ListOptions { @Override public CertificateEnrollmentListOptions clone() { final CertificateEnrollmentListOptions opt = new CertificateEnrollmentListOptions(); opt.setOptions(this); return opt; } @Internal CertificateEnrollmentListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal CertificateEnrollmentListOptions(CertificateEnrollmentListOptions certificateEnrollmentListOptions); CertificateEnrollmentListOptions(); @Internal CertificateEnrollmentListOptions(String after, Filters filter); List<Filter> getUpdatedAtFilters(); void addLessThanUpdatedAtFilter(Date filterByUpdatedAt); @SuppressWarnings("unchecked") T lessThanUpdatedAt(Date filterByUpdatedAt); void addGreaterThanUpdatedAtFilter(Date filterByUpdatedAt); @SuppressWarnings("unchecked") T greaterThanUpdatedAt(Date filterByUpdatedAt); List<Filter> getCertificateNameFilters(); void addEqualToCertificateNameFilter(String filterByCertificateName); @SuppressWarnings("unchecked") T equalToCertificateName(String filterByCertificateName); List<Filter> getDeviceIdFilters(); void addEqualToDeviceIdFilter(String filterByDeviceId); @SuppressWarnings("unchecked") T equalToDeviceId(String filterByDeviceId); List<Filter> getEnrollResultFilters(); void addNotEqualToEnrollResultFilter(CertificateEnrollmentEnrollResult filterByEnrollResult); @SuppressWarnings("unchecked") T notEqualToEnrollResult(CertificateEnrollmentEnrollResult filterByEnrollResult); void addEqualToEnrollResultFilter(CertificateEnrollmentEnrollResult filterByEnrollResult); @SuppressWarnings("unchecked") T equalToEnrollResult(CertificateEnrollmentEnrollResult filterByEnrollResult); List<Filter> getCreatedAtFilters(); void addLessThanCreatedAtFilter(Date filterByCreatedAt); @SuppressWarnings("unchecked") T lessThanCreatedAt(Date filterByCreatedAt); void addGreaterThanCreatedAtFilter(Date filterByCreatedAt); @SuppressWarnings("unchecked") T greaterThanCreatedAt(Date filterByCreatedAt); List<Filter> getEnrollStatusFilters(); void addNotEqualToEnrollStatusFilter(CertificateEnrollmentEnrollStatus filterByEnrollStatus); @SuppressWarnings("unchecked") T notEqualToEnrollStatus(CertificateEnrollmentEnrollStatus filterByEnrollStatus); void addEqualToEnrollStatusFilter(CertificateEnrollmentEnrollStatus filterByEnrollStatus); @SuppressWarnings("unchecked") T equalToEnrollStatus(CertificateEnrollmentEnrollStatus filterByEnrollStatus); @Override String toString(); @Override CertificateEnrollmentListOptions clone(); @Override boolean equals(Object obj); @Override @SuppressWarnings("PMD.UselessOverridingMethod") int hashCode(); static final String TAG_FILTER_BY_CERTIFICATE_NAME; static final String TAG_FILTER_BY_CREATED_AT; static final String TAG_FILTER_BY_DEVICE_ID; static final String TAG_FILTER_BY_ENROLL_RESULT; static final String TAG_FILTER_BY_ENROLL_STATUS; static final String TAG_FILTER_BY_UPDATED_AT; } |
@SuppressWarnings("resource") @Test public void testHashCode() { try { CertificateEnrollmentListOptions certificateenrollmentlistoptions1 = new CertificateEnrollmentListOptions(Integer.valueOf(58), Long.valueOf(40), Order.getDefault(), "a079c181-0afe-4474-a989-af61026abaab", null, null); CertificateEnrollmentListOptions certificateenrollmentlistoptions2 = new CertificateEnrollmentListOptions(Integer.valueOf(58), Long.valueOf(40), Order.getDefault(), "a079c181-0afe-4474-a989-af61026abaab", null, null); assertNotNull(certificateenrollmentlistoptions1); assertNotNull(certificateenrollmentlistoptions2); assertNotSame(certificateenrollmentlistoptions2, certificateenrollmentlistoptions1); assertEquals(certificateenrollmentlistoptions2, certificateenrollmentlistoptions1); assertEquals(certificateenrollmentlistoptions2.hashCode(), certificateenrollmentlistoptions1.hashCode()); int hashCode = certificateenrollmentlistoptions1.hashCode(); for (int i = 0; i < 5; i++) { assertEquals(hashCode, certificateenrollmentlistoptions1.hashCode()); } } catch (Exception exception) { fail(exception.getMessage()); } } | @Override @SuppressWarnings("PMD.UselessOverridingMethod") public int hashCode() { return super.hashCode(); } | CertificateEnrollmentListOptions extends ListOptions { @Override @SuppressWarnings("PMD.UselessOverridingMethod") public int hashCode() { return super.hashCode(); } } | CertificateEnrollmentListOptions extends ListOptions { @Override @SuppressWarnings("PMD.UselessOverridingMethod") public int hashCode() { return super.hashCode(); } @Internal CertificateEnrollmentListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal CertificateEnrollmentListOptions(CertificateEnrollmentListOptions certificateEnrollmentListOptions); CertificateEnrollmentListOptions(); @Internal CertificateEnrollmentListOptions(String after, Filters filter); } | CertificateEnrollmentListOptions extends ListOptions { @Override @SuppressWarnings("PMD.UselessOverridingMethod") public int hashCode() { return super.hashCode(); } @Internal CertificateEnrollmentListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal CertificateEnrollmentListOptions(CertificateEnrollmentListOptions certificateEnrollmentListOptions); CertificateEnrollmentListOptions(); @Internal CertificateEnrollmentListOptions(String after, Filters filter); List<Filter> getUpdatedAtFilters(); void addLessThanUpdatedAtFilter(Date filterByUpdatedAt); @SuppressWarnings("unchecked") T lessThanUpdatedAt(Date filterByUpdatedAt); void addGreaterThanUpdatedAtFilter(Date filterByUpdatedAt); @SuppressWarnings("unchecked") T greaterThanUpdatedAt(Date filterByUpdatedAt); List<Filter> getCertificateNameFilters(); void addEqualToCertificateNameFilter(String filterByCertificateName); @SuppressWarnings("unchecked") T equalToCertificateName(String filterByCertificateName); List<Filter> getDeviceIdFilters(); void addEqualToDeviceIdFilter(String filterByDeviceId); @SuppressWarnings("unchecked") T equalToDeviceId(String filterByDeviceId); List<Filter> getEnrollResultFilters(); void addNotEqualToEnrollResultFilter(CertificateEnrollmentEnrollResult filterByEnrollResult); @SuppressWarnings("unchecked") T notEqualToEnrollResult(CertificateEnrollmentEnrollResult filterByEnrollResult); void addEqualToEnrollResultFilter(CertificateEnrollmentEnrollResult filterByEnrollResult); @SuppressWarnings("unchecked") T equalToEnrollResult(CertificateEnrollmentEnrollResult filterByEnrollResult); List<Filter> getCreatedAtFilters(); void addLessThanCreatedAtFilter(Date filterByCreatedAt); @SuppressWarnings("unchecked") T lessThanCreatedAt(Date filterByCreatedAt); void addGreaterThanCreatedAtFilter(Date filterByCreatedAt); @SuppressWarnings("unchecked") T greaterThanCreatedAt(Date filterByCreatedAt); List<Filter> getEnrollStatusFilters(); void addNotEqualToEnrollStatusFilter(CertificateEnrollmentEnrollStatus filterByEnrollStatus); @SuppressWarnings("unchecked") T notEqualToEnrollStatus(CertificateEnrollmentEnrollStatus filterByEnrollStatus); void addEqualToEnrollStatusFilter(CertificateEnrollmentEnrollStatus filterByEnrollStatus); @SuppressWarnings("unchecked") T equalToEnrollStatus(CertificateEnrollmentEnrollStatus filterByEnrollStatus); @Override String toString(); @Override CertificateEnrollmentListOptions clone(); @Override boolean equals(Object obj); @Override @SuppressWarnings("PMD.UselessOverridingMethod") int hashCode(); } | CertificateEnrollmentListOptions extends ListOptions { @Override @SuppressWarnings("PMD.UselessOverridingMethod") public int hashCode() { return super.hashCode(); } @Internal CertificateEnrollmentListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal CertificateEnrollmentListOptions(CertificateEnrollmentListOptions certificateEnrollmentListOptions); CertificateEnrollmentListOptions(); @Internal CertificateEnrollmentListOptions(String after, Filters filter); List<Filter> getUpdatedAtFilters(); void addLessThanUpdatedAtFilter(Date filterByUpdatedAt); @SuppressWarnings("unchecked") T lessThanUpdatedAt(Date filterByUpdatedAt); void addGreaterThanUpdatedAtFilter(Date filterByUpdatedAt); @SuppressWarnings("unchecked") T greaterThanUpdatedAt(Date filterByUpdatedAt); List<Filter> getCertificateNameFilters(); void addEqualToCertificateNameFilter(String filterByCertificateName); @SuppressWarnings("unchecked") T equalToCertificateName(String filterByCertificateName); List<Filter> getDeviceIdFilters(); void addEqualToDeviceIdFilter(String filterByDeviceId); @SuppressWarnings("unchecked") T equalToDeviceId(String filterByDeviceId); List<Filter> getEnrollResultFilters(); void addNotEqualToEnrollResultFilter(CertificateEnrollmentEnrollResult filterByEnrollResult); @SuppressWarnings("unchecked") T notEqualToEnrollResult(CertificateEnrollmentEnrollResult filterByEnrollResult); void addEqualToEnrollResultFilter(CertificateEnrollmentEnrollResult filterByEnrollResult); @SuppressWarnings("unchecked") T equalToEnrollResult(CertificateEnrollmentEnrollResult filterByEnrollResult); List<Filter> getCreatedAtFilters(); void addLessThanCreatedAtFilter(Date filterByCreatedAt); @SuppressWarnings("unchecked") T lessThanCreatedAt(Date filterByCreatedAt); void addGreaterThanCreatedAtFilter(Date filterByCreatedAt); @SuppressWarnings("unchecked") T greaterThanCreatedAt(Date filterByCreatedAt); List<Filter> getEnrollStatusFilters(); void addNotEqualToEnrollStatusFilter(CertificateEnrollmentEnrollStatus filterByEnrollStatus); @SuppressWarnings("unchecked") T notEqualToEnrollStatus(CertificateEnrollmentEnrollStatus filterByEnrollStatus); void addEqualToEnrollStatusFilter(CertificateEnrollmentEnrollStatus filterByEnrollStatus); @SuppressWarnings("unchecked") T equalToEnrollStatus(CertificateEnrollmentEnrollStatus filterByEnrollStatus); @Override String toString(); @Override CertificateEnrollmentListOptions clone(); @Override boolean equals(Object obj); @Override @SuppressWarnings("PMD.UselessOverridingMethod") int hashCode(); static final String TAG_FILTER_BY_CERTIFICATE_NAME; static final String TAG_FILTER_BY_CREATED_AT; static final String TAG_FILTER_BY_DEVICE_ID; static final String TAG_FILTER_BY_ENROLL_RESULT; static final String TAG_FILTER_BY_ENROLL_STATUS; static final String TAG_FILTER_BY_UPDATED_AT; } |
@SuppressWarnings("resource") @Test public void testEquals() { try { CertificateEnrollmentListOptions certificateenrollmentlistoptions1 = new CertificateEnrollmentListOptions(Integer.valueOf(1), Long.valueOf(-38), Order.getDefault(), "4c2f0459-26a3-4bf3-930d-2cc2a4358b6e", null, null); CertificateEnrollmentListOptions certificateenrollmentlistoptions2 = new CertificateEnrollmentListOptions(Integer.valueOf(1), Long.valueOf(-38), Order.getDefault(), "4c2f0459-26a3-4bf3-930d-2cc2a4358b6e", null, null); CertificateEnrollmentListOptions certificateenrollmentlistoptions3 = new CertificateEnrollmentListOptions(Integer.valueOf(-127), Long.valueOf(59), Order.getDefault(), "befffe12-e706-430f-85f8-49a031b8334a", null, null); assertNotNull(certificateenrollmentlistoptions1); assertNotNull(certificateenrollmentlistoptions2); assertNotNull(certificateenrollmentlistoptions3); assertNotSame(certificateenrollmentlistoptions2, certificateenrollmentlistoptions1); assertNotSame(certificateenrollmentlistoptions3, certificateenrollmentlistoptions1); assertEquals(certificateenrollmentlistoptions2, certificateenrollmentlistoptions1); assertEquals(certificateenrollmentlistoptions2, certificateenrollmentlistoptions1); assertEquals(certificateenrollmentlistoptions1, certificateenrollmentlistoptions2); assertEquals(certificateenrollmentlistoptions1, certificateenrollmentlistoptions1); assertFalse(certificateenrollmentlistoptions1.equals(null)); assertNotEquals(certificateenrollmentlistoptions3, certificateenrollmentlistoptions1); } catch (Exception exception) { fail(exception.getMessage()); } } | @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!super.equals(obj)) { return false; } if (!(obj instanceof CertificateEnrollmentListOptions)) { return false; } final CertificateEnrollmentListOptions other = (CertificateEnrollmentListOptions) obj; if (!other.canEqual(this)) { return false; } return true; } | CertificateEnrollmentListOptions extends ListOptions { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!super.equals(obj)) { return false; } if (!(obj instanceof CertificateEnrollmentListOptions)) { return false; } final CertificateEnrollmentListOptions other = (CertificateEnrollmentListOptions) obj; if (!other.canEqual(this)) { return false; } return true; } } | CertificateEnrollmentListOptions extends ListOptions { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!super.equals(obj)) { return false; } if (!(obj instanceof CertificateEnrollmentListOptions)) { return false; } final CertificateEnrollmentListOptions other = (CertificateEnrollmentListOptions) obj; if (!other.canEqual(this)) { return false; } return true; } @Internal CertificateEnrollmentListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal CertificateEnrollmentListOptions(CertificateEnrollmentListOptions certificateEnrollmentListOptions); CertificateEnrollmentListOptions(); @Internal CertificateEnrollmentListOptions(String after, Filters filter); } | CertificateEnrollmentListOptions extends ListOptions { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!super.equals(obj)) { return false; } if (!(obj instanceof CertificateEnrollmentListOptions)) { return false; } final CertificateEnrollmentListOptions other = (CertificateEnrollmentListOptions) obj; if (!other.canEqual(this)) { return false; } return true; } @Internal CertificateEnrollmentListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal CertificateEnrollmentListOptions(CertificateEnrollmentListOptions certificateEnrollmentListOptions); CertificateEnrollmentListOptions(); @Internal CertificateEnrollmentListOptions(String after, Filters filter); List<Filter> getUpdatedAtFilters(); void addLessThanUpdatedAtFilter(Date filterByUpdatedAt); @SuppressWarnings("unchecked") T lessThanUpdatedAt(Date filterByUpdatedAt); void addGreaterThanUpdatedAtFilter(Date filterByUpdatedAt); @SuppressWarnings("unchecked") T greaterThanUpdatedAt(Date filterByUpdatedAt); List<Filter> getCertificateNameFilters(); void addEqualToCertificateNameFilter(String filterByCertificateName); @SuppressWarnings("unchecked") T equalToCertificateName(String filterByCertificateName); List<Filter> getDeviceIdFilters(); void addEqualToDeviceIdFilter(String filterByDeviceId); @SuppressWarnings("unchecked") T equalToDeviceId(String filterByDeviceId); List<Filter> getEnrollResultFilters(); void addNotEqualToEnrollResultFilter(CertificateEnrollmentEnrollResult filterByEnrollResult); @SuppressWarnings("unchecked") T notEqualToEnrollResult(CertificateEnrollmentEnrollResult filterByEnrollResult); void addEqualToEnrollResultFilter(CertificateEnrollmentEnrollResult filterByEnrollResult); @SuppressWarnings("unchecked") T equalToEnrollResult(CertificateEnrollmentEnrollResult filterByEnrollResult); List<Filter> getCreatedAtFilters(); void addLessThanCreatedAtFilter(Date filterByCreatedAt); @SuppressWarnings("unchecked") T lessThanCreatedAt(Date filterByCreatedAt); void addGreaterThanCreatedAtFilter(Date filterByCreatedAt); @SuppressWarnings("unchecked") T greaterThanCreatedAt(Date filterByCreatedAt); List<Filter> getEnrollStatusFilters(); void addNotEqualToEnrollStatusFilter(CertificateEnrollmentEnrollStatus filterByEnrollStatus); @SuppressWarnings("unchecked") T notEqualToEnrollStatus(CertificateEnrollmentEnrollStatus filterByEnrollStatus); void addEqualToEnrollStatusFilter(CertificateEnrollmentEnrollStatus filterByEnrollStatus); @SuppressWarnings("unchecked") T equalToEnrollStatus(CertificateEnrollmentEnrollStatus filterByEnrollStatus); @Override String toString(); @Override CertificateEnrollmentListOptions clone(); @Override boolean equals(Object obj); @Override @SuppressWarnings("PMD.UselessOverridingMethod") int hashCode(); } | CertificateEnrollmentListOptions extends ListOptions { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!super.equals(obj)) { return false; } if (!(obj instanceof CertificateEnrollmentListOptions)) { return false; } final CertificateEnrollmentListOptions other = (CertificateEnrollmentListOptions) obj; if (!other.canEqual(this)) { return false; } return true; } @Internal CertificateEnrollmentListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal CertificateEnrollmentListOptions(CertificateEnrollmentListOptions certificateEnrollmentListOptions); CertificateEnrollmentListOptions(); @Internal CertificateEnrollmentListOptions(String after, Filters filter); List<Filter> getUpdatedAtFilters(); void addLessThanUpdatedAtFilter(Date filterByUpdatedAt); @SuppressWarnings("unchecked") T lessThanUpdatedAt(Date filterByUpdatedAt); void addGreaterThanUpdatedAtFilter(Date filterByUpdatedAt); @SuppressWarnings("unchecked") T greaterThanUpdatedAt(Date filterByUpdatedAt); List<Filter> getCertificateNameFilters(); void addEqualToCertificateNameFilter(String filterByCertificateName); @SuppressWarnings("unchecked") T equalToCertificateName(String filterByCertificateName); List<Filter> getDeviceIdFilters(); void addEqualToDeviceIdFilter(String filterByDeviceId); @SuppressWarnings("unchecked") T equalToDeviceId(String filterByDeviceId); List<Filter> getEnrollResultFilters(); void addNotEqualToEnrollResultFilter(CertificateEnrollmentEnrollResult filterByEnrollResult); @SuppressWarnings("unchecked") T notEqualToEnrollResult(CertificateEnrollmentEnrollResult filterByEnrollResult); void addEqualToEnrollResultFilter(CertificateEnrollmentEnrollResult filterByEnrollResult); @SuppressWarnings("unchecked") T equalToEnrollResult(CertificateEnrollmentEnrollResult filterByEnrollResult); List<Filter> getCreatedAtFilters(); void addLessThanCreatedAtFilter(Date filterByCreatedAt); @SuppressWarnings("unchecked") T lessThanCreatedAt(Date filterByCreatedAt); void addGreaterThanCreatedAtFilter(Date filterByCreatedAt); @SuppressWarnings("unchecked") T greaterThanCreatedAt(Date filterByCreatedAt); List<Filter> getEnrollStatusFilters(); void addNotEqualToEnrollStatusFilter(CertificateEnrollmentEnrollStatus filterByEnrollStatus); @SuppressWarnings("unchecked") T notEqualToEnrollStatus(CertificateEnrollmentEnrollStatus filterByEnrollStatus); void addEqualToEnrollStatusFilter(CertificateEnrollmentEnrollStatus filterByEnrollStatus); @SuppressWarnings("unchecked") T equalToEnrollStatus(CertificateEnrollmentEnrollStatus filterByEnrollStatus); @Override String toString(); @Override CertificateEnrollmentListOptions clone(); @Override boolean equals(Object obj); @Override @SuppressWarnings("PMD.UselessOverridingMethod") int hashCode(); static final String TAG_FILTER_BY_CERTIFICATE_NAME; static final String TAG_FILTER_BY_CREATED_AT; static final String TAG_FILTER_BY_DEVICE_ID; static final String TAG_FILTER_BY_ENROLL_RESULT; static final String TAG_FILTER_BY_ENROLL_STATUS; static final String TAG_FILTER_BY_UPDATED_AT; } |
@SuppressWarnings("resource") @Test public void testClone() { try { SubtenantTrustedCertificateListOptions subtenanttrustedcertificatelistoptions1 = new SubtenantTrustedCertificateListOptions(Integer.valueOf(50), Long.valueOf(-30), Order.getDefault(), "23d23473-f6f1-4a08-a77d-a56d2983c571", null, null); SubtenantTrustedCertificateListOptions subtenanttrustedcertificatelistoptions2 = subtenanttrustedcertificatelistoptions1.clone(); assertNotNull(subtenanttrustedcertificatelistoptions1); assertNotNull(subtenanttrustedcertificatelistoptions2); assertNotSame(subtenanttrustedcertificatelistoptions2, subtenanttrustedcertificatelistoptions1); assertEquals(subtenanttrustedcertificatelistoptions2, subtenanttrustedcertificatelistoptions1); } catch (Exception exception) { fail(exception.getMessage()); } } | @Override public SubtenantTrustedCertificateListOptions clone() { final SubtenantTrustedCertificateListOptions opt = new SubtenantTrustedCertificateListOptions(); opt.setOptions(this); return opt; } | SubtenantTrustedCertificateListOptions extends ListOptions { @Override public SubtenantTrustedCertificateListOptions clone() { final SubtenantTrustedCertificateListOptions opt = new SubtenantTrustedCertificateListOptions(); opt.setOptions(this); return opt; } } | SubtenantTrustedCertificateListOptions extends ListOptions { @Override public SubtenantTrustedCertificateListOptions clone() { final SubtenantTrustedCertificateListOptions opt = new SubtenantTrustedCertificateListOptions(); opt.setOptions(this); return opt; } @Internal SubtenantTrustedCertificateListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal SubtenantTrustedCertificateListOptions(SubtenantTrustedCertificateListOptions subtenantTrustedCertificateListOptions); SubtenantTrustedCertificateListOptions(); @Internal SubtenantTrustedCertificateListOptions(String after, Filters filter); } | SubtenantTrustedCertificateListOptions extends ListOptions { @Override public SubtenantTrustedCertificateListOptions clone() { final SubtenantTrustedCertificateListOptions opt = new SubtenantTrustedCertificateListOptions(); opt.setOptions(this); return opt; } @Internal SubtenantTrustedCertificateListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal SubtenantTrustedCertificateListOptions(SubtenantTrustedCertificateListOptions subtenantTrustedCertificateListOptions); SubtenantTrustedCertificateListOptions(); @Internal SubtenantTrustedCertificateListOptions(String after, Filters filter); List<Filter> getValidFilters(); void addEqualToValidFilter(boolean filterByValid); @SuppressWarnings("unchecked") T equalToValid(boolean filterByValid); List<Filter> getNameFilters(); void addEqualToNameFilter(String filterByName); @SuppressWarnings("unchecked") T equalToName(String filterByName); List<Filter> getStatusFilters(); void addEqualToStatusFilter(SubtenantTrustedCertificateStatus filterByStatus); @SuppressWarnings("unchecked") T equalToStatus(SubtenantTrustedCertificateStatus filterByStatus); List<Filter> getDeviceExecutionModeFilters(); void addEqualToDeviceExecutionModeFilter(int filterByDeviceExecutionMode); @SuppressWarnings("unchecked") T equalToDeviceExecutionMode(int filterByDeviceExecutionMode); void addNotEqualToDeviceExecutionModeFilter(int filterByDeviceExecutionMode); @SuppressWarnings("unchecked") T notEqualToDeviceExecutionMode(int filterByDeviceExecutionMode); List<Filter> getIssuerFilters(); void addLikeIssuerFilter(String filterByIssuer); @SuppressWarnings("unchecked") T likeIssuer(String filterByIssuer); List<Filter> getServiceFilters(); void addEqualToServiceFilter(SubtenantTrustedCertificateService filterByService); @SuppressWarnings("unchecked") T equalToService(SubtenantTrustedCertificateService filterByService); List<Filter> getSubjectFilters(); void addLikeSubjectFilter(String filterBySubject); @SuppressWarnings("unchecked") T likeSubject(String filterBySubject); List<Filter> getEnrollmentModeFilters(); void addEqualToEnrollmentModeFilter(boolean filterByEnrollmentMode); @SuppressWarnings("unchecked") T equalToEnrollmentMode(boolean filterByEnrollmentMode); @Override String toString(); @Override SubtenantTrustedCertificateListOptions clone(); @Override boolean equals(Object obj); @Override @SuppressWarnings("PMD.UselessOverridingMethod") int hashCode(); } | SubtenantTrustedCertificateListOptions extends ListOptions { @Override public SubtenantTrustedCertificateListOptions clone() { final SubtenantTrustedCertificateListOptions opt = new SubtenantTrustedCertificateListOptions(); opt.setOptions(this); return opt; } @Internal SubtenantTrustedCertificateListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal SubtenantTrustedCertificateListOptions(SubtenantTrustedCertificateListOptions subtenantTrustedCertificateListOptions); SubtenantTrustedCertificateListOptions(); @Internal SubtenantTrustedCertificateListOptions(String after, Filters filter); List<Filter> getValidFilters(); void addEqualToValidFilter(boolean filterByValid); @SuppressWarnings("unchecked") T equalToValid(boolean filterByValid); List<Filter> getNameFilters(); void addEqualToNameFilter(String filterByName); @SuppressWarnings("unchecked") T equalToName(String filterByName); List<Filter> getStatusFilters(); void addEqualToStatusFilter(SubtenantTrustedCertificateStatus filterByStatus); @SuppressWarnings("unchecked") T equalToStatus(SubtenantTrustedCertificateStatus filterByStatus); List<Filter> getDeviceExecutionModeFilters(); void addEqualToDeviceExecutionModeFilter(int filterByDeviceExecutionMode); @SuppressWarnings("unchecked") T equalToDeviceExecutionMode(int filterByDeviceExecutionMode); void addNotEqualToDeviceExecutionModeFilter(int filterByDeviceExecutionMode); @SuppressWarnings("unchecked") T notEqualToDeviceExecutionMode(int filterByDeviceExecutionMode); List<Filter> getIssuerFilters(); void addLikeIssuerFilter(String filterByIssuer); @SuppressWarnings("unchecked") T likeIssuer(String filterByIssuer); List<Filter> getServiceFilters(); void addEqualToServiceFilter(SubtenantTrustedCertificateService filterByService); @SuppressWarnings("unchecked") T equalToService(SubtenantTrustedCertificateService filterByService); List<Filter> getSubjectFilters(); void addLikeSubjectFilter(String filterBySubject); @SuppressWarnings("unchecked") T likeSubject(String filterBySubject); List<Filter> getEnrollmentModeFilters(); void addEqualToEnrollmentModeFilter(boolean filterByEnrollmentMode); @SuppressWarnings("unchecked") T equalToEnrollmentMode(boolean filterByEnrollmentMode); @Override String toString(); @Override SubtenantTrustedCertificateListOptions clone(); @Override boolean equals(Object obj); @Override @SuppressWarnings("PMD.UselessOverridingMethod") int hashCode(); static final String TAG_FILTER_BY_DEVICE_EXECUTION_MODE; static final String TAG_FILTER_BY_ENROLLMENT_MODE; static final String TAG_FILTER_BY_ISSUER; static final String TAG_FILTER_BY_NAME; static final String TAG_FILTER_BY_SERVICE; static final String TAG_FILTER_BY_STATUS; static final String TAG_FILTER_BY_SUBJECT; static final String TAG_FILTER_BY_VALID; } |
@SuppressWarnings("resource") @Test public void testHashCode() { try { SubtenantTrustedCertificateListOptions subtenanttrustedcertificatelistoptions1 = new SubtenantTrustedCertificateListOptions(Integer.valueOf(38), Long.valueOf(79), Order.getDefault(), "f2d79052-cdeb-468c-81c9-c72f1883423c", null, null); SubtenantTrustedCertificateListOptions subtenanttrustedcertificatelistoptions2 = new SubtenantTrustedCertificateListOptions(Integer.valueOf(38), Long.valueOf(79), Order.getDefault(), "f2d79052-cdeb-468c-81c9-c72f1883423c", null, null); assertNotNull(subtenanttrustedcertificatelistoptions1); assertNotNull(subtenanttrustedcertificatelistoptions2); assertNotSame(subtenanttrustedcertificatelistoptions2, subtenanttrustedcertificatelistoptions1); assertEquals(subtenanttrustedcertificatelistoptions2, subtenanttrustedcertificatelistoptions1); assertEquals(subtenanttrustedcertificatelistoptions2.hashCode(), subtenanttrustedcertificatelistoptions1.hashCode()); int hashCode = subtenanttrustedcertificatelistoptions1.hashCode(); for (int i = 0; i < 5; i++) { assertEquals(hashCode, subtenanttrustedcertificatelistoptions1.hashCode()); } } catch (Exception exception) { fail(exception.getMessage()); } } | @Override @SuppressWarnings("PMD.UselessOverridingMethod") public int hashCode() { return super.hashCode(); } | SubtenantTrustedCertificateListOptions extends ListOptions { @Override @SuppressWarnings("PMD.UselessOverridingMethod") public int hashCode() { return super.hashCode(); } } | SubtenantTrustedCertificateListOptions extends ListOptions { @Override @SuppressWarnings("PMD.UselessOverridingMethod") public int hashCode() { return super.hashCode(); } @Internal SubtenantTrustedCertificateListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal SubtenantTrustedCertificateListOptions(SubtenantTrustedCertificateListOptions subtenantTrustedCertificateListOptions); SubtenantTrustedCertificateListOptions(); @Internal SubtenantTrustedCertificateListOptions(String after, Filters filter); } | SubtenantTrustedCertificateListOptions extends ListOptions { @Override @SuppressWarnings("PMD.UselessOverridingMethod") public int hashCode() { return super.hashCode(); } @Internal SubtenantTrustedCertificateListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal SubtenantTrustedCertificateListOptions(SubtenantTrustedCertificateListOptions subtenantTrustedCertificateListOptions); SubtenantTrustedCertificateListOptions(); @Internal SubtenantTrustedCertificateListOptions(String after, Filters filter); List<Filter> getValidFilters(); void addEqualToValidFilter(boolean filterByValid); @SuppressWarnings("unchecked") T equalToValid(boolean filterByValid); List<Filter> getNameFilters(); void addEqualToNameFilter(String filterByName); @SuppressWarnings("unchecked") T equalToName(String filterByName); List<Filter> getStatusFilters(); void addEqualToStatusFilter(SubtenantTrustedCertificateStatus filterByStatus); @SuppressWarnings("unchecked") T equalToStatus(SubtenantTrustedCertificateStatus filterByStatus); List<Filter> getDeviceExecutionModeFilters(); void addEqualToDeviceExecutionModeFilter(int filterByDeviceExecutionMode); @SuppressWarnings("unchecked") T equalToDeviceExecutionMode(int filterByDeviceExecutionMode); void addNotEqualToDeviceExecutionModeFilter(int filterByDeviceExecutionMode); @SuppressWarnings("unchecked") T notEqualToDeviceExecutionMode(int filterByDeviceExecutionMode); List<Filter> getIssuerFilters(); void addLikeIssuerFilter(String filterByIssuer); @SuppressWarnings("unchecked") T likeIssuer(String filterByIssuer); List<Filter> getServiceFilters(); void addEqualToServiceFilter(SubtenantTrustedCertificateService filterByService); @SuppressWarnings("unchecked") T equalToService(SubtenantTrustedCertificateService filterByService); List<Filter> getSubjectFilters(); void addLikeSubjectFilter(String filterBySubject); @SuppressWarnings("unchecked") T likeSubject(String filterBySubject); List<Filter> getEnrollmentModeFilters(); void addEqualToEnrollmentModeFilter(boolean filterByEnrollmentMode); @SuppressWarnings("unchecked") T equalToEnrollmentMode(boolean filterByEnrollmentMode); @Override String toString(); @Override SubtenantTrustedCertificateListOptions clone(); @Override boolean equals(Object obj); @Override @SuppressWarnings("PMD.UselessOverridingMethod") int hashCode(); } | SubtenantTrustedCertificateListOptions extends ListOptions { @Override @SuppressWarnings("PMD.UselessOverridingMethod") public int hashCode() { return super.hashCode(); } @Internal SubtenantTrustedCertificateListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal SubtenantTrustedCertificateListOptions(SubtenantTrustedCertificateListOptions subtenantTrustedCertificateListOptions); SubtenantTrustedCertificateListOptions(); @Internal SubtenantTrustedCertificateListOptions(String after, Filters filter); List<Filter> getValidFilters(); void addEqualToValidFilter(boolean filterByValid); @SuppressWarnings("unchecked") T equalToValid(boolean filterByValid); List<Filter> getNameFilters(); void addEqualToNameFilter(String filterByName); @SuppressWarnings("unchecked") T equalToName(String filterByName); List<Filter> getStatusFilters(); void addEqualToStatusFilter(SubtenantTrustedCertificateStatus filterByStatus); @SuppressWarnings("unchecked") T equalToStatus(SubtenantTrustedCertificateStatus filterByStatus); List<Filter> getDeviceExecutionModeFilters(); void addEqualToDeviceExecutionModeFilter(int filterByDeviceExecutionMode); @SuppressWarnings("unchecked") T equalToDeviceExecutionMode(int filterByDeviceExecutionMode); void addNotEqualToDeviceExecutionModeFilter(int filterByDeviceExecutionMode); @SuppressWarnings("unchecked") T notEqualToDeviceExecutionMode(int filterByDeviceExecutionMode); List<Filter> getIssuerFilters(); void addLikeIssuerFilter(String filterByIssuer); @SuppressWarnings("unchecked") T likeIssuer(String filterByIssuer); List<Filter> getServiceFilters(); void addEqualToServiceFilter(SubtenantTrustedCertificateService filterByService); @SuppressWarnings("unchecked") T equalToService(SubtenantTrustedCertificateService filterByService); List<Filter> getSubjectFilters(); void addLikeSubjectFilter(String filterBySubject); @SuppressWarnings("unchecked") T likeSubject(String filterBySubject); List<Filter> getEnrollmentModeFilters(); void addEqualToEnrollmentModeFilter(boolean filterByEnrollmentMode); @SuppressWarnings("unchecked") T equalToEnrollmentMode(boolean filterByEnrollmentMode); @Override String toString(); @Override SubtenantTrustedCertificateListOptions clone(); @Override boolean equals(Object obj); @Override @SuppressWarnings("PMD.UselessOverridingMethod") int hashCode(); static final String TAG_FILTER_BY_DEVICE_EXECUTION_MODE; static final String TAG_FILTER_BY_ENROLLMENT_MODE; static final String TAG_FILTER_BY_ISSUER; static final String TAG_FILTER_BY_NAME; static final String TAG_FILTER_BY_SERVICE; static final String TAG_FILTER_BY_STATUS; static final String TAG_FILTER_BY_SUBJECT; static final String TAG_FILTER_BY_VALID; } |
@SuppressWarnings("resource") @Test public void testEquals() { try { SubtenantTrustedCertificateListOptions subtenanttrustedcertificatelistoptions1 = new SubtenantTrustedCertificateListOptions(Integer.valueOf(65), Long.valueOf(61), Order.getDefault(), "6646edc5-d533-4033-b553-763fb25382fd", null, null); SubtenantTrustedCertificateListOptions subtenanttrustedcertificatelistoptions2 = new SubtenantTrustedCertificateListOptions(Integer.valueOf(65), Long.valueOf(61), Order.getDefault(), "6646edc5-d533-4033-b553-763fb25382fd", null, null); SubtenantTrustedCertificateListOptions subtenanttrustedcertificatelistoptions3 = new SubtenantTrustedCertificateListOptions(Integer.valueOf(-9), Long.valueOf(79), Order.getDefault(), "0a4a71de-968f-49dd-8f4c-bc2efa782cd7", null, null); assertNotNull(subtenanttrustedcertificatelistoptions1); assertNotNull(subtenanttrustedcertificatelistoptions2); assertNotNull(subtenanttrustedcertificatelistoptions3); assertNotSame(subtenanttrustedcertificatelistoptions2, subtenanttrustedcertificatelistoptions1); assertNotSame(subtenanttrustedcertificatelistoptions3, subtenanttrustedcertificatelistoptions1); assertEquals(subtenanttrustedcertificatelistoptions2, subtenanttrustedcertificatelistoptions1); assertEquals(subtenanttrustedcertificatelistoptions2, subtenanttrustedcertificatelistoptions1); assertEquals(subtenanttrustedcertificatelistoptions1, subtenanttrustedcertificatelistoptions2); assertEquals(subtenanttrustedcertificatelistoptions1, subtenanttrustedcertificatelistoptions1); assertFalse(subtenanttrustedcertificatelistoptions1.equals(null)); assertNotEquals(subtenanttrustedcertificatelistoptions3, subtenanttrustedcertificatelistoptions1); } catch (Exception exception) { fail(exception.getMessage()); } } | @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!super.equals(obj)) { return false; } if (!(obj instanceof SubtenantTrustedCertificateListOptions)) { return false; } final SubtenantTrustedCertificateListOptions other = (SubtenantTrustedCertificateListOptions) obj; if (!other.canEqual(this)) { return false; } return true; } | SubtenantTrustedCertificateListOptions extends ListOptions { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!super.equals(obj)) { return false; } if (!(obj instanceof SubtenantTrustedCertificateListOptions)) { return false; } final SubtenantTrustedCertificateListOptions other = (SubtenantTrustedCertificateListOptions) obj; if (!other.canEqual(this)) { return false; } return true; } } | SubtenantTrustedCertificateListOptions extends ListOptions { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!super.equals(obj)) { return false; } if (!(obj instanceof SubtenantTrustedCertificateListOptions)) { return false; } final SubtenantTrustedCertificateListOptions other = (SubtenantTrustedCertificateListOptions) obj; if (!other.canEqual(this)) { return false; } return true; } @Internal SubtenantTrustedCertificateListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal SubtenantTrustedCertificateListOptions(SubtenantTrustedCertificateListOptions subtenantTrustedCertificateListOptions); SubtenantTrustedCertificateListOptions(); @Internal SubtenantTrustedCertificateListOptions(String after, Filters filter); } | SubtenantTrustedCertificateListOptions extends ListOptions { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!super.equals(obj)) { return false; } if (!(obj instanceof SubtenantTrustedCertificateListOptions)) { return false; } final SubtenantTrustedCertificateListOptions other = (SubtenantTrustedCertificateListOptions) obj; if (!other.canEqual(this)) { return false; } return true; } @Internal SubtenantTrustedCertificateListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal SubtenantTrustedCertificateListOptions(SubtenantTrustedCertificateListOptions subtenantTrustedCertificateListOptions); SubtenantTrustedCertificateListOptions(); @Internal SubtenantTrustedCertificateListOptions(String after, Filters filter); List<Filter> getValidFilters(); void addEqualToValidFilter(boolean filterByValid); @SuppressWarnings("unchecked") T equalToValid(boolean filterByValid); List<Filter> getNameFilters(); void addEqualToNameFilter(String filterByName); @SuppressWarnings("unchecked") T equalToName(String filterByName); List<Filter> getStatusFilters(); void addEqualToStatusFilter(SubtenantTrustedCertificateStatus filterByStatus); @SuppressWarnings("unchecked") T equalToStatus(SubtenantTrustedCertificateStatus filterByStatus); List<Filter> getDeviceExecutionModeFilters(); void addEqualToDeviceExecutionModeFilter(int filterByDeviceExecutionMode); @SuppressWarnings("unchecked") T equalToDeviceExecutionMode(int filterByDeviceExecutionMode); void addNotEqualToDeviceExecutionModeFilter(int filterByDeviceExecutionMode); @SuppressWarnings("unchecked") T notEqualToDeviceExecutionMode(int filterByDeviceExecutionMode); List<Filter> getIssuerFilters(); void addLikeIssuerFilter(String filterByIssuer); @SuppressWarnings("unchecked") T likeIssuer(String filterByIssuer); List<Filter> getServiceFilters(); void addEqualToServiceFilter(SubtenantTrustedCertificateService filterByService); @SuppressWarnings("unchecked") T equalToService(SubtenantTrustedCertificateService filterByService); List<Filter> getSubjectFilters(); void addLikeSubjectFilter(String filterBySubject); @SuppressWarnings("unchecked") T likeSubject(String filterBySubject); List<Filter> getEnrollmentModeFilters(); void addEqualToEnrollmentModeFilter(boolean filterByEnrollmentMode); @SuppressWarnings("unchecked") T equalToEnrollmentMode(boolean filterByEnrollmentMode); @Override String toString(); @Override SubtenantTrustedCertificateListOptions clone(); @Override boolean equals(Object obj); @Override @SuppressWarnings("PMD.UselessOverridingMethod") int hashCode(); } | SubtenantTrustedCertificateListOptions extends ListOptions { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!super.equals(obj)) { return false; } if (!(obj instanceof SubtenantTrustedCertificateListOptions)) { return false; } final SubtenantTrustedCertificateListOptions other = (SubtenantTrustedCertificateListOptions) obj; if (!other.canEqual(this)) { return false; } return true; } @Internal SubtenantTrustedCertificateListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal SubtenantTrustedCertificateListOptions(SubtenantTrustedCertificateListOptions subtenantTrustedCertificateListOptions); SubtenantTrustedCertificateListOptions(); @Internal SubtenantTrustedCertificateListOptions(String after, Filters filter); List<Filter> getValidFilters(); void addEqualToValidFilter(boolean filterByValid); @SuppressWarnings("unchecked") T equalToValid(boolean filterByValid); List<Filter> getNameFilters(); void addEqualToNameFilter(String filterByName); @SuppressWarnings("unchecked") T equalToName(String filterByName); List<Filter> getStatusFilters(); void addEqualToStatusFilter(SubtenantTrustedCertificateStatus filterByStatus); @SuppressWarnings("unchecked") T equalToStatus(SubtenantTrustedCertificateStatus filterByStatus); List<Filter> getDeviceExecutionModeFilters(); void addEqualToDeviceExecutionModeFilter(int filterByDeviceExecutionMode); @SuppressWarnings("unchecked") T equalToDeviceExecutionMode(int filterByDeviceExecutionMode); void addNotEqualToDeviceExecutionModeFilter(int filterByDeviceExecutionMode); @SuppressWarnings("unchecked") T notEqualToDeviceExecutionMode(int filterByDeviceExecutionMode); List<Filter> getIssuerFilters(); void addLikeIssuerFilter(String filterByIssuer); @SuppressWarnings("unchecked") T likeIssuer(String filterByIssuer); List<Filter> getServiceFilters(); void addEqualToServiceFilter(SubtenantTrustedCertificateService filterByService); @SuppressWarnings("unchecked") T equalToService(SubtenantTrustedCertificateService filterByService); List<Filter> getSubjectFilters(); void addLikeSubjectFilter(String filterBySubject); @SuppressWarnings("unchecked") T likeSubject(String filterBySubject); List<Filter> getEnrollmentModeFilters(); void addEqualToEnrollmentModeFilter(boolean filterByEnrollmentMode); @SuppressWarnings("unchecked") T equalToEnrollmentMode(boolean filterByEnrollmentMode); @Override String toString(); @Override SubtenantTrustedCertificateListOptions clone(); @Override boolean equals(Object obj); @Override @SuppressWarnings("PMD.UselessOverridingMethod") int hashCode(); static final String TAG_FILTER_BY_DEVICE_EXECUTION_MODE; static final String TAG_FILTER_BY_ENROLLMENT_MODE; static final String TAG_FILTER_BY_ISSUER; static final String TAG_FILTER_BY_NAME; static final String TAG_FILTER_BY_SERVICE; static final String TAG_FILTER_BY_STATUS; static final String TAG_FILTER_BY_SUBJECT; static final String TAG_FILTER_BY_VALID; } |
@SuppressWarnings("resource") @Test public void testClone() { try { CertificateEnrollmentDao certificateenrollmentdao1 = new CertificateEnrollmentDao(); CertificateEnrollmentDao certificateenrollmentdao2 = certificateenrollmentdao1.clone(); assertNotNull(certificateenrollmentdao1); assertNotNull(certificateenrollmentdao2); assertNotSame(certificateenrollmentdao2, certificateenrollmentdao1); assertEquals(certificateenrollmentdao2, certificateenrollmentdao1); } catch (Exception exception) { fail(exception.getMessage()); } } | @Override @SuppressWarnings({ "resource", "unused" }) public CertificateEnrollmentDao clone() { try { return new CertificateEnrollmentDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } | CertificateEnrollmentDao extends AbstractModelDao<CertificateEnrollment> implements ReadDao<CertificateEnrollment> { @Override @SuppressWarnings({ "resource", "unused" }) public CertificateEnrollmentDao clone() { try { return new CertificateEnrollmentDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } } | CertificateEnrollmentDao extends AbstractModelDao<CertificateEnrollment> implements ReadDao<CertificateEnrollment> { @Override @SuppressWarnings({ "resource", "unused" }) public CertificateEnrollmentDao clone() { try { return new CertificateEnrollmentDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } CertificateEnrollmentDao(); CertificateEnrollmentDao(ApiClientWrapper client); CertificateEnrollmentDao(ConnectionOptions options); CertificateEnrollmentDao(SdkContext sdkContext); } | CertificateEnrollmentDao extends AbstractModelDao<CertificateEnrollment> implements ReadDao<CertificateEnrollment> { @Override @SuppressWarnings({ "resource", "unused" }) public CertificateEnrollmentDao clone() { try { return new CertificateEnrollmentDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } CertificateEnrollmentDao(); CertificateEnrollmentDao(ApiClientWrapper client); CertificateEnrollmentDao(ConnectionOptions options); CertificateEnrollmentDao(SdkContext sdkContext); @Override @SuppressWarnings({ "resource", "unused" }) CertificateEnrollmentDao clone(); @Override CertificateEnrollment read(); CertificateEnrollment read(@NonNull CertificateEnrollment certificateEnrollment); @Override CertificateEnrollment read(@NonNull String id); } | CertificateEnrollmentDao extends AbstractModelDao<CertificateEnrollment> implements ReadDao<CertificateEnrollment> { @Override @SuppressWarnings({ "resource", "unused" }) public CertificateEnrollmentDao clone() { try { return new CertificateEnrollmentDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } CertificateEnrollmentDao(); CertificateEnrollmentDao(ApiClientWrapper client); CertificateEnrollmentDao(ConnectionOptions options); CertificateEnrollmentDao(SdkContext sdkContext); @Override @SuppressWarnings({ "resource", "unused" }) CertificateEnrollmentDao clone(); @Override CertificateEnrollment read(); CertificateEnrollment read(@NonNull CertificateEnrollment certificateEnrollment); @Override CertificateEnrollment read(@NonNull String id); } |
@SuppressWarnings("resource") @Test public void testClone() { try { PreSharedKeyDao presharedkeydao1 = new PreSharedKeyDao(); PreSharedKeyDao presharedkeydao2 = presharedkeydao1.clone(); assertNotNull(presharedkeydao1); assertNotNull(presharedkeydao2); assertNotSame(presharedkeydao2, presharedkeydao1); assertEquals(presharedkeydao2, presharedkeydao1); } catch (Exception exception) { fail(exception.getMessage()); } } | @Override @SuppressWarnings({ "resource", "unused" }) public PreSharedKeyDao clone() { try { return new PreSharedKeyDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } | PreSharedKeyDao extends AbstractPreSharedKeyDao { @Override @SuppressWarnings({ "resource", "unused" }) public PreSharedKeyDao clone() { try { return new PreSharedKeyDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } } | PreSharedKeyDao extends AbstractPreSharedKeyDao { @Override @SuppressWarnings({ "resource", "unused" }) public PreSharedKeyDao clone() { try { return new PreSharedKeyDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } PreSharedKeyDao(); PreSharedKeyDao(ApiClientWrapper client); PreSharedKeyDao(ConnectionOptions options); PreSharedKeyDao(SdkContext sdkContext); } | PreSharedKeyDao extends AbstractPreSharedKeyDao { @Override @SuppressWarnings({ "resource", "unused" }) public PreSharedKeyDao clone() { try { return new PreSharedKeyDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } PreSharedKeyDao(); PreSharedKeyDao(ApiClientWrapper client); PreSharedKeyDao(ConnectionOptions options); PreSharedKeyDao(SdkContext sdkContext); @Override @SuppressWarnings({ "resource", "unused" }) PreSharedKeyDao clone(); @Override @NotImplemented PreSharedKey create(); @Override @NotImplemented PreSharedKey create(PreSharedKey modelToCreate); void create(PreSharedKey modelToCreate, @NonNull String secretHex); @Override @NotImplemented void delete(PreSharedKey modelToDelete); } | PreSharedKeyDao extends AbstractPreSharedKeyDao { @Override @SuppressWarnings({ "resource", "unused" }) public PreSharedKeyDao clone() { try { return new PreSharedKeyDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } PreSharedKeyDao(); PreSharedKeyDao(ApiClientWrapper client); PreSharedKeyDao(ConnectionOptions options); PreSharedKeyDao(SdkContext sdkContext); @Override @SuppressWarnings({ "resource", "unused" }) PreSharedKeyDao clone(); @Override @NotImplemented PreSharedKey create(); @Override @NotImplemented PreSharedKey create(PreSharedKey modelToCreate); void create(PreSharedKey modelToCreate, @NonNull String secretHex); @Override @NotImplemented void delete(PreSharedKey modelToDelete); } |
@SuppressWarnings("resource") @Test public void testClone() { try { CertificateEnrollmentListDao certificateenrollmentlistdao1 = new CertificateEnrollmentListDao(); CertificateEnrollmentListDao certificateenrollmentlistdao2 = certificateenrollmentlistdao1.clone(); assertNotNull(certificateenrollmentlistdao1); assertNotNull(certificateenrollmentlistdao2); assertNotSame(certificateenrollmentlistdao2, certificateenrollmentlistdao1); assertEquals(certificateenrollmentlistdao2, certificateenrollmentlistdao1); } catch (Exception exception) { fail(exception.getMessage()); } } | @Override @SuppressWarnings({ "resource", "unused" }) public CertificateEnrollmentListDao clone() { try { return new CertificateEnrollmentListDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } | CertificateEnrollmentListDao extends
AbstractModelListDao<CertificateEnrollment, CertificateEnrollmentListOptions> implements
ModelListDao<CertificateEnrollment, CertificateEnrollmentListOptions> { @Override @SuppressWarnings({ "resource", "unused" }) public CertificateEnrollmentListDao clone() { try { return new CertificateEnrollmentListDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } } | CertificateEnrollmentListDao extends
AbstractModelListDao<CertificateEnrollment, CertificateEnrollmentListOptions> implements
ModelListDao<CertificateEnrollment, CertificateEnrollmentListOptions> { @Override @SuppressWarnings({ "resource", "unused" }) public CertificateEnrollmentListDao clone() { try { return new CertificateEnrollmentListDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } CertificateEnrollmentListDao(); CertificateEnrollmentListDao(ApiClientWrapper client); CertificateEnrollmentListDao(ConnectionOptions options); CertificateEnrollmentListDao(SdkContext sdkContext); } | CertificateEnrollmentListDao extends
AbstractModelListDao<CertificateEnrollment, CertificateEnrollmentListOptions> implements
ModelListDao<CertificateEnrollment, CertificateEnrollmentListOptions> { @Override @SuppressWarnings({ "resource", "unused" }) public CertificateEnrollmentListDao clone() { try { return new CertificateEnrollmentListDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } CertificateEnrollmentListDao(); CertificateEnrollmentListDao(ApiClientWrapper client); CertificateEnrollmentListDao(ConnectionOptions options); CertificateEnrollmentListDao(SdkContext sdkContext); @Override @SuppressWarnings({ "resource", "unused" }) CertificateEnrollmentListDao clone(); @Override @Internal @SuppressWarnings("unchecked") Class<CertificateEnrollmentDao> getModelDaoClass(); @Override @Internal @SuppressWarnings({ "unchecked", "resource" }) CertificateEnrollmentDao getNewModelDao(); } | CertificateEnrollmentListDao extends
AbstractModelListDao<CertificateEnrollment, CertificateEnrollmentListOptions> implements
ModelListDao<CertificateEnrollment, CertificateEnrollmentListOptions> { @Override @SuppressWarnings({ "resource", "unused" }) public CertificateEnrollmentListDao clone() { try { return new CertificateEnrollmentListDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } CertificateEnrollmentListDao(); CertificateEnrollmentListDao(ApiClientWrapper client); CertificateEnrollmentListDao(ConnectionOptions options); CertificateEnrollmentListDao(SdkContext sdkContext); @Override @SuppressWarnings({ "resource", "unused" }) CertificateEnrollmentListDao clone(); @Override @Internal @SuppressWarnings("unchecked") Class<CertificateEnrollmentDao> getModelDaoClass(); @Override @Internal @SuppressWarnings({ "unchecked", "resource" }) CertificateEnrollmentDao getNewModelDao(); } |
@SuppressWarnings("resource") @Test public void testClone() { try { CertificateIssuerConfigListDao certificateissuerconfiglistdao1 = new CertificateIssuerConfigListDao(); CertificateIssuerConfigListDao certificateissuerconfiglistdao2 = certificateissuerconfiglistdao1.clone(); assertNotNull(certificateissuerconfiglistdao1); assertNotNull(certificateissuerconfiglistdao2); assertNotSame(certificateissuerconfiglistdao2, certificateissuerconfiglistdao1); assertEquals(certificateissuerconfiglistdao2, certificateissuerconfiglistdao1); } catch (Exception exception) { fail(exception.getMessage()); } } | @Override @SuppressWarnings({ "resource", "unused" }) public CertificateIssuerConfigListDao clone() { try { return new CertificateIssuerConfigListDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } | CertificateIssuerConfigListDao extends
AbstractModelListDao<CertificateIssuerConfig,
CertificateIssuerConfigListOptions> implements
ModelListDao<CertificateIssuerConfig, CertificateIssuerConfigListOptions> { @Override @SuppressWarnings({ "resource", "unused" }) public CertificateIssuerConfigListDao clone() { try { return new CertificateIssuerConfigListDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } } | CertificateIssuerConfigListDao extends
AbstractModelListDao<CertificateIssuerConfig,
CertificateIssuerConfigListOptions> implements
ModelListDao<CertificateIssuerConfig, CertificateIssuerConfigListOptions> { @Override @SuppressWarnings({ "resource", "unused" }) public CertificateIssuerConfigListDao clone() { try { return new CertificateIssuerConfigListDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } CertificateIssuerConfigListDao(); CertificateIssuerConfigListDao(ApiClientWrapper client); CertificateIssuerConfigListDao(ConnectionOptions options); CertificateIssuerConfigListDao(SdkContext sdkContext); } | CertificateIssuerConfigListDao extends
AbstractModelListDao<CertificateIssuerConfig,
CertificateIssuerConfigListOptions> implements
ModelListDao<CertificateIssuerConfig, CertificateIssuerConfigListOptions> { @Override @SuppressWarnings({ "resource", "unused" }) public CertificateIssuerConfigListDao clone() { try { return new CertificateIssuerConfigListDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } CertificateIssuerConfigListDao(); CertificateIssuerConfigListDao(ApiClientWrapper client); CertificateIssuerConfigListDao(ConnectionOptions options); CertificateIssuerConfigListDao(SdkContext sdkContext); @Override @SuppressWarnings({ "resource", "unused" }) CertificateIssuerConfigListDao clone(); @Override @Internal @SuppressWarnings("unchecked") Class<CertificateIssuerConfigDao> getModelDaoClass(); @Override @Internal @SuppressWarnings({ "unchecked", "resource" }) CertificateIssuerConfigDao getNewModelDao(); } | CertificateIssuerConfigListDao extends
AbstractModelListDao<CertificateIssuerConfig,
CertificateIssuerConfigListOptions> implements
ModelListDao<CertificateIssuerConfig, CertificateIssuerConfigListOptions> { @Override @SuppressWarnings({ "resource", "unused" }) public CertificateIssuerConfigListDao clone() { try { return new CertificateIssuerConfigListDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } CertificateIssuerConfigListDao(); CertificateIssuerConfigListDao(ApiClientWrapper client); CertificateIssuerConfigListDao(ConnectionOptions options); CertificateIssuerConfigListDao(SdkContext sdkContext); @Override @SuppressWarnings({ "resource", "unused" }) CertificateIssuerConfigListDao clone(); @Override @Internal @SuppressWarnings("unchecked") Class<CertificateIssuerConfigDao> getModelDaoClass(); @Override @Internal @SuppressWarnings({ "unchecked", "resource" }) CertificateIssuerConfigDao getNewModelDao(); } |
@Test public void testToDoubleConversion() { double doubleValue = 156433465.45464564; String doubleString = String.valueOf(doubleValue); assertEquals(doubleValue, TranslationUtils.toDouble(doubleString, 0), 0); doubleValue = Double.MAX_VALUE; doubleString = String.valueOf(doubleValue); assertEquals(doubleValue, TranslationUtils.toDouble(doubleString, 0), 0); assertEquals(10.0, TranslationUtils.toDouble(new Integer(10)), 0); assertEquals(10, TranslationUtils.toDouble("fsdlfsfkls", 10), 0); assertEquals(0.0, TranslationUtils.toDouble("fsdlfsfkls"), 0); } | public static double toDouble(Number value) { return toDouble(value, 0.0); } | TranslationUtils { public static double toDouble(Number value) { return toDouble(value, 0.0); } } | TranslationUtils { public static double toDouble(Number value) { return toDouble(value, 0.0); } private TranslationUtils(); } | TranslationUtils { public static double toDouble(Number value) { return toDouble(value, 0.0); } private TranslationUtils(); static Date toDate(DateTime date); static Date toDate(LocalDate ldate); static Date toDate(Calendar date); static Date toDate(Number timestamp); static Date toDate(Number timestamp, TimeUnit unit); static DateTime toDateTime(Date date); static LocalDate toLocalDate(Date date); static DataFile toDataFile(File file); static DataFile toDataFile(String filePath); static long toLong(Number longE); static long toLong(Date value); static long toLong(String value); static long toLong(Number longE, long defaultValue); static long toLong(Date value, long defaultValue); static long toLong(String stringContainingANumber, long defaultValue); static int toInt(Number number); static int toInt(String value); static int toInt(Number integer, int defaultV); static int toInt(String value, int defaultV); static Integer toInteger(String value, Integer defaultV); static boolean toBool(Boolean bool); static boolean toBool(String value); static boolean toBool(Boolean bool, boolean defaultB); static boolean toBool(String value, boolean defaultV); static double toDouble(Number value); static double toDouble(String value); static double toDouble(Number value, double defaultD); static double toDouble(String value, double defaultD); static URL toUrl(String url); static String toString(Object obj); static Base64 toBase64(Object obj); static byte[] toByteArray(Object obj); static synchronized Date convertTimestamp(String timestamp); static synchronized Date convertTimestamp(String timestamp, Date defaultDate); static synchronized Date convertTimestamp(String timestamp, DateFormat format, Date defaultDate); static synchronized Date convertTimestamp(String timestamp, DateFormat format); static synchronized Date convertRfc3339Timestamp(String timestamp); static synchronized Date convertRfc3339Timestamp(String timestamp, Date defaultDate); static synchronized String toDefaultTimestamp(Date date); static synchronized String toRfc3339Timestamp(Date date); static String toTimestamp(Date date, DateFormat format); static List<String> parseList(String string, String separator); static DateTime moveToUtc(Date date); static Date moveDateTimeToUtc(Date date); static String toUtcTimestamp(Date date); static Date convertStringToDate(String valueStr); } | TranslationUtils { public static double toDouble(Number value) { return toDouble(value, 0.0); } private TranslationUtils(); static Date toDate(DateTime date); static Date toDate(LocalDate ldate); static Date toDate(Calendar date); static Date toDate(Number timestamp); static Date toDate(Number timestamp, TimeUnit unit); static DateTime toDateTime(Date date); static LocalDate toLocalDate(Date date); static DataFile toDataFile(File file); static DataFile toDataFile(String filePath); static long toLong(Number longE); static long toLong(Date value); static long toLong(String value); static long toLong(Number longE, long defaultValue); static long toLong(Date value, long defaultValue); static long toLong(String stringContainingANumber, long defaultValue); static int toInt(Number number); static int toInt(String value); static int toInt(Number integer, int defaultV); static int toInt(String value, int defaultV); static Integer toInteger(String value, Integer defaultV); static boolean toBool(Boolean bool); static boolean toBool(String value); static boolean toBool(Boolean bool, boolean defaultB); static boolean toBool(String value, boolean defaultV); static double toDouble(Number value); static double toDouble(String value); static double toDouble(Number value, double defaultD); static double toDouble(String value, double defaultD); static URL toUrl(String url); static String toString(Object obj); static Base64 toBase64(Object obj); static byte[] toByteArray(Object obj); static synchronized Date convertTimestamp(String timestamp); static synchronized Date convertTimestamp(String timestamp, Date defaultDate); static synchronized Date convertTimestamp(String timestamp, DateFormat format, Date defaultDate); static synchronized Date convertTimestamp(String timestamp, DateFormat format); static synchronized Date convertRfc3339Timestamp(String timestamp); static synchronized Date convertRfc3339Timestamp(String timestamp, Date defaultDate); static synchronized String toDefaultTimestamp(Date date); static synchronized String toRfc3339Timestamp(Date date); static String toTimestamp(Date date, DateFormat format); static List<String> parseList(String string, String separator); static DateTime moveToUtc(Date date); static Date moveDateTimeToUtc(Date date); static String toUtcTimestamp(Date date); static Date convertStringToDate(String valueStr); static final String METHOD_CONVERT_STRING_TO_DATE; static final String METHOD_CONVERT_OTHER_TO_DATE; static final String METHOD_CONVERT_DATE_TO_DATETIME; static final String METHOD_CONVERT_DATE_TO_LOCALDATE; static final String METHOD_CONVERT_DATE_TO_STRING; static final String METHOD_CONVERT_STRING_TO_URL; static final String METHOD_CONVERT_BOOL_TO_BOOL; static final String METHOD_CONVERT_NUMBER_TO_LONG; static final String METHOD_CONVERT_NUMBER_TO_INT; static final String METHOD_CONVERT_NUMBER_TO_DOUBLE; static final String METHOD_CONVERT_ANY_TO_STRING; static final String METHOD_CONVERT_ANY_TO_BYTE_ARRAY; static final String METHOD_CONVERT_ANY_TO_BASE64; static final String METHOD_CONVERT_TO_DATA_FILE; } |
@SuppressWarnings("resource") @Test public void testClone() { try { CertificateIssuerConfigDao certificateissuerconfigdao1 = new CertificateIssuerConfigDao(); CertificateIssuerConfigDao certificateissuerconfigdao2 = certificateissuerconfigdao1.clone(); assertNotNull(certificateissuerconfigdao1); assertNotNull(certificateissuerconfigdao2); assertNotSame(certificateissuerconfigdao2, certificateissuerconfigdao1); assertEquals(certificateissuerconfigdao2, certificateissuerconfigdao1); } catch (Exception exception) { fail(exception.getMessage()); } } | @Override @SuppressWarnings({ "resource", "unused" }) public CertificateIssuerConfigDao clone() { try { return new CertificateIssuerConfigDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } | CertificateIssuerConfigDao extends AbstractModelDao<CertificateIssuerConfig> implements CrudDao<CertificateIssuerConfig> { @Override @SuppressWarnings({ "resource", "unused" }) public CertificateIssuerConfigDao clone() { try { return new CertificateIssuerConfigDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } } | CertificateIssuerConfigDao extends AbstractModelDao<CertificateIssuerConfig> implements CrudDao<CertificateIssuerConfig> { @Override @SuppressWarnings({ "resource", "unused" }) public CertificateIssuerConfigDao clone() { try { return new CertificateIssuerConfigDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } CertificateIssuerConfigDao(); CertificateIssuerConfigDao(ApiClientWrapper client); CertificateIssuerConfigDao(ConnectionOptions options); CertificateIssuerConfigDao(SdkContext sdkContext); } | CertificateIssuerConfigDao extends AbstractModelDao<CertificateIssuerConfig> implements CrudDao<CertificateIssuerConfig> { @Override @SuppressWarnings({ "resource", "unused" }) public CertificateIssuerConfigDao clone() { try { return new CertificateIssuerConfigDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } CertificateIssuerConfigDao(); CertificateIssuerConfigDao(ApiClientWrapper client); CertificateIssuerConfigDao(ConnectionOptions options); CertificateIssuerConfigDao(SdkContext sdkContext); @Override @SuppressWarnings({ "resource", "unused" }) CertificateIssuerConfigDao clone(); @Override CertificateIssuerConfig create(); @Override CertificateIssuerConfig create(@NonNull CertificateIssuerConfig createCertificateIssuerConfig); @Override void delete(); @Override void delete(@NonNull CertificateIssuerConfig certificateIssuerConfig); @Override void delete(@NonNull String id); CertificateIssuerConfig getDefault(); @Override CertificateIssuerConfig read(); CertificateIssuerConfig read(@NonNull CertificateIssuerConfig certificateIssuerConfig); @Override CertificateIssuerConfig read(@NonNull String id); @Override CertificateIssuerConfig update(); CertificateIssuerConfig update(@NonNull CertificateIssuerConfig certificateIssuerConfigRequest,
@NonNull String id); @Override CertificateIssuerConfig update(@NonNull CertificateIssuerConfig certificateIssuerConfig); CertificateIssuerConfig update(@NonNull String id); } | CertificateIssuerConfigDao extends AbstractModelDao<CertificateIssuerConfig> implements CrudDao<CertificateIssuerConfig> { @Override @SuppressWarnings({ "resource", "unused" }) public CertificateIssuerConfigDao clone() { try { return new CertificateIssuerConfigDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } CertificateIssuerConfigDao(); CertificateIssuerConfigDao(ApiClientWrapper client); CertificateIssuerConfigDao(ConnectionOptions options); CertificateIssuerConfigDao(SdkContext sdkContext); @Override @SuppressWarnings({ "resource", "unused" }) CertificateIssuerConfigDao clone(); @Override CertificateIssuerConfig create(); @Override CertificateIssuerConfig create(@NonNull CertificateIssuerConfig createCertificateIssuerConfig); @Override void delete(); @Override void delete(@NonNull CertificateIssuerConfig certificateIssuerConfig); @Override void delete(@NonNull String id); CertificateIssuerConfig getDefault(); @Override CertificateIssuerConfig read(); CertificateIssuerConfig read(@NonNull CertificateIssuerConfig certificateIssuerConfig); @Override CertificateIssuerConfig read(@NonNull String id); @Override CertificateIssuerConfig update(); CertificateIssuerConfig update(@NonNull CertificateIssuerConfig certificateIssuerConfigRequest,
@NonNull String id); @Override CertificateIssuerConfig update(@NonNull CertificateIssuerConfig certificateIssuerConfig); CertificateIssuerConfig update(@NonNull String id); } |
@SuppressWarnings("resource") @Test public void testClone() { try { ServerCredentialsDao servercredentialsdao1 = new ServerCredentialsDao(); ServerCredentialsDao servercredentialsdao2 = servercredentialsdao1.clone(); assertNotNull(servercredentialsdao1); assertNotNull(servercredentialsdao2); assertNotSame(servercredentialsdao2, servercredentialsdao1); assertEquals(servercredentialsdao2, servercredentialsdao1); } catch (Exception exception) { fail(exception.getMessage()); } } | @Override @SuppressWarnings({ "resource", "unused" }) public ServerCredentialsDao clone() { try { return new ServerCredentialsDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } | ServerCredentialsDao extends AbstractModelDao<ServerCredentials> { @Override @SuppressWarnings({ "resource", "unused" }) public ServerCredentialsDao clone() { try { return new ServerCredentialsDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } } | ServerCredentialsDao extends AbstractModelDao<ServerCredentials> { @Override @SuppressWarnings({ "resource", "unused" }) public ServerCredentialsDao clone() { try { return new ServerCredentialsDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } ServerCredentialsDao(); ServerCredentialsDao(ApiClientWrapper client); ServerCredentialsDao(ConnectionOptions options); ServerCredentialsDao(SdkContext sdkContext); } | ServerCredentialsDao extends AbstractModelDao<ServerCredentials> { @Override @SuppressWarnings({ "resource", "unused" }) public ServerCredentialsDao clone() { try { return new ServerCredentialsDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } ServerCredentialsDao(); ServerCredentialsDao(ApiClientWrapper client); ServerCredentialsDao(ConnectionOptions options); ServerCredentialsDao(SdkContext sdkContext); @Override @SuppressWarnings({ "resource", "unused" }) ServerCredentialsDao clone(); ServerCredentials getBootstrap(); ServerCredentials getLwm2m(); } | ServerCredentialsDao extends AbstractModelDao<ServerCredentials> { @Override @SuppressWarnings({ "resource", "unused" }) public ServerCredentialsDao clone() { try { return new ServerCredentialsDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } ServerCredentialsDao(); ServerCredentialsDao(ApiClientWrapper client); ServerCredentialsDao(ConnectionOptions options); ServerCredentialsDao(SdkContext sdkContext); @Override @SuppressWarnings({ "resource", "unused" }) ServerCredentialsDao clone(); ServerCredentials getBootstrap(); ServerCredentials getLwm2m(); } |
@SuppressWarnings("resource") @Test public void testClone() { try { TrustedCertificateListDao trustedcertificatelistdao1 = new TrustedCertificateListDao(); TrustedCertificateListDao trustedcertificatelistdao2 = trustedcertificatelistdao1.clone(); assertNotNull(trustedcertificatelistdao1); assertNotNull(trustedcertificatelistdao2); assertNotSame(trustedcertificatelistdao2, trustedcertificatelistdao1); assertEquals(trustedcertificatelistdao2, trustedcertificatelistdao1); } catch (Exception exception) { fail(exception.getMessage()); } } | @Override @SuppressWarnings({ "resource", "unused" }) public TrustedCertificateListDao clone() { try { return new TrustedCertificateListDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } | TrustedCertificateListDao extends AbstractModelListDao<TrustedCertificate, TrustedCertificateListOptions> implements ModelListDao<TrustedCertificate, TrustedCertificateListOptions> { @Override @SuppressWarnings({ "resource", "unused" }) public TrustedCertificateListDao clone() { try { return new TrustedCertificateListDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } } | TrustedCertificateListDao extends AbstractModelListDao<TrustedCertificate, TrustedCertificateListOptions> implements ModelListDao<TrustedCertificate, TrustedCertificateListOptions> { @Override @SuppressWarnings({ "resource", "unused" }) public TrustedCertificateListDao clone() { try { return new TrustedCertificateListDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } TrustedCertificateListDao(); TrustedCertificateListDao(ApiClientWrapper client); TrustedCertificateListDao(ConnectionOptions options); TrustedCertificateListDao(SdkContext sdkContext); } | TrustedCertificateListDao extends AbstractModelListDao<TrustedCertificate, TrustedCertificateListOptions> implements ModelListDao<TrustedCertificate, TrustedCertificateListOptions> { @Override @SuppressWarnings({ "resource", "unused" }) public TrustedCertificateListDao clone() { try { return new TrustedCertificateListDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } TrustedCertificateListDao(); TrustedCertificateListDao(ApiClientWrapper client); TrustedCertificateListDao(ConnectionOptions options); TrustedCertificateListDao(SdkContext sdkContext); @Override @SuppressWarnings({ "resource", "unused" }) TrustedCertificateListDao clone(); @Override @Internal @SuppressWarnings("unchecked") Class<TrustedCertificateDao> getModelDaoClass(); @Override @Internal @SuppressWarnings({ "unchecked", "resource" }) TrustedCertificateDao getNewModelDao(); } | TrustedCertificateListDao extends AbstractModelListDao<TrustedCertificate, TrustedCertificateListOptions> implements ModelListDao<TrustedCertificate, TrustedCertificateListOptions> { @Override @SuppressWarnings({ "resource", "unused" }) public TrustedCertificateListDao clone() { try { return new TrustedCertificateListDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } TrustedCertificateListDao(); TrustedCertificateListDao(ApiClientWrapper client); TrustedCertificateListDao(ConnectionOptions options); TrustedCertificateListDao(SdkContext sdkContext); @Override @SuppressWarnings({ "resource", "unused" }) TrustedCertificateListDao clone(); @Override @Internal @SuppressWarnings("unchecked") Class<TrustedCertificateDao> getModelDaoClass(); @Override @Internal @SuppressWarnings({ "unchecked", "resource" }) TrustedCertificateDao getNewModelDao(); } |
@SuppressWarnings("resource") @Test public void testClone() { try { CertificateIssuerDao certificateissuerdao1 = new CertificateIssuerDao(); CertificateIssuerDao certificateissuerdao2 = certificateissuerdao1.clone(); assertNotNull(certificateissuerdao1); assertNotNull(certificateissuerdao2); assertNotSame(certificateissuerdao2, certificateissuerdao1); assertEquals(certificateissuerdao2, certificateissuerdao1); } catch (Exception exception) { fail(exception.getMessage()); } } | @Override @SuppressWarnings({ "resource", "unused" }) public CertificateIssuerDao clone() { try { return new CertificateIssuerDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } | CertificateIssuerDao extends AbstractCertificateIssuerDao { @Override @SuppressWarnings({ "resource", "unused" }) public CertificateIssuerDao clone() { try { return new CertificateIssuerDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } } | CertificateIssuerDao extends AbstractCertificateIssuerDao { @Override @SuppressWarnings({ "resource", "unused" }) public CertificateIssuerDao clone() { try { return new CertificateIssuerDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } CertificateIssuerDao(); CertificateIssuerDao(ApiClientWrapper client); CertificateIssuerDao(ConnectionOptions options); CertificateIssuerDao(SdkContext sdkContext); } | CertificateIssuerDao extends AbstractCertificateIssuerDao { @Override @SuppressWarnings({ "resource", "unused" }) public CertificateIssuerDao clone() { try { return new CertificateIssuerDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } CertificateIssuerDao(); CertificateIssuerDao(ApiClientWrapper client); CertificateIssuerDao(ConnectionOptions options); CertificateIssuerDao(SdkContext sdkContext); @Override @SuppressWarnings({ "resource", "unused" }) CertificateIssuerDao clone(); @Override @NotImplemented CertificateIssuer create(); @Override @NotImplemented CertificateIssuer create(CertificateIssuer modelToCreate); } | CertificateIssuerDao extends AbstractCertificateIssuerDao { @Override @SuppressWarnings({ "resource", "unused" }) public CertificateIssuerDao clone() { try { return new CertificateIssuerDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } CertificateIssuerDao(); CertificateIssuerDao(ApiClientWrapper client); CertificateIssuerDao(ConnectionOptions options); CertificateIssuerDao(SdkContext sdkContext); @Override @SuppressWarnings({ "resource", "unused" }) CertificateIssuerDao clone(); @Override @NotImplemented CertificateIssuer create(); @Override @NotImplemented CertificateIssuer create(CertificateIssuer modelToCreate); } |
@SuppressWarnings("resource") @Test public void testClone() { try { TrustedCertificateListOptions trustedcertificatelistoptions1 = new TrustedCertificateListOptions(Integer.valueOf(-26), Long.valueOf(10), Order.getDefault(), "15e58cd7-7aa3-4234-9db6-cde260cba28d", null, null); TrustedCertificateListOptions trustedcertificatelistoptions2 = trustedcertificatelistoptions1.clone(); assertNotNull(trustedcertificatelistoptions1); assertNotNull(trustedcertificatelistoptions2); assertNotSame(trustedcertificatelistoptions2, trustedcertificatelistoptions1); assertEquals(trustedcertificatelistoptions2, trustedcertificatelistoptions1); } catch (Exception exception) { fail(exception.getMessage()); } } | @Override public TrustedCertificateListOptions clone() { final TrustedCertificateListOptions opt = new TrustedCertificateListOptions(); opt.setOptions(this); return opt; } | TrustedCertificateListOptions extends ListOptions { @Override public TrustedCertificateListOptions clone() { final TrustedCertificateListOptions opt = new TrustedCertificateListOptions(); opt.setOptions(this); return opt; } } | TrustedCertificateListOptions extends ListOptions { @Override public TrustedCertificateListOptions clone() { final TrustedCertificateListOptions opt = new TrustedCertificateListOptions(); opt.setOptions(this); return opt; } @Internal TrustedCertificateListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal TrustedCertificateListOptions(TrustedCertificateListOptions trustedCertificateListOptions); TrustedCertificateListOptions(); @Internal TrustedCertificateListOptions(String after, Filters filter); } | TrustedCertificateListOptions extends ListOptions { @Override public TrustedCertificateListOptions clone() { final TrustedCertificateListOptions opt = new TrustedCertificateListOptions(); opt.setOptions(this); return opt; } @Internal TrustedCertificateListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal TrustedCertificateListOptions(TrustedCertificateListOptions trustedCertificateListOptions); TrustedCertificateListOptions(); @Internal TrustedCertificateListOptions(String after, Filters filter); List<Filter> getValidFilters(); void addEqualToValidFilter(boolean filterByValid); @SuppressWarnings("unchecked") T equalToValid(boolean filterByValid); List<Filter> getNameFilters(); void addEqualToNameFilter(String filterByName); @SuppressWarnings("unchecked") T equalToName(String filterByName); List<Filter> getStatusFilters(); void addEqualToStatusFilter(TrustedCertificateStatus filterByStatus); @SuppressWarnings("unchecked") T equalToStatus(TrustedCertificateStatus filterByStatus); List<Filter> getDeviceExecutionModeFilters(); void addEqualToDeviceExecutionModeFilter(int filterByDeviceExecutionMode); @SuppressWarnings("unchecked") T equalToDeviceExecutionMode(int filterByDeviceExecutionMode); void addNotEqualToDeviceExecutionModeFilter(int filterByDeviceExecutionMode); @SuppressWarnings("unchecked") T notEqualToDeviceExecutionMode(int filterByDeviceExecutionMode); List<Filter> getIssuerFilters(); void addLikeIssuerFilter(String filterByIssuer); @SuppressWarnings("unchecked") T likeIssuer(String filterByIssuer); List<Filter> getServiceFilters(); void addEqualToServiceFilter(TrustedCertificateService filterByService); @SuppressWarnings("unchecked") T equalToService(TrustedCertificateService filterByService); List<Filter> getSubjectFilters(); void addLikeSubjectFilter(String filterBySubject); @SuppressWarnings("unchecked") T likeSubject(String filterBySubject); List<Filter> getEnrollmentModeFilters(); void addEqualToEnrollmentModeFilter(boolean filterByEnrollmentMode); @SuppressWarnings("unchecked") T equalToEnrollmentMode(boolean filterByEnrollmentMode); @Override String toString(); @Override TrustedCertificateListOptions clone(); @Override boolean equals(Object obj); @Override @SuppressWarnings("PMD.UselessOverridingMethod") int hashCode(); } | TrustedCertificateListOptions extends ListOptions { @Override public TrustedCertificateListOptions clone() { final TrustedCertificateListOptions opt = new TrustedCertificateListOptions(); opt.setOptions(this); return opt; } @Internal TrustedCertificateListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal TrustedCertificateListOptions(TrustedCertificateListOptions trustedCertificateListOptions); TrustedCertificateListOptions(); @Internal TrustedCertificateListOptions(String after, Filters filter); List<Filter> getValidFilters(); void addEqualToValidFilter(boolean filterByValid); @SuppressWarnings("unchecked") T equalToValid(boolean filterByValid); List<Filter> getNameFilters(); void addEqualToNameFilter(String filterByName); @SuppressWarnings("unchecked") T equalToName(String filterByName); List<Filter> getStatusFilters(); void addEqualToStatusFilter(TrustedCertificateStatus filterByStatus); @SuppressWarnings("unchecked") T equalToStatus(TrustedCertificateStatus filterByStatus); List<Filter> getDeviceExecutionModeFilters(); void addEqualToDeviceExecutionModeFilter(int filterByDeviceExecutionMode); @SuppressWarnings("unchecked") T equalToDeviceExecutionMode(int filterByDeviceExecutionMode); void addNotEqualToDeviceExecutionModeFilter(int filterByDeviceExecutionMode); @SuppressWarnings("unchecked") T notEqualToDeviceExecutionMode(int filterByDeviceExecutionMode); List<Filter> getIssuerFilters(); void addLikeIssuerFilter(String filterByIssuer); @SuppressWarnings("unchecked") T likeIssuer(String filterByIssuer); List<Filter> getServiceFilters(); void addEqualToServiceFilter(TrustedCertificateService filterByService); @SuppressWarnings("unchecked") T equalToService(TrustedCertificateService filterByService); List<Filter> getSubjectFilters(); void addLikeSubjectFilter(String filterBySubject); @SuppressWarnings("unchecked") T likeSubject(String filterBySubject); List<Filter> getEnrollmentModeFilters(); void addEqualToEnrollmentModeFilter(boolean filterByEnrollmentMode); @SuppressWarnings("unchecked") T equalToEnrollmentMode(boolean filterByEnrollmentMode); @Override String toString(); @Override TrustedCertificateListOptions clone(); @Override boolean equals(Object obj); @Override @SuppressWarnings("PMD.UselessOverridingMethod") int hashCode(); static final String TAG_FILTER_BY_DEVICE_EXECUTION_MODE; static final String TAG_FILTER_BY_ENROLLMENT_MODE; static final String TAG_FILTER_BY_ISSUER; static final String TAG_FILTER_BY_NAME; static final String TAG_FILTER_BY_SERVICE; static final String TAG_FILTER_BY_STATUS; static final String TAG_FILTER_BY_SUBJECT; static final String TAG_FILTER_BY_VALID; } |
@SuppressWarnings("resource") @Test public void testHashCode() { try { TrustedCertificateListOptions trustedcertificatelistoptions1 = new TrustedCertificateListOptions(Integer.valueOf(102), Long.valueOf(60), Order.getDefault(), "4de497a9-e74b-4f21-b29a-98bc61163333", null, null); TrustedCertificateListOptions trustedcertificatelistoptions2 = new TrustedCertificateListOptions(Integer.valueOf(102), Long.valueOf(60), Order.getDefault(), "4de497a9-e74b-4f21-b29a-98bc61163333", null, null); assertNotNull(trustedcertificatelistoptions1); assertNotNull(trustedcertificatelistoptions2); assertNotSame(trustedcertificatelistoptions2, trustedcertificatelistoptions1); assertEquals(trustedcertificatelistoptions2, trustedcertificatelistoptions1); assertEquals(trustedcertificatelistoptions2.hashCode(), trustedcertificatelistoptions1.hashCode()); int hashCode = trustedcertificatelistoptions1.hashCode(); for (int i = 0; i < 5; i++) { assertEquals(hashCode, trustedcertificatelistoptions1.hashCode()); } } catch (Exception exception) { fail(exception.getMessage()); } } | @Override @SuppressWarnings("PMD.UselessOverridingMethod") public int hashCode() { return super.hashCode(); } | TrustedCertificateListOptions extends ListOptions { @Override @SuppressWarnings("PMD.UselessOverridingMethod") public int hashCode() { return super.hashCode(); } } | TrustedCertificateListOptions extends ListOptions { @Override @SuppressWarnings("PMD.UselessOverridingMethod") public int hashCode() { return super.hashCode(); } @Internal TrustedCertificateListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal TrustedCertificateListOptions(TrustedCertificateListOptions trustedCertificateListOptions); TrustedCertificateListOptions(); @Internal TrustedCertificateListOptions(String after, Filters filter); } | TrustedCertificateListOptions extends ListOptions { @Override @SuppressWarnings("PMD.UselessOverridingMethod") public int hashCode() { return super.hashCode(); } @Internal TrustedCertificateListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal TrustedCertificateListOptions(TrustedCertificateListOptions trustedCertificateListOptions); TrustedCertificateListOptions(); @Internal TrustedCertificateListOptions(String after, Filters filter); List<Filter> getValidFilters(); void addEqualToValidFilter(boolean filterByValid); @SuppressWarnings("unchecked") T equalToValid(boolean filterByValid); List<Filter> getNameFilters(); void addEqualToNameFilter(String filterByName); @SuppressWarnings("unchecked") T equalToName(String filterByName); List<Filter> getStatusFilters(); void addEqualToStatusFilter(TrustedCertificateStatus filterByStatus); @SuppressWarnings("unchecked") T equalToStatus(TrustedCertificateStatus filterByStatus); List<Filter> getDeviceExecutionModeFilters(); void addEqualToDeviceExecutionModeFilter(int filterByDeviceExecutionMode); @SuppressWarnings("unchecked") T equalToDeviceExecutionMode(int filterByDeviceExecutionMode); void addNotEqualToDeviceExecutionModeFilter(int filterByDeviceExecutionMode); @SuppressWarnings("unchecked") T notEqualToDeviceExecutionMode(int filterByDeviceExecutionMode); List<Filter> getIssuerFilters(); void addLikeIssuerFilter(String filterByIssuer); @SuppressWarnings("unchecked") T likeIssuer(String filterByIssuer); List<Filter> getServiceFilters(); void addEqualToServiceFilter(TrustedCertificateService filterByService); @SuppressWarnings("unchecked") T equalToService(TrustedCertificateService filterByService); List<Filter> getSubjectFilters(); void addLikeSubjectFilter(String filterBySubject); @SuppressWarnings("unchecked") T likeSubject(String filterBySubject); List<Filter> getEnrollmentModeFilters(); void addEqualToEnrollmentModeFilter(boolean filterByEnrollmentMode); @SuppressWarnings("unchecked") T equalToEnrollmentMode(boolean filterByEnrollmentMode); @Override String toString(); @Override TrustedCertificateListOptions clone(); @Override boolean equals(Object obj); @Override @SuppressWarnings("PMD.UselessOverridingMethod") int hashCode(); } | TrustedCertificateListOptions extends ListOptions { @Override @SuppressWarnings("PMD.UselessOverridingMethod") public int hashCode() { return super.hashCode(); } @Internal TrustedCertificateListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal TrustedCertificateListOptions(TrustedCertificateListOptions trustedCertificateListOptions); TrustedCertificateListOptions(); @Internal TrustedCertificateListOptions(String after, Filters filter); List<Filter> getValidFilters(); void addEqualToValidFilter(boolean filterByValid); @SuppressWarnings("unchecked") T equalToValid(boolean filterByValid); List<Filter> getNameFilters(); void addEqualToNameFilter(String filterByName); @SuppressWarnings("unchecked") T equalToName(String filterByName); List<Filter> getStatusFilters(); void addEqualToStatusFilter(TrustedCertificateStatus filterByStatus); @SuppressWarnings("unchecked") T equalToStatus(TrustedCertificateStatus filterByStatus); List<Filter> getDeviceExecutionModeFilters(); void addEqualToDeviceExecutionModeFilter(int filterByDeviceExecutionMode); @SuppressWarnings("unchecked") T equalToDeviceExecutionMode(int filterByDeviceExecutionMode); void addNotEqualToDeviceExecutionModeFilter(int filterByDeviceExecutionMode); @SuppressWarnings("unchecked") T notEqualToDeviceExecutionMode(int filterByDeviceExecutionMode); List<Filter> getIssuerFilters(); void addLikeIssuerFilter(String filterByIssuer); @SuppressWarnings("unchecked") T likeIssuer(String filterByIssuer); List<Filter> getServiceFilters(); void addEqualToServiceFilter(TrustedCertificateService filterByService); @SuppressWarnings("unchecked") T equalToService(TrustedCertificateService filterByService); List<Filter> getSubjectFilters(); void addLikeSubjectFilter(String filterBySubject); @SuppressWarnings("unchecked") T likeSubject(String filterBySubject); List<Filter> getEnrollmentModeFilters(); void addEqualToEnrollmentModeFilter(boolean filterByEnrollmentMode); @SuppressWarnings("unchecked") T equalToEnrollmentMode(boolean filterByEnrollmentMode); @Override String toString(); @Override TrustedCertificateListOptions clone(); @Override boolean equals(Object obj); @Override @SuppressWarnings("PMD.UselessOverridingMethod") int hashCode(); static final String TAG_FILTER_BY_DEVICE_EXECUTION_MODE; static final String TAG_FILTER_BY_ENROLLMENT_MODE; static final String TAG_FILTER_BY_ISSUER; static final String TAG_FILTER_BY_NAME; static final String TAG_FILTER_BY_SERVICE; static final String TAG_FILTER_BY_STATUS; static final String TAG_FILTER_BY_SUBJECT; static final String TAG_FILTER_BY_VALID; } |
@SuppressWarnings("resource") @Test public void testEquals() { try { TrustedCertificateListOptions trustedcertificatelistoptions1 = new TrustedCertificateListOptions(Integer.valueOf(-12), Long.valueOf(67), Order.getDefault(), "8c6cafbd-7aa0-4c85-b7f2-8fa1e15e9311", null, null); TrustedCertificateListOptions trustedcertificatelistoptions2 = new TrustedCertificateListOptions(Integer.valueOf(-12), Long.valueOf(67), Order.getDefault(), "8c6cafbd-7aa0-4c85-b7f2-8fa1e15e9311", null, null); TrustedCertificateListOptions trustedcertificatelistoptions3 = new TrustedCertificateListOptions(Integer.valueOf(-34), Long.valueOf(-25), Order.getDefault(), "ae5139b4-224a-43ba-a267-9045fa815029", null, null); assertNotNull(trustedcertificatelistoptions1); assertNotNull(trustedcertificatelistoptions2); assertNotNull(trustedcertificatelistoptions3); assertNotSame(trustedcertificatelistoptions2, trustedcertificatelistoptions1); assertNotSame(trustedcertificatelistoptions3, trustedcertificatelistoptions1); assertEquals(trustedcertificatelistoptions2, trustedcertificatelistoptions1); assertEquals(trustedcertificatelistoptions2, trustedcertificatelistoptions1); assertEquals(trustedcertificatelistoptions1, trustedcertificatelistoptions2); assertEquals(trustedcertificatelistoptions1, trustedcertificatelistoptions1); assertFalse(trustedcertificatelistoptions1.equals(null)); assertNotEquals(trustedcertificatelistoptions3, trustedcertificatelistoptions1); } catch (Exception exception) { fail(exception.getMessage()); } } | @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!super.equals(obj)) { return false; } if (!(obj instanceof TrustedCertificateListOptions)) { return false; } final TrustedCertificateListOptions other = (TrustedCertificateListOptions) obj; if (!other.canEqual(this)) { return false; } return true; } | TrustedCertificateListOptions extends ListOptions { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!super.equals(obj)) { return false; } if (!(obj instanceof TrustedCertificateListOptions)) { return false; } final TrustedCertificateListOptions other = (TrustedCertificateListOptions) obj; if (!other.canEqual(this)) { return false; } return true; } } | TrustedCertificateListOptions extends ListOptions { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!super.equals(obj)) { return false; } if (!(obj instanceof TrustedCertificateListOptions)) { return false; } final TrustedCertificateListOptions other = (TrustedCertificateListOptions) obj; if (!other.canEqual(this)) { return false; } return true; } @Internal TrustedCertificateListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal TrustedCertificateListOptions(TrustedCertificateListOptions trustedCertificateListOptions); TrustedCertificateListOptions(); @Internal TrustedCertificateListOptions(String after, Filters filter); } | TrustedCertificateListOptions extends ListOptions { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!super.equals(obj)) { return false; } if (!(obj instanceof TrustedCertificateListOptions)) { return false; } final TrustedCertificateListOptions other = (TrustedCertificateListOptions) obj; if (!other.canEqual(this)) { return false; } return true; } @Internal TrustedCertificateListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal TrustedCertificateListOptions(TrustedCertificateListOptions trustedCertificateListOptions); TrustedCertificateListOptions(); @Internal TrustedCertificateListOptions(String after, Filters filter); List<Filter> getValidFilters(); void addEqualToValidFilter(boolean filterByValid); @SuppressWarnings("unchecked") T equalToValid(boolean filterByValid); List<Filter> getNameFilters(); void addEqualToNameFilter(String filterByName); @SuppressWarnings("unchecked") T equalToName(String filterByName); List<Filter> getStatusFilters(); void addEqualToStatusFilter(TrustedCertificateStatus filterByStatus); @SuppressWarnings("unchecked") T equalToStatus(TrustedCertificateStatus filterByStatus); List<Filter> getDeviceExecutionModeFilters(); void addEqualToDeviceExecutionModeFilter(int filterByDeviceExecutionMode); @SuppressWarnings("unchecked") T equalToDeviceExecutionMode(int filterByDeviceExecutionMode); void addNotEqualToDeviceExecutionModeFilter(int filterByDeviceExecutionMode); @SuppressWarnings("unchecked") T notEqualToDeviceExecutionMode(int filterByDeviceExecutionMode); List<Filter> getIssuerFilters(); void addLikeIssuerFilter(String filterByIssuer); @SuppressWarnings("unchecked") T likeIssuer(String filterByIssuer); List<Filter> getServiceFilters(); void addEqualToServiceFilter(TrustedCertificateService filterByService); @SuppressWarnings("unchecked") T equalToService(TrustedCertificateService filterByService); List<Filter> getSubjectFilters(); void addLikeSubjectFilter(String filterBySubject); @SuppressWarnings("unchecked") T likeSubject(String filterBySubject); List<Filter> getEnrollmentModeFilters(); void addEqualToEnrollmentModeFilter(boolean filterByEnrollmentMode); @SuppressWarnings("unchecked") T equalToEnrollmentMode(boolean filterByEnrollmentMode); @Override String toString(); @Override TrustedCertificateListOptions clone(); @Override boolean equals(Object obj); @Override @SuppressWarnings("PMD.UselessOverridingMethod") int hashCode(); } | TrustedCertificateListOptions extends ListOptions { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!super.equals(obj)) { return false; } if (!(obj instanceof TrustedCertificateListOptions)) { return false; } final TrustedCertificateListOptions other = (TrustedCertificateListOptions) obj; if (!other.canEqual(this)) { return false; } return true; } @Internal TrustedCertificateListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal TrustedCertificateListOptions(TrustedCertificateListOptions trustedCertificateListOptions); TrustedCertificateListOptions(); @Internal TrustedCertificateListOptions(String after, Filters filter); List<Filter> getValidFilters(); void addEqualToValidFilter(boolean filterByValid); @SuppressWarnings("unchecked") T equalToValid(boolean filterByValid); List<Filter> getNameFilters(); void addEqualToNameFilter(String filterByName); @SuppressWarnings("unchecked") T equalToName(String filterByName); List<Filter> getStatusFilters(); void addEqualToStatusFilter(TrustedCertificateStatus filterByStatus); @SuppressWarnings("unchecked") T equalToStatus(TrustedCertificateStatus filterByStatus); List<Filter> getDeviceExecutionModeFilters(); void addEqualToDeviceExecutionModeFilter(int filterByDeviceExecutionMode); @SuppressWarnings("unchecked") T equalToDeviceExecutionMode(int filterByDeviceExecutionMode); void addNotEqualToDeviceExecutionModeFilter(int filterByDeviceExecutionMode); @SuppressWarnings("unchecked") T notEqualToDeviceExecutionMode(int filterByDeviceExecutionMode); List<Filter> getIssuerFilters(); void addLikeIssuerFilter(String filterByIssuer); @SuppressWarnings("unchecked") T likeIssuer(String filterByIssuer); List<Filter> getServiceFilters(); void addEqualToServiceFilter(TrustedCertificateService filterByService); @SuppressWarnings("unchecked") T equalToService(TrustedCertificateService filterByService); List<Filter> getSubjectFilters(); void addLikeSubjectFilter(String filterBySubject); @SuppressWarnings("unchecked") T likeSubject(String filterBySubject); List<Filter> getEnrollmentModeFilters(); void addEqualToEnrollmentModeFilter(boolean filterByEnrollmentMode); @SuppressWarnings("unchecked") T equalToEnrollmentMode(boolean filterByEnrollmentMode); @Override String toString(); @Override TrustedCertificateListOptions clone(); @Override boolean equals(Object obj); @Override @SuppressWarnings("PMD.UselessOverridingMethod") int hashCode(); static final String TAG_FILTER_BY_DEVICE_EXECUTION_MODE; static final String TAG_FILTER_BY_ENROLLMENT_MODE; static final String TAG_FILTER_BY_ISSUER; static final String TAG_FILTER_BY_NAME; static final String TAG_FILTER_BY_SERVICE; static final String TAG_FILTER_BY_STATUS; static final String TAG_FILTER_BY_SUBJECT; static final String TAG_FILTER_BY_VALID; } |
@SuppressWarnings("resource") @Test public void testClone() { try { PreSharedKeyListOptions presharedkeylistoptions1 = new PreSharedKeyListOptions(Integer.valueOf(46), Long.valueOf(-31), Order.getDefault(), "7d7d94bb-63a2-422b-aa73-d6dac53f13cb", null, null); PreSharedKeyListOptions presharedkeylistoptions2 = presharedkeylistoptions1.clone(); assertNotNull(presharedkeylistoptions1); assertNotNull(presharedkeylistoptions2); assertNotSame(presharedkeylistoptions2, presharedkeylistoptions1); assertEquals(presharedkeylistoptions2, presharedkeylistoptions1); } catch (Exception exception) { fail(exception.getMessage()); } } | @Override public PreSharedKeyListOptions clone() { final PreSharedKeyListOptions opt = new PreSharedKeyListOptions(); opt.setOptions(this); return opt; } | PreSharedKeyListOptions extends ListOptions { @Override public PreSharedKeyListOptions clone() { final PreSharedKeyListOptions opt = new PreSharedKeyListOptions(); opt.setOptions(this); return opt; } } | PreSharedKeyListOptions extends ListOptions { @Override public PreSharedKeyListOptions clone() { final PreSharedKeyListOptions opt = new PreSharedKeyListOptions(); opt.setOptions(this); return opt; } @Internal PreSharedKeyListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal PreSharedKeyListOptions(PreSharedKeyListOptions preSharedKeyListOptions); PreSharedKeyListOptions(); @Internal PreSharedKeyListOptions(String after, Filters filter); } | PreSharedKeyListOptions extends ListOptions { @Override public PreSharedKeyListOptions clone() { final PreSharedKeyListOptions opt = new PreSharedKeyListOptions(); opt.setOptions(this); return opt; } @Internal PreSharedKeyListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal PreSharedKeyListOptions(PreSharedKeyListOptions preSharedKeyListOptions); PreSharedKeyListOptions(); @Internal PreSharedKeyListOptions(String after, Filters filter); @Override String toString(); @Override PreSharedKeyListOptions clone(); @Override boolean equals(Object obj); @Override @SuppressWarnings("PMD.UselessOverridingMethod") int hashCode(); } | PreSharedKeyListOptions extends ListOptions { @Override public PreSharedKeyListOptions clone() { final PreSharedKeyListOptions opt = new PreSharedKeyListOptions(); opt.setOptions(this); return opt; } @Internal PreSharedKeyListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal PreSharedKeyListOptions(PreSharedKeyListOptions preSharedKeyListOptions); PreSharedKeyListOptions(); @Internal PreSharedKeyListOptions(String after, Filters filter); @Override String toString(); @Override PreSharedKeyListOptions clone(); @Override boolean equals(Object obj); @Override @SuppressWarnings("PMD.UselessOverridingMethod") int hashCode(); } |
@SuppressWarnings("resource") @Test public void testHashCode() { try { PreSharedKeyListOptions presharedkeylistoptions1 = new PreSharedKeyListOptions(Integer.valueOf(-77), Long.valueOf(-91), Order.getDefault(), "25769883-3a5a-45e7-8db4-28e644b43a60", null, null); PreSharedKeyListOptions presharedkeylistoptions2 = new PreSharedKeyListOptions(Integer.valueOf(-77), Long.valueOf(-91), Order.getDefault(), "25769883-3a5a-45e7-8db4-28e644b43a60", null, null); assertNotNull(presharedkeylistoptions1); assertNotNull(presharedkeylistoptions2); assertNotSame(presharedkeylistoptions2, presharedkeylistoptions1); assertEquals(presharedkeylistoptions2, presharedkeylistoptions1); assertEquals(presharedkeylistoptions2.hashCode(), presharedkeylistoptions1.hashCode()); int hashCode = presharedkeylistoptions1.hashCode(); for (int i = 0; i < 5; i++) { assertEquals(hashCode, presharedkeylistoptions1.hashCode()); } } catch (Exception exception) { fail(exception.getMessage()); } } | @Override @SuppressWarnings("PMD.UselessOverridingMethod") public int hashCode() { return super.hashCode(); } | PreSharedKeyListOptions extends ListOptions { @Override @SuppressWarnings("PMD.UselessOverridingMethod") public int hashCode() { return super.hashCode(); } } | PreSharedKeyListOptions extends ListOptions { @Override @SuppressWarnings("PMD.UselessOverridingMethod") public int hashCode() { return super.hashCode(); } @Internal PreSharedKeyListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal PreSharedKeyListOptions(PreSharedKeyListOptions preSharedKeyListOptions); PreSharedKeyListOptions(); @Internal PreSharedKeyListOptions(String after, Filters filter); } | PreSharedKeyListOptions extends ListOptions { @Override @SuppressWarnings("PMD.UselessOverridingMethod") public int hashCode() { return super.hashCode(); } @Internal PreSharedKeyListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal PreSharedKeyListOptions(PreSharedKeyListOptions preSharedKeyListOptions); PreSharedKeyListOptions(); @Internal PreSharedKeyListOptions(String after, Filters filter); @Override String toString(); @Override PreSharedKeyListOptions clone(); @Override boolean equals(Object obj); @Override @SuppressWarnings("PMD.UselessOverridingMethod") int hashCode(); } | PreSharedKeyListOptions extends ListOptions { @Override @SuppressWarnings("PMD.UselessOverridingMethod") public int hashCode() { return super.hashCode(); } @Internal PreSharedKeyListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal PreSharedKeyListOptions(PreSharedKeyListOptions preSharedKeyListOptions); PreSharedKeyListOptions(); @Internal PreSharedKeyListOptions(String after, Filters filter); @Override String toString(); @Override PreSharedKeyListOptions clone(); @Override boolean equals(Object obj); @Override @SuppressWarnings("PMD.UselessOverridingMethod") int hashCode(); } |
@SuppressWarnings("resource") @Test public void testEquals() { try { PreSharedKeyListOptions presharedkeylistoptions1 = new PreSharedKeyListOptions(Integer.valueOf(62), Long.valueOf(-65), Order.getDefault(), "15c77751-457d-45e4-a4a8-d9b1c0a45121", null, null); PreSharedKeyListOptions presharedkeylistoptions2 = new PreSharedKeyListOptions(Integer.valueOf(62), Long.valueOf(-65), Order.getDefault(), "15c77751-457d-45e4-a4a8-d9b1c0a45121", null, null); PreSharedKeyListOptions presharedkeylistoptions3 = new PreSharedKeyListOptions(Integer.valueOf(-114), Long.valueOf(30), Order.getDefault(), "30e458ef-456e-4391-8967-d3c1b28ee0e3", null, null); assertNotNull(presharedkeylistoptions1); assertNotNull(presharedkeylistoptions2); assertNotNull(presharedkeylistoptions3); assertNotSame(presharedkeylistoptions2, presharedkeylistoptions1); assertNotSame(presharedkeylistoptions3, presharedkeylistoptions1); assertEquals(presharedkeylistoptions2, presharedkeylistoptions1); assertEquals(presharedkeylistoptions2, presharedkeylistoptions1); assertEquals(presharedkeylistoptions1, presharedkeylistoptions2); assertEquals(presharedkeylistoptions1, presharedkeylistoptions1); assertFalse(presharedkeylistoptions1.equals(null)); assertNotEquals(presharedkeylistoptions3, presharedkeylistoptions1); } catch (Exception exception) { fail(exception.getMessage()); } } | @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!super.equals(obj)) { return false; } if (!(obj instanceof PreSharedKeyListOptions)) { return false; } final PreSharedKeyListOptions other = (PreSharedKeyListOptions) obj; if (!other.canEqual(this)) { return false; } return true; } | PreSharedKeyListOptions extends ListOptions { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!super.equals(obj)) { return false; } if (!(obj instanceof PreSharedKeyListOptions)) { return false; } final PreSharedKeyListOptions other = (PreSharedKeyListOptions) obj; if (!other.canEqual(this)) { return false; } return true; } } | PreSharedKeyListOptions extends ListOptions { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!super.equals(obj)) { return false; } if (!(obj instanceof PreSharedKeyListOptions)) { return false; } final PreSharedKeyListOptions other = (PreSharedKeyListOptions) obj; if (!other.canEqual(this)) { return false; } return true; } @Internal PreSharedKeyListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal PreSharedKeyListOptions(PreSharedKeyListOptions preSharedKeyListOptions); PreSharedKeyListOptions(); @Internal PreSharedKeyListOptions(String after, Filters filter); } | PreSharedKeyListOptions extends ListOptions { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!super.equals(obj)) { return false; } if (!(obj instanceof PreSharedKeyListOptions)) { return false; } final PreSharedKeyListOptions other = (PreSharedKeyListOptions) obj; if (!other.canEqual(this)) { return false; } return true; } @Internal PreSharedKeyListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal PreSharedKeyListOptions(PreSharedKeyListOptions preSharedKeyListOptions); PreSharedKeyListOptions(); @Internal PreSharedKeyListOptions(String after, Filters filter); @Override String toString(); @Override PreSharedKeyListOptions clone(); @Override boolean equals(Object obj); @Override @SuppressWarnings("PMD.UselessOverridingMethod") int hashCode(); } | PreSharedKeyListOptions extends ListOptions { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!super.equals(obj)) { return false; } if (!(obj instanceof PreSharedKeyListOptions)) { return false; } final PreSharedKeyListOptions other = (PreSharedKeyListOptions) obj; if (!other.canEqual(this)) { return false; } return true; } @Internal PreSharedKeyListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal PreSharedKeyListOptions(PreSharedKeyListOptions preSharedKeyListOptions); PreSharedKeyListOptions(); @Internal PreSharedKeyListOptions(String after, Filters filter); @Override String toString(); @Override PreSharedKeyListOptions clone(); @Override boolean equals(Object obj); @Override @SuppressWarnings("PMD.UselessOverridingMethod") int hashCode(); } |
@Test public void testToByteArrayConversion() { String encodedSource = "VGhpcyBpcyBhIHRlc3QgZm9yIGRlY29kaW5nIGJhc2U2NCBlbmNvZGVkIHN0cmluZ3M="; byte[] encodedByteArray = { 0x56, 0x47, 0x68, 0x70, 0x63, 0x79, 0x42, 0x70, 0x63, 0x79, 0x42, 0x68, 0x49, 0x48, 0x52, 0x6c, 0x63, 0x33, 0x51, 0x67, 0x5a, 0x6d, 0x39, 0x79, 0x49, 0x47, 0x52, 0x6c, 0x59, 0x32, 0x39, 0x6b, 0x61, 0x57, 0x35, 0x6e, 0x49, 0x47, 0x4a, 0x68, 0x63, 0x32, 0x55, 0x32, 0x4e, 0x43, 0x42, 0x6c, 0x62, 0x6d, 0x4e, 0x76, 0x5a, 0x47, 0x56, 0x6b, 0x49, 0x48, 0x4e, 0x30, 0x63, 0x6d, 0x6c, 0x75, 0x5a, 0x33, 0x4d, 0x3d }; String expectedDecodedValue = "This is a test for decoding base64 encoded strings"; byte[] expectedDecodedByteArray = { 0x54, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x61, 0x20, 0x74, 0x65, 0x73, 0x74, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x64, 0x65, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x62, 0x61, 0x73, 0x65, 0x36, 0x34, 0x20, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x73 }; assertArrayEquals(expectedDecodedByteArray, TranslationUtils.toByteArray(expectedDecodedValue)); assertArrayEquals(expectedDecodedByteArray, TranslationUtils.toByteArray(expectedDecodedByteArray)); assertArrayEquals(encodedByteArray, TranslationUtils.toByteArray(new Base64(expectedDecodedByteArray))); assertArrayEquals(encodedByteArray, TranslationUtils.toByteArray(Base64.decode(encodedSource))); } | public static byte[] toByteArray(Object obj) { if (obj == null) { return null; } if (obj instanceof String) { return ((String) obj).getBytes(StandardCharsets.UTF_8); } if (obj instanceof byte[]) { return ((byte[]) obj); } if (obj instanceof Base64) { return ((Base64) obj).getEncodedArray(); } return null; } | TranslationUtils { public static byte[] toByteArray(Object obj) { if (obj == null) { return null; } if (obj instanceof String) { return ((String) obj).getBytes(StandardCharsets.UTF_8); } if (obj instanceof byte[]) { return ((byte[]) obj); } if (obj instanceof Base64) { return ((Base64) obj).getEncodedArray(); } return null; } } | TranslationUtils { public static byte[] toByteArray(Object obj) { if (obj == null) { return null; } if (obj instanceof String) { return ((String) obj).getBytes(StandardCharsets.UTF_8); } if (obj instanceof byte[]) { return ((byte[]) obj); } if (obj instanceof Base64) { return ((Base64) obj).getEncodedArray(); } return null; } private TranslationUtils(); } | TranslationUtils { public static byte[] toByteArray(Object obj) { if (obj == null) { return null; } if (obj instanceof String) { return ((String) obj).getBytes(StandardCharsets.UTF_8); } if (obj instanceof byte[]) { return ((byte[]) obj); } if (obj instanceof Base64) { return ((Base64) obj).getEncodedArray(); } return null; } private TranslationUtils(); static Date toDate(DateTime date); static Date toDate(LocalDate ldate); static Date toDate(Calendar date); static Date toDate(Number timestamp); static Date toDate(Number timestamp, TimeUnit unit); static DateTime toDateTime(Date date); static LocalDate toLocalDate(Date date); static DataFile toDataFile(File file); static DataFile toDataFile(String filePath); static long toLong(Number longE); static long toLong(Date value); static long toLong(String value); static long toLong(Number longE, long defaultValue); static long toLong(Date value, long defaultValue); static long toLong(String stringContainingANumber, long defaultValue); static int toInt(Number number); static int toInt(String value); static int toInt(Number integer, int defaultV); static int toInt(String value, int defaultV); static Integer toInteger(String value, Integer defaultV); static boolean toBool(Boolean bool); static boolean toBool(String value); static boolean toBool(Boolean bool, boolean defaultB); static boolean toBool(String value, boolean defaultV); static double toDouble(Number value); static double toDouble(String value); static double toDouble(Number value, double defaultD); static double toDouble(String value, double defaultD); static URL toUrl(String url); static String toString(Object obj); static Base64 toBase64(Object obj); static byte[] toByteArray(Object obj); static synchronized Date convertTimestamp(String timestamp); static synchronized Date convertTimestamp(String timestamp, Date defaultDate); static synchronized Date convertTimestamp(String timestamp, DateFormat format, Date defaultDate); static synchronized Date convertTimestamp(String timestamp, DateFormat format); static synchronized Date convertRfc3339Timestamp(String timestamp); static synchronized Date convertRfc3339Timestamp(String timestamp, Date defaultDate); static synchronized String toDefaultTimestamp(Date date); static synchronized String toRfc3339Timestamp(Date date); static String toTimestamp(Date date, DateFormat format); static List<String> parseList(String string, String separator); static DateTime moveToUtc(Date date); static Date moveDateTimeToUtc(Date date); static String toUtcTimestamp(Date date); static Date convertStringToDate(String valueStr); } | TranslationUtils { public static byte[] toByteArray(Object obj) { if (obj == null) { return null; } if (obj instanceof String) { return ((String) obj).getBytes(StandardCharsets.UTF_8); } if (obj instanceof byte[]) { return ((byte[]) obj); } if (obj instanceof Base64) { return ((Base64) obj).getEncodedArray(); } return null; } private TranslationUtils(); static Date toDate(DateTime date); static Date toDate(LocalDate ldate); static Date toDate(Calendar date); static Date toDate(Number timestamp); static Date toDate(Number timestamp, TimeUnit unit); static DateTime toDateTime(Date date); static LocalDate toLocalDate(Date date); static DataFile toDataFile(File file); static DataFile toDataFile(String filePath); static long toLong(Number longE); static long toLong(Date value); static long toLong(String value); static long toLong(Number longE, long defaultValue); static long toLong(Date value, long defaultValue); static long toLong(String stringContainingANumber, long defaultValue); static int toInt(Number number); static int toInt(String value); static int toInt(Number integer, int defaultV); static int toInt(String value, int defaultV); static Integer toInteger(String value, Integer defaultV); static boolean toBool(Boolean bool); static boolean toBool(String value); static boolean toBool(Boolean bool, boolean defaultB); static boolean toBool(String value, boolean defaultV); static double toDouble(Number value); static double toDouble(String value); static double toDouble(Number value, double defaultD); static double toDouble(String value, double defaultD); static URL toUrl(String url); static String toString(Object obj); static Base64 toBase64(Object obj); static byte[] toByteArray(Object obj); static synchronized Date convertTimestamp(String timestamp); static synchronized Date convertTimestamp(String timestamp, Date defaultDate); static synchronized Date convertTimestamp(String timestamp, DateFormat format, Date defaultDate); static synchronized Date convertTimestamp(String timestamp, DateFormat format); static synchronized Date convertRfc3339Timestamp(String timestamp); static synchronized Date convertRfc3339Timestamp(String timestamp, Date defaultDate); static synchronized String toDefaultTimestamp(Date date); static synchronized String toRfc3339Timestamp(Date date); static String toTimestamp(Date date, DateFormat format); static List<String> parseList(String string, String separator); static DateTime moveToUtc(Date date); static Date moveDateTimeToUtc(Date date); static String toUtcTimestamp(Date date); static Date convertStringToDate(String valueStr); static final String METHOD_CONVERT_STRING_TO_DATE; static final String METHOD_CONVERT_OTHER_TO_DATE; static final String METHOD_CONVERT_DATE_TO_DATETIME; static final String METHOD_CONVERT_DATE_TO_LOCALDATE; static final String METHOD_CONVERT_DATE_TO_STRING; static final String METHOD_CONVERT_STRING_TO_URL; static final String METHOD_CONVERT_BOOL_TO_BOOL; static final String METHOD_CONVERT_NUMBER_TO_LONG; static final String METHOD_CONVERT_NUMBER_TO_INT; static final String METHOD_CONVERT_NUMBER_TO_DOUBLE; static final String METHOD_CONVERT_ANY_TO_STRING; static final String METHOD_CONVERT_ANY_TO_BYTE_ARRAY; static final String METHOD_CONVERT_ANY_TO_BASE64; static final String METHOD_CONVERT_TO_DATA_FILE; } |
@SuppressWarnings("resource") @Test public void testClone() { try { SubtenantLightThemeColorDao subtenantlightthemecolordao1 = new SubtenantLightThemeColorDao(); SubtenantLightThemeColorDao subtenantlightthemecolordao2 = subtenantlightthemecolordao1.clone(); assertNotNull(subtenantlightthemecolordao1); assertNotNull(subtenantlightthemecolordao2); assertNotSame(subtenantlightthemecolordao2, subtenantlightthemecolordao1); assertEquals(subtenantlightthemecolordao2, subtenantlightthemecolordao1); } catch (Exception exception) { fail(exception.getMessage()); } } | @Override @SuppressWarnings({ "resource", "unused" }) public SubtenantLightThemeColorDao clone() { try { return new SubtenantLightThemeColorDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } | SubtenantLightThemeColorDao extends AbstractSubtenantLightThemeColorDao { @Override @SuppressWarnings({ "resource", "unused" }) public SubtenantLightThemeColorDao clone() { try { return new SubtenantLightThemeColorDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } } | SubtenantLightThemeColorDao extends AbstractSubtenantLightThemeColorDao { @Override @SuppressWarnings({ "resource", "unused" }) public SubtenantLightThemeColorDao clone() { try { return new SubtenantLightThemeColorDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } SubtenantLightThemeColorDao(); SubtenantLightThemeColorDao(ApiClientWrapper client); SubtenantLightThemeColorDao(ConnectionOptions options); SubtenantLightThemeColorDao(SdkContext sdkContext); } | SubtenantLightThemeColorDao extends AbstractSubtenantLightThemeColorDao { @Override @SuppressWarnings({ "resource", "unused" }) public SubtenantLightThemeColorDao clone() { try { return new SubtenantLightThemeColorDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } SubtenantLightThemeColorDao(); SubtenantLightThemeColorDao(ApiClientWrapper client); SubtenantLightThemeColorDao(ConnectionOptions options); SubtenantLightThemeColorDao(SdkContext sdkContext); @Override @SuppressWarnings({ "resource", "unused" }) SubtenantLightThemeColorDao clone(); @Override @NotImplemented void delete(); @Override @NotImplemented void delete(SubtenantLightThemeColor modelToDelete); @Override @NotImplemented SubtenantLightThemeColor read(); @Override @NotImplemented SubtenantLightThemeColor update(); @Override @NotImplemented SubtenantLightThemeColor update(SubtenantLightThemeColor modelToUpdate); } | SubtenantLightThemeColorDao extends AbstractSubtenantLightThemeColorDao { @Override @SuppressWarnings({ "resource", "unused" }) public SubtenantLightThemeColorDao clone() { try { return new SubtenantLightThemeColorDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } SubtenantLightThemeColorDao(); SubtenantLightThemeColorDao(ApiClientWrapper client); SubtenantLightThemeColorDao(ConnectionOptions options); SubtenantLightThemeColorDao(SdkContext sdkContext); @Override @SuppressWarnings({ "resource", "unused" }) SubtenantLightThemeColorDao clone(); @Override @NotImplemented void delete(); @Override @NotImplemented void delete(SubtenantLightThemeColor modelToDelete); @Override @NotImplemented SubtenantLightThemeColor read(); @Override @NotImplemented SubtenantLightThemeColor update(); @Override @NotImplemented SubtenantLightThemeColor update(SubtenantLightThemeColor modelToUpdate); } |
@SuppressWarnings("resource") @Test public void testClone() { try { LightThemeColorListDao lightthemecolorlistdao1 = new LightThemeColorListDao(); LightThemeColorListDao lightthemecolorlistdao2 = lightthemecolorlistdao1.clone(); assertNotNull(lightthemecolorlistdao1); assertNotNull(lightthemecolorlistdao2); assertNotSame(lightthemecolorlistdao2, lightthemecolorlistdao1); assertEquals(lightthemecolorlistdao2, lightthemecolorlistdao1); } catch (Exception exception) { fail(exception.getMessage()); } } | @Override @SuppressWarnings({ "resource", "unused" }) public LightThemeColorListDao clone() { try { return new LightThemeColorListDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } | LightThemeColorListDao extends AbstractModelListDao<LightThemeColor, LightThemeColorListOptions> implements ModelListDao<LightThemeColor, LightThemeColorListOptions> { @Override @SuppressWarnings({ "resource", "unused" }) public LightThemeColorListDao clone() { try { return new LightThemeColorListDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } } | LightThemeColorListDao extends AbstractModelListDao<LightThemeColor, LightThemeColorListOptions> implements ModelListDao<LightThemeColor, LightThemeColorListOptions> { @Override @SuppressWarnings({ "resource", "unused" }) public LightThemeColorListDao clone() { try { return new LightThemeColorListDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } LightThemeColorListDao(); LightThemeColorListDao(ApiClientWrapper client); LightThemeColorListDao(ConnectionOptions options); LightThemeColorListDao(SdkContext sdkContext); } | LightThemeColorListDao extends AbstractModelListDao<LightThemeColor, LightThemeColorListOptions> implements ModelListDao<LightThemeColor, LightThemeColorListOptions> { @Override @SuppressWarnings({ "resource", "unused" }) public LightThemeColorListDao clone() { try { return new LightThemeColorListDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } LightThemeColorListDao(); LightThemeColorListDao(ApiClientWrapper client); LightThemeColorListDao(ConnectionOptions options); LightThemeColorListDao(SdkContext sdkContext); @Override @SuppressWarnings({ "resource", "unused" }) LightThemeColorListDao clone(); @Override @Internal @SuppressWarnings("unchecked") Class<LightThemeColorDao> getModelDaoClass(); @Override @Internal @SuppressWarnings({ "unchecked", "resource" }) LightThemeColorDao getNewModelDao(); } | LightThemeColorListDao extends AbstractModelListDao<LightThemeColor, LightThemeColorListOptions> implements ModelListDao<LightThemeColor, LightThemeColorListOptions> { @Override @SuppressWarnings({ "resource", "unused" }) public LightThemeColorListDao clone() { try { return new LightThemeColorListDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } LightThemeColorListDao(); LightThemeColorListDao(ApiClientWrapper client); LightThemeColorListDao(ConnectionOptions options); LightThemeColorListDao(SdkContext sdkContext); @Override @SuppressWarnings({ "resource", "unused" }) LightThemeColorListDao clone(); @Override @Internal @SuppressWarnings("unchecked") Class<LightThemeColorDao> getModelDaoClass(); @Override @Internal @SuppressWarnings({ "unchecked", "resource" }) LightThemeColorDao getNewModelDao(); } |
@SuppressWarnings("resource") @Test public void testClone() { try { SubtenantDarkThemeImageListOptions subtenantdarkthemeimagelistoptions1 = new SubtenantDarkThemeImageListOptions(Integer.valueOf(67), Long.valueOf(70), Order.getDefault(), "9ccbb436-c74e-440e-b595-bfd773a81e92", null, null); SubtenantDarkThemeImageListOptions subtenantdarkthemeimagelistoptions2 = subtenantdarkthemeimagelistoptions1.clone(); assertNotNull(subtenantdarkthemeimagelistoptions1); assertNotNull(subtenantdarkthemeimagelistoptions2); assertNotSame(subtenantdarkthemeimagelistoptions2, subtenantdarkthemeimagelistoptions1); assertEquals(subtenantdarkthemeimagelistoptions2, subtenantdarkthemeimagelistoptions1); } catch (Exception exception) { fail(exception.getMessage()); } } | @Override public SubtenantDarkThemeImageListOptions clone() { final SubtenantDarkThemeImageListOptions opt = new SubtenantDarkThemeImageListOptions(); opt.setOptions(this); return opt; } | SubtenantDarkThemeImageListOptions extends ListOptions { @Override public SubtenantDarkThemeImageListOptions clone() { final SubtenantDarkThemeImageListOptions opt = new SubtenantDarkThemeImageListOptions(); opt.setOptions(this); return opt; } } | SubtenantDarkThemeImageListOptions extends ListOptions { @Override public SubtenantDarkThemeImageListOptions clone() { final SubtenantDarkThemeImageListOptions opt = new SubtenantDarkThemeImageListOptions(); opt.setOptions(this); return opt; } @Internal SubtenantDarkThemeImageListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal SubtenantDarkThemeImageListOptions(SubtenantDarkThemeImageListOptions subtenantDarkThemeImageListOptions); SubtenantDarkThemeImageListOptions(); @Internal SubtenantDarkThemeImageListOptions(String after, Filters filter); } | SubtenantDarkThemeImageListOptions extends ListOptions { @Override public SubtenantDarkThemeImageListOptions clone() { final SubtenantDarkThemeImageListOptions opt = new SubtenantDarkThemeImageListOptions(); opt.setOptions(this); return opt; } @Internal SubtenantDarkThemeImageListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal SubtenantDarkThemeImageListOptions(SubtenantDarkThemeImageListOptions subtenantDarkThemeImageListOptions); SubtenantDarkThemeImageListOptions(); @Internal SubtenantDarkThemeImageListOptions(String after, Filters filter); @Override String toString(); @Override SubtenantDarkThemeImageListOptions clone(); @Override boolean equals(Object obj); @Override @SuppressWarnings("PMD.UselessOverridingMethod") int hashCode(); } | SubtenantDarkThemeImageListOptions extends ListOptions { @Override public SubtenantDarkThemeImageListOptions clone() { final SubtenantDarkThemeImageListOptions opt = new SubtenantDarkThemeImageListOptions(); opt.setOptions(this); return opt; } @Internal SubtenantDarkThemeImageListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal SubtenantDarkThemeImageListOptions(SubtenantDarkThemeImageListOptions subtenantDarkThemeImageListOptions); SubtenantDarkThemeImageListOptions(); @Internal SubtenantDarkThemeImageListOptions(String after, Filters filter); @Override String toString(); @Override SubtenantDarkThemeImageListOptions clone(); @Override boolean equals(Object obj); @Override @SuppressWarnings("PMD.UselessOverridingMethod") int hashCode(); } |
@SuppressWarnings("resource") @Test public void testHashCode() { try { SubtenantDarkThemeImageListOptions subtenantdarkthemeimagelistoptions1 = new SubtenantDarkThemeImageListOptions(Integer.valueOf(10), Long.valueOf(-27), Order.getDefault(), "1b0884d9-4bb9-4a6d-adb6-b77819885630", null, null); SubtenantDarkThemeImageListOptions subtenantdarkthemeimagelistoptions2 = new SubtenantDarkThemeImageListOptions(Integer.valueOf(10), Long.valueOf(-27), Order.getDefault(), "1b0884d9-4bb9-4a6d-adb6-b77819885630", null, null); assertNotNull(subtenantdarkthemeimagelistoptions1); assertNotNull(subtenantdarkthemeimagelistoptions2); assertNotSame(subtenantdarkthemeimagelistoptions2, subtenantdarkthemeimagelistoptions1); assertEquals(subtenantdarkthemeimagelistoptions2, subtenantdarkthemeimagelistoptions1); assertEquals(subtenantdarkthemeimagelistoptions2.hashCode(), subtenantdarkthemeimagelistoptions1.hashCode()); int hashCode = subtenantdarkthemeimagelistoptions1.hashCode(); for (int i = 0; i < 5; i++) { assertEquals(hashCode, subtenantdarkthemeimagelistoptions1.hashCode()); } } catch (Exception exception) { fail(exception.getMessage()); } } | @Override @SuppressWarnings("PMD.UselessOverridingMethod") public int hashCode() { return super.hashCode(); } | SubtenantDarkThemeImageListOptions extends ListOptions { @Override @SuppressWarnings("PMD.UselessOverridingMethod") public int hashCode() { return super.hashCode(); } } | SubtenantDarkThemeImageListOptions extends ListOptions { @Override @SuppressWarnings("PMD.UselessOverridingMethod") public int hashCode() { return super.hashCode(); } @Internal SubtenantDarkThemeImageListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal SubtenantDarkThemeImageListOptions(SubtenantDarkThemeImageListOptions subtenantDarkThemeImageListOptions); SubtenantDarkThemeImageListOptions(); @Internal SubtenantDarkThemeImageListOptions(String after, Filters filter); } | SubtenantDarkThemeImageListOptions extends ListOptions { @Override @SuppressWarnings("PMD.UselessOverridingMethod") public int hashCode() { return super.hashCode(); } @Internal SubtenantDarkThemeImageListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal SubtenantDarkThemeImageListOptions(SubtenantDarkThemeImageListOptions subtenantDarkThemeImageListOptions); SubtenantDarkThemeImageListOptions(); @Internal SubtenantDarkThemeImageListOptions(String after, Filters filter); @Override String toString(); @Override SubtenantDarkThemeImageListOptions clone(); @Override boolean equals(Object obj); @Override @SuppressWarnings("PMD.UselessOverridingMethod") int hashCode(); } | SubtenantDarkThemeImageListOptions extends ListOptions { @Override @SuppressWarnings("PMD.UselessOverridingMethod") public int hashCode() { return super.hashCode(); } @Internal SubtenantDarkThemeImageListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal SubtenantDarkThemeImageListOptions(SubtenantDarkThemeImageListOptions subtenantDarkThemeImageListOptions); SubtenantDarkThemeImageListOptions(); @Internal SubtenantDarkThemeImageListOptions(String after, Filters filter); @Override String toString(); @Override SubtenantDarkThemeImageListOptions clone(); @Override boolean equals(Object obj); @Override @SuppressWarnings("PMD.UselessOverridingMethod") int hashCode(); } |
@SuppressWarnings("resource") @Test public void testEquals() { try { SubtenantDarkThemeImageListOptions subtenantdarkthemeimagelistoptions1 = new SubtenantDarkThemeImageListOptions(Integer.valueOf(109), Long.valueOf(114), Order.getDefault(), "7b022953-5c5a-4b9a-afe5-77e2507595cc", null, null); SubtenantDarkThemeImageListOptions subtenantdarkthemeimagelistoptions2 = new SubtenantDarkThemeImageListOptions(Integer.valueOf(109), Long.valueOf(114), Order.getDefault(), "7b022953-5c5a-4b9a-afe5-77e2507595cc", null, null); SubtenantDarkThemeImageListOptions subtenantdarkthemeimagelistoptions3 = new SubtenantDarkThemeImageListOptions(Integer.valueOf(-66), Long.valueOf(-40), Order.getDefault(), "e9d43b78-2ee7-45d4-985d-393bd6599ee4", null, null); assertNotNull(subtenantdarkthemeimagelistoptions1); assertNotNull(subtenantdarkthemeimagelistoptions2); assertNotNull(subtenantdarkthemeimagelistoptions3); assertNotSame(subtenantdarkthemeimagelistoptions2, subtenantdarkthemeimagelistoptions1); assertNotSame(subtenantdarkthemeimagelistoptions3, subtenantdarkthemeimagelistoptions1); assertEquals(subtenantdarkthemeimagelistoptions2, subtenantdarkthemeimagelistoptions1); assertEquals(subtenantdarkthemeimagelistoptions2, subtenantdarkthemeimagelistoptions1); assertEquals(subtenantdarkthemeimagelistoptions1, subtenantdarkthemeimagelistoptions2); assertEquals(subtenantdarkthemeimagelistoptions1, subtenantdarkthemeimagelistoptions1); assertFalse(subtenantdarkthemeimagelistoptions1.equals(null)); assertNotEquals(subtenantdarkthemeimagelistoptions3, subtenantdarkthemeimagelistoptions1); } catch (Exception exception) { fail(exception.getMessage()); } } | @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!super.equals(obj)) { return false; } if (!(obj instanceof SubtenantDarkThemeImageListOptions)) { return false; } final SubtenantDarkThemeImageListOptions other = (SubtenantDarkThemeImageListOptions) obj; if (!other.canEqual(this)) { return false; } return true; } | SubtenantDarkThemeImageListOptions extends ListOptions { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!super.equals(obj)) { return false; } if (!(obj instanceof SubtenantDarkThemeImageListOptions)) { return false; } final SubtenantDarkThemeImageListOptions other = (SubtenantDarkThemeImageListOptions) obj; if (!other.canEqual(this)) { return false; } return true; } } | SubtenantDarkThemeImageListOptions extends ListOptions { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!super.equals(obj)) { return false; } if (!(obj instanceof SubtenantDarkThemeImageListOptions)) { return false; } final SubtenantDarkThemeImageListOptions other = (SubtenantDarkThemeImageListOptions) obj; if (!other.canEqual(this)) { return false; } return true; } @Internal SubtenantDarkThemeImageListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal SubtenantDarkThemeImageListOptions(SubtenantDarkThemeImageListOptions subtenantDarkThemeImageListOptions); SubtenantDarkThemeImageListOptions(); @Internal SubtenantDarkThemeImageListOptions(String after, Filters filter); } | SubtenantDarkThemeImageListOptions extends ListOptions { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!super.equals(obj)) { return false; } if (!(obj instanceof SubtenantDarkThemeImageListOptions)) { return false; } final SubtenantDarkThemeImageListOptions other = (SubtenantDarkThemeImageListOptions) obj; if (!other.canEqual(this)) { return false; } return true; } @Internal SubtenantDarkThemeImageListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal SubtenantDarkThemeImageListOptions(SubtenantDarkThemeImageListOptions subtenantDarkThemeImageListOptions); SubtenantDarkThemeImageListOptions(); @Internal SubtenantDarkThemeImageListOptions(String after, Filters filter); @Override String toString(); @Override SubtenantDarkThemeImageListOptions clone(); @Override boolean equals(Object obj); @Override @SuppressWarnings("PMD.UselessOverridingMethod") int hashCode(); } | SubtenantDarkThemeImageListOptions extends ListOptions { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!super.equals(obj)) { return false; } if (!(obj instanceof SubtenantDarkThemeImageListOptions)) { return false; } final SubtenantDarkThemeImageListOptions other = (SubtenantDarkThemeImageListOptions) obj; if (!other.canEqual(this)) { return false; } return true; } @Internal SubtenantDarkThemeImageListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal SubtenantDarkThemeImageListOptions(SubtenantDarkThemeImageListOptions subtenantDarkThemeImageListOptions); SubtenantDarkThemeImageListOptions(); @Internal SubtenantDarkThemeImageListOptions(String after, Filters filter); @Override String toString(); @Override SubtenantDarkThemeImageListOptions clone(); @Override boolean equals(Object obj); @Override @SuppressWarnings("PMD.UselessOverridingMethod") int hashCode(); } |
@SuppressWarnings("resource") @Test public void testClone() { try { SubtenantLightThemeImageListOptions subtenantlightthemeimagelistoptions1 = new SubtenantLightThemeImageListOptions(Integer.valueOf(117), Long.valueOf(-75), Order.getDefault(), "99d8ea69-16e7-4650-b19b-d45723d03ece", null, null); SubtenantLightThemeImageListOptions subtenantlightthemeimagelistoptions2 = subtenantlightthemeimagelistoptions1.clone(); assertNotNull(subtenantlightthemeimagelistoptions1); assertNotNull(subtenantlightthemeimagelistoptions2); assertNotSame(subtenantlightthemeimagelistoptions2, subtenantlightthemeimagelistoptions1); assertEquals(subtenantlightthemeimagelistoptions2, subtenantlightthemeimagelistoptions1); } catch (Exception exception) { fail(exception.getMessage()); } } | @Override public SubtenantLightThemeImageListOptions clone() { final SubtenantLightThemeImageListOptions opt = new SubtenantLightThemeImageListOptions(); opt.setOptions(this); return opt; } | SubtenantLightThemeImageListOptions extends ListOptions { @Override public SubtenantLightThemeImageListOptions clone() { final SubtenantLightThemeImageListOptions opt = new SubtenantLightThemeImageListOptions(); opt.setOptions(this); return opt; } } | SubtenantLightThemeImageListOptions extends ListOptions { @Override public SubtenantLightThemeImageListOptions clone() { final SubtenantLightThemeImageListOptions opt = new SubtenantLightThemeImageListOptions(); opt.setOptions(this); return opt; } @Internal SubtenantLightThemeImageListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal SubtenantLightThemeImageListOptions(SubtenantLightThemeImageListOptions subtenantLightThemeImageListOptions); SubtenantLightThemeImageListOptions(); @Internal SubtenantLightThemeImageListOptions(String after, Filters filter); } | SubtenantLightThemeImageListOptions extends ListOptions { @Override public SubtenantLightThemeImageListOptions clone() { final SubtenantLightThemeImageListOptions opt = new SubtenantLightThemeImageListOptions(); opt.setOptions(this); return opt; } @Internal SubtenantLightThemeImageListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal SubtenantLightThemeImageListOptions(SubtenantLightThemeImageListOptions subtenantLightThemeImageListOptions); SubtenantLightThemeImageListOptions(); @Internal SubtenantLightThemeImageListOptions(String after, Filters filter); @Override String toString(); @Override SubtenantLightThemeImageListOptions clone(); @Override boolean equals(Object obj); @Override @SuppressWarnings("PMD.UselessOverridingMethod") int hashCode(); } | SubtenantLightThemeImageListOptions extends ListOptions { @Override public SubtenantLightThemeImageListOptions clone() { final SubtenantLightThemeImageListOptions opt = new SubtenantLightThemeImageListOptions(); opt.setOptions(this); return opt; } @Internal SubtenantLightThemeImageListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal SubtenantLightThemeImageListOptions(SubtenantLightThemeImageListOptions subtenantLightThemeImageListOptions); SubtenantLightThemeImageListOptions(); @Internal SubtenantLightThemeImageListOptions(String after, Filters filter); @Override String toString(); @Override SubtenantLightThemeImageListOptions clone(); @Override boolean equals(Object obj); @Override @SuppressWarnings("PMD.UselessOverridingMethod") int hashCode(); } |
@SuppressWarnings("resource") @Test public void testHashCode() { try { SubtenantLightThemeImageListOptions subtenantlightthemeimagelistoptions1 = new SubtenantLightThemeImageListOptions(Integer.valueOf(24), Long.valueOf(-118), Order.getDefault(), "8bad2fa8-163f-4c57-8959-f6ea27f501d2", null, null); SubtenantLightThemeImageListOptions subtenantlightthemeimagelistoptions2 = new SubtenantLightThemeImageListOptions(Integer.valueOf(24), Long.valueOf(-118), Order.getDefault(), "8bad2fa8-163f-4c57-8959-f6ea27f501d2", null, null); assertNotNull(subtenantlightthemeimagelistoptions1); assertNotNull(subtenantlightthemeimagelistoptions2); assertNotSame(subtenantlightthemeimagelistoptions2, subtenantlightthemeimagelistoptions1); assertEquals(subtenantlightthemeimagelistoptions2, subtenantlightthemeimagelistoptions1); assertEquals(subtenantlightthemeimagelistoptions2.hashCode(), subtenantlightthemeimagelistoptions1.hashCode()); int hashCode = subtenantlightthemeimagelistoptions1.hashCode(); for (int i = 0; i < 5; i++) { assertEquals(hashCode, subtenantlightthemeimagelistoptions1.hashCode()); } } catch (Exception exception) { fail(exception.getMessage()); } } | @Override @SuppressWarnings("PMD.UselessOverridingMethod") public int hashCode() { return super.hashCode(); } | SubtenantLightThemeImageListOptions extends ListOptions { @Override @SuppressWarnings("PMD.UselessOverridingMethod") public int hashCode() { return super.hashCode(); } } | SubtenantLightThemeImageListOptions extends ListOptions { @Override @SuppressWarnings("PMD.UselessOverridingMethod") public int hashCode() { return super.hashCode(); } @Internal SubtenantLightThemeImageListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal SubtenantLightThemeImageListOptions(SubtenantLightThemeImageListOptions subtenantLightThemeImageListOptions); SubtenantLightThemeImageListOptions(); @Internal SubtenantLightThemeImageListOptions(String after, Filters filter); } | SubtenantLightThemeImageListOptions extends ListOptions { @Override @SuppressWarnings("PMD.UselessOverridingMethod") public int hashCode() { return super.hashCode(); } @Internal SubtenantLightThemeImageListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal SubtenantLightThemeImageListOptions(SubtenantLightThemeImageListOptions subtenantLightThemeImageListOptions); SubtenantLightThemeImageListOptions(); @Internal SubtenantLightThemeImageListOptions(String after, Filters filter); @Override String toString(); @Override SubtenantLightThemeImageListOptions clone(); @Override boolean equals(Object obj); @Override @SuppressWarnings("PMD.UselessOverridingMethod") int hashCode(); } | SubtenantLightThemeImageListOptions extends ListOptions { @Override @SuppressWarnings("PMD.UselessOverridingMethod") public int hashCode() { return super.hashCode(); } @Internal SubtenantLightThemeImageListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal SubtenantLightThemeImageListOptions(SubtenantLightThemeImageListOptions subtenantLightThemeImageListOptions); SubtenantLightThemeImageListOptions(); @Internal SubtenantLightThemeImageListOptions(String after, Filters filter); @Override String toString(); @Override SubtenantLightThemeImageListOptions clone(); @Override boolean equals(Object obj); @Override @SuppressWarnings("PMD.UselessOverridingMethod") int hashCode(); } |
@SuppressWarnings("resource") @Test public void testEquals() { try { SubtenantLightThemeImageListOptions subtenantlightthemeimagelistoptions1 = new SubtenantLightThemeImageListOptions(Integer.valueOf(57), Long.valueOf(-24), Order.getDefault(), "364089fd-5c1c-41bc-a548-5481aed2bda9", null, null); SubtenantLightThemeImageListOptions subtenantlightthemeimagelistoptions2 = new SubtenantLightThemeImageListOptions(Integer.valueOf(57), Long.valueOf(-24), Order.getDefault(), "364089fd-5c1c-41bc-a548-5481aed2bda9", null, null); SubtenantLightThemeImageListOptions subtenantlightthemeimagelistoptions3 = new SubtenantLightThemeImageListOptions(Integer.valueOf(105), Long.valueOf(-69), Order.getDefault(), "0c954604-2971-4833-8a17-34017ea68add", null, null); assertNotNull(subtenantlightthemeimagelistoptions1); assertNotNull(subtenantlightthemeimagelistoptions2); assertNotNull(subtenantlightthemeimagelistoptions3); assertNotSame(subtenantlightthemeimagelistoptions2, subtenantlightthemeimagelistoptions1); assertNotSame(subtenantlightthemeimagelistoptions3, subtenantlightthemeimagelistoptions1); assertEquals(subtenantlightthemeimagelistoptions2, subtenantlightthemeimagelistoptions1); assertEquals(subtenantlightthemeimagelistoptions2, subtenantlightthemeimagelistoptions1); assertEquals(subtenantlightthemeimagelistoptions1, subtenantlightthemeimagelistoptions2); assertEquals(subtenantlightthemeimagelistoptions1, subtenantlightthemeimagelistoptions1); assertFalse(subtenantlightthemeimagelistoptions1.equals(null)); assertNotEquals(subtenantlightthemeimagelistoptions3, subtenantlightthemeimagelistoptions1); } catch (Exception exception) { fail(exception.getMessage()); } } | @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!super.equals(obj)) { return false; } if (!(obj instanceof SubtenantLightThemeImageListOptions)) { return false; } final SubtenantLightThemeImageListOptions other = (SubtenantLightThemeImageListOptions) obj; if (!other.canEqual(this)) { return false; } return true; } | SubtenantLightThemeImageListOptions extends ListOptions { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!super.equals(obj)) { return false; } if (!(obj instanceof SubtenantLightThemeImageListOptions)) { return false; } final SubtenantLightThemeImageListOptions other = (SubtenantLightThemeImageListOptions) obj; if (!other.canEqual(this)) { return false; } return true; } } | SubtenantLightThemeImageListOptions extends ListOptions { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!super.equals(obj)) { return false; } if (!(obj instanceof SubtenantLightThemeImageListOptions)) { return false; } final SubtenantLightThemeImageListOptions other = (SubtenantLightThemeImageListOptions) obj; if (!other.canEqual(this)) { return false; } return true; } @Internal SubtenantLightThemeImageListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal SubtenantLightThemeImageListOptions(SubtenantLightThemeImageListOptions subtenantLightThemeImageListOptions); SubtenantLightThemeImageListOptions(); @Internal SubtenantLightThemeImageListOptions(String after, Filters filter); } | SubtenantLightThemeImageListOptions extends ListOptions { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!super.equals(obj)) { return false; } if (!(obj instanceof SubtenantLightThemeImageListOptions)) { return false; } final SubtenantLightThemeImageListOptions other = (SubtenantLightThemeImageListOptions) obj; if (!other.canEqual(this)) { return false; } return true; } @Internal SubtenantLightThemeImageListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal SubtenantLightThemeImageListOptions(SubtenantLightThemeImageListOptions subtenantLightThemeImageListOptions); SubtenantLightThemeImageListOptions(); @Internal SubtenantLightThemeImageListOptions(String after, Filters filter); @Override String toString(); @Override SubtenantLightThemeImageListOptions clone(); @Override boolean equals(Object obj); @Override @SuppressWarnings("PMD.UselessOverridingMethod") int hashCode(); } | SubtenantLightThemeImageListOptions extends ListOptions { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!super.equals(obj)) { return false; } if (!(obj instanceof SubtenantLightThemeImageListOptions)) { return false; } final SubtenantLightThemeImageListOptions other = (SubtenantLightThemeImageListOptions) obj; if (!other.canEqual(this)) { return false; } return true; } @Internal SubtenantLightThemeImageListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal SubtenantLightThemeImageListOptions(SubtenantLightThemeImageListOptions subtenantLightThemeImageListOptions); SubtenantLightThemeImageListOptions(); @Internal SubtenantLightThemeImageListOptions(String after, Filters filter); @Override String toString(); @Override SubtenantLightThemeImageListOptions clone(); @Override boolean equals(Object obj); @Override @SuppressWarnings("PMD.UselessOverridingMethod") int hashCode(); } |
@SuppressWarnings("resource") @Test public void testClone() { try { LightThemeColorDao lightthemecolordao1 = new LightThemeColorDao(); LightThemeColorDao lightthemecolordao2 = lightthemecolordao1.clone(); assertNotNull(lightthemecolordao1); assertNotNull(lightthemecolordao2); assertNotSame(lightthemecolordao2, lightthemecolordao1); assertEquals(lightthemecolordao2, lightthemecolordao1); } catch (Exception exception) { fail(exception.getMessage()); } } | @Override @SuppressWarnings({ "resource", "unused" }) public LightThemeColorDao clone() { try { return new LightThemeColorDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } | LightThemeColorDao extends AbstractLightThemeColorDao { @Override @SuppressWarnings({ "resource", "unused" }) public LightThemeColorDao clone() { try { return new LightThemeColorDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } } | LightThemeColorDao extends AbstractLightThemeColorDao { @Override @SuppressWarnings({ "resource", "unused" }) public LightThemeColorDao clone() { try { return new LightThemeColorDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } LightThemeColorDao(); LightThemeColorDao(ApiClientWrapper client); LightThemeColorDao(ConnectionOptions options); LightThemeColorDao(SdkContext sdkContext); } | LightThemeColorDao extends AbstractLightThemeColorDao { @Override @SuppressWarnings({ "resource", "unused" }) public LightThemeColorDao clone() { try { return new LightThemeColorDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } LightThemeColorDao(); LightThemeColorDao(ApiClientWrapper client); LightThemeColorDao(ConnectionOptions options); LightThemeColorDao(SdkContext sdkContext); @Override @SuppressWarnings({ "resource", "unused" }) LightThemeColorDao clone(); @Override void delete(String id); @Override LightThemeColor read(String id); } | LightThemeColorDao extends AbstractLightThemeColorDao { @Override @SuppressWarnings({ "resource", "unused" }) public LightThemeColorDao clone() { try { return new LightThemeColorDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } LightThemeColorDao(); LightThemeColorDao(ApiClientWrapper client); LightThemeColorDao(ConnectionOptions options); LightThemeColorDao(SdkContext sdkContext); @Override @SuppressWarnings({ "resource", "unused" }) LightThemeColorDao clone(); @Override void delete(String id); @Override LightThemeColor read(String id); } |
@SuppressWarnings("resource") @Test public void testClone() { try { SubtenantLightThemeImageDao subtenantlightthemeimagedao1 = new SubtenantLightThemeImageDao(); SubtenantLightThemeImageDao subtenantlightthemeimagedao2 = subtenantlightthemeimagedao1.clone(); assertNotNull(subtenantlightthemeimagedao1); assertNotNull(subtenantlightthemeimagedao2); assertNotSame(subtenantlightthemeimagedao2, subtenantlightthemeimagedao1); assertEquals(subtenantlightthemeimagedao2, subtenantlightthemeimagedao1); } catch (Exception exception) { fail(exception.getMessage()); } } | @Override @SuppressWarnings({ "resource", "unused" }) public SubtenantLightThemeImageDao clone() { try { return new SubtenantLightThemeImageDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } | SubtenantLightThemeImageDao extends AbstractSubtenantLightThemeImageDao { @Override @SuppressWarnings({ "resource", "unused" }) public SubtenantLightThemeImageDao clone() { try { return new SubtenantLightThemeImageDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } } | SubtenantLightThemeImageDao extends AbstractSubtenantLightThemeImageDao { @Override @SuppressWarnings({ "resource", "unused" }) public SubtenantLightThemeImageDao clone() { try { return new SubtenantLightThemeImageDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } SubtenantLightThemeImageDao(); SubtenantLightThemeImageDao(ApiClientWrapper client); SubtenantLightThemeImageDao(ConnectionOptions options); SubtenantLightThemeImageDao(SdkContext sdkContext); } | SubtenantLightThemeImageDao extends AbstractSubtenantLightThemeImageDao { @Override @SuppressWarnings({ "resource", "unused" }) public SubtenantLightThemeImageDao clone() { try { return new SubtenantLightThemeImageDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } SubtenantLightThemeImageDao(); SubtenantLightThemeImageDao(ApiClientWrapper client); SubtenantLightThemeImageDao(ConnectionOptions options); SubtenantLightThemeImageDao(SdkContext sdkContext); @Override @SuppressWarnings({ "resource", "unused" }) SubtenantLightThemeImageDao clone(); @Override @NotImplemented SubtenantLightThemeImage update(); @Override @NotImplemented SubtenantLightThemeImage update(SubtenantLightThemeImage modelToUpdate); @Override @NotImplemented void delete(); @Override @NotImplemented void delete(SubtenantLightThemeImage modelToDelete); @Override @NotImplemented SubtenantLightThemeImage read(); } | SubtenantLightThemeImageDao extends AbstractSubtenantLightThemeImageDao { @Override @SuppressWarnings({ "resource", "unused" }) public SubtenantLightThemeImageDao clone() { try { return new SubtenantLightThemeImageDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } SubtenantLightThemeImageDao(); SubtenantLightThemeImageDao(ApiClientWrapper client); SubtenantLightThemeImageDao(ConnectionOptions options); SubtenantLightThemeImageDao(SdkContext sdkContext); @Override @SuppressWarnings({ "resource", "unused" }) SubtenantLightThemeImageDao clone(); @Override @NotImplemented SubtenantLightThemeImage update(); @Override @NotImplemented SubtenantLightThemeImage update(SubtenantLightThemeImage modelToUpdate); @Override @NotImplemented void delete(); @Override @NotImplemented void delete(SubtenantLightThemeImage modelToDelete); @Override @NotImplemented SubtenantLightThemeImage read(); } |
@Test public void testToBase64Conversion() { byte[] encodedByteArray = { 0x56, 0x47, 0x68, 0x70, 0x63, 0x79, 0x42, 0x70, 0x63, 0x79, 0x42, 0x68, 0x49, 0x48, 0x52, 0x6c, 0x63, 0x33, 0x51, 0x67, 0x5a, 0x6d, 0x39, 0x79, 0x49, 0x47, 0x52, 0x6c, 0x59, 0x32, 0x39, 0x6b, 0x61, 0x57, 0x35, 0x6e, 0x49, 0x47, 0x4a, 0x68, 0x63, 0x32, 0x55, 0x32, 0x4e, 0x43, 0x42, 0x6c, 0x62, 0x6d, 0x4e, 0x76, 0x5a, 0x47, 0x56, 0x6b, 0x49, 0x48, 0x4e, 0x30, 0x63, 0x6d, 0x6c, 0x75, 0x5a, 0x33, 0x4d, 0x3d }; String encodedSource = "VGhpcyBpcyBhIHRlc3QgZm9yIGRlY29kaW5nIGJhc2U2NCBlbmNvZGVkIHN0cmluZ3M="; Base64 expected = new Base64("This is a test for decoding base64 encoded strings"); assertEquals(expected, TranslationUtils.toBase64(encodedByteArray)); assertEquals(expected, TranslationUtils.toBase64(encodedSource)); } | public static Base64 toBase64(Object obj) { if (obj == null) { return null; } if (obj instanceof String) { return Base64.decode((String) obj); } if (obj instanceof byte[]) { return Base64.decode((byte[]) obj); } if (obj instanceof ByteBuffer) { return Base64.decode((ByteBuffer) obj); } return null; } | TranslationUtils { public static Base64 toBase64(Object obj) { if (obj == null) { return null; } if (obj instanceof String) { return Base64.decode((String) obj); } if (obj instanceof byte[]) { return Base64.decode((byte[]) obj); } if (obj instanceof ByteBuffer) { return Base64.decode((ByteBuffer) obj); } return null; } } | TranslationUtils { public static Base64 toBase64(Object obj) { if (obj == null) { return null; } if (obj instanceof String) { return Base64.decode((String) obj); } if (obj instanceof byte[]) { return Base64.decode((byte[]) obj); } if (obj instanceof ByteBuffer) { return Base64.decode((ByteBuffer) obj); } return null; } private TranslationUtils(); } | TranslationUtils { public static Base64 toBase64(Object obj) { if (obj == null) { return null; } if (obj instanceof String) { return Base64.decode((String) obj); } if (obj instanceof byte[]) { return Base64.decode((byte[]) obj); } if (obj instanceof ByteBuffer) { return Base64.decode((ByteBuffer) obj); } return null; } private TranslationUtils(); static Date toDate(DateTime date); static Date toDate(LocalDate ldate); static Date toDate(Calendar date); static Date toDate(Number timestamp); static Date toDate(Number timestamp, TimeUnit unit); static DateTime toDateTime(Date date); static LocalDate toLocalDate(Date date); static DataFile toDataFile(File file); static DataFile toDataFile(String filePath); static long toLong(Number longE); static long toLong(Date value); static long toLong(String value); static long toLong(Number longE, long defaultValue); static long toLong(Date value, long defaultValue); static long toLong(String stringContainingANumber, long defaultValue); static int toInt(Number number); static int toInt(String value); static int toInt(Number integer, int defaultV); static int toInt(String value, int defaultV); static Integer toInteger(String value, Integer defaultV); static boolean toBool(Boolean bool); static boolean toBool(String value); static boolean toBool(Boolean bool, boolean defaultB); static boolean toBool(String value, boolean defaultV); static double toDouble(Number value); static double toDouble(String value); static double toDouble(Number value, double defaultD); static double toDouble(String value, double defaultD); static URL toUrl(String url); static String toString(Object obj); static Base64 toBase64(Object obj); static byte[] toByteArray(Object obj); static synchronized Date convertTimestamp(String timestamp); static synchronized Date convertTimestamp(String timestamp, Date defaultDate); static synchronized Date convertTimestamp(String timestamp, DateFormat format, Date defaultDate); static synchronized Date convertTimestamp(String timestamp, DateFormat format); static synchronized Date convertRfc3339Timestamp(String timestamp); static synchronized Date convertRfc3339Timestamp(String timestamp, Date defaultDate); static synchronized String toDefaultTimestamp(Date date); static synchronized String toRfc3339Timestamp(Date date); static String toTimestamp(Date date, DateFormat format); static List<String> parseList(String string, String separator); static DateTime moveToUtc(Date date); static Date moveDateTimeToUtc(Date date); static String toUtcTimestamp(Date date); static Date convertStringToDate(String valueStr); } | TranslationUtils { public static Base64 toBase64(Object obj) { if (obj == null) { return null; } if (obj instanceof String) { return Base64.decode((String) obj); } if (obj instanceof byte[]) { return Base64.decode((byte[]) obj); } if (obj instanceof ByteBuffer) { return Base64.decode((ByteBuffer) obj); } return null; } private TranslationUtils(); static Date toDate(DateTime date); static Date toDate(LocalDate ldate); static Date toDate(Calendar date); static Date toDate(Number timestamp); static Date toDate(Number timestamp, TimeUnit unit); static DateTime toDateTime(Date date); static LocalDate toLocalDate(Date date); static DataFile toDataFile(File file); static DataFile toDataFile(String filePath); static long toLong(Number longE); static long toLong(Date value); static long toLong(String value); static long toLong(Number longE, long defaultValue); static long toLong(Date value, long defaultValue); static long toLong(String stringContainingANumber, long defaultValue); static int toInt(Number number); static int toInt(String value); static int toInt(Number integer, int defaultV); static int toInt(String value, int defaultV); static Integer toInteger(String value, Integer defaultV); static boolean toBool(Boolean bool); static boolean toBool(String value); static boolean toBool(Boolean bool, boolean defaultB); static boolean toBool(String value, boolean defaultV); static double toDouble(Number value); static double toDouble(String value); static double toDouble(Number value, double defaultD); static double toDouble(String value, double defaultD); static URL toUrl(String url); static String toString(Object obj); static Base64 toBase64(Object obj); static byte[] toByteArray(Object obj); static synchronized Date convertTimestamp(String timestamp); static synchronized Date convertTimestamp(String timestamp, Date defaultDate); static synchronized Date convertTimestamp(String timestamp, DateFormat format, Date defaultDate); static synchronized Date convertTimestamp(String timestamp, DateFormat format); static synchronized Date convertRfc3339Timestamp(String timestamp); static synchronized Date convertRfc3339Timestamp(String timestamp, Date defaultDate); static synchronized String toDefaultTimestamp(Date date); static synchronized String toRfc3339Timestamp(Date date); static String toTimestamp(Date date, DateFormat format); static List<String> parseList(String string, String separator); static DateTime moveToUtc(Date date); static Date moveDateTimeToUtc(Date date); static String toUtcTimestamp(Date date); static Date convertStringToDate(String valueStr); static final String METHOD_CONVERT_STRING_TO_DATE; static final String METHOD_CONVERT_OTHER_TO_DATE; static final String METHOD_CONVERT_DATE_TO_DATETIME; static final String METHOD_CONVERT_DATE_TO_LOCALDATE; static final String METHOD_CONVERT_DATE_TO_STRING; static final String METHOD_CONVERT_STRING_TO_URL; static final String METHOD_CONVERT_BOOL_TO_BOOL; static final String METHOD_CONVERT_NUMBER_TO_LONG; static final String METHOD_CONVERT_NUMBER_TO_INT; static final String METHOD_CONVERT_NUMBER_TO_DOUBLE; static final String METHOD_CONVERT_ANY_TO_STRING; static final String METHOD_CONVERT_ANY_TO_BYTE_ARRAY; static final String METHOD_CONVERT_ANY_TO_BASE64; static final String METHOD_CONVERT_TO_DATA_FILE; } |
@SuppressWarnings("resource") @Test public void testClone() { try { LightThemeImageListDao lightthemeimagelistdao1 = new LightThemeImageListDao(); LightThemeImageListDao lightthemeimagelistdao2 = lightthemeimagelistdao1.clone(); assertNotNull(lightthemeimagelistdao1); assertNotNull(lightthemeimagelistdao2); assertNotSame(lightthemeimagelistdao2, lightthemeimagelistdao1); assertEquals(lightthemeimagelistdao2, lightthemeimagelistdao1); } catch (Exception exception) { fail(exception.getMessage()); } } | @Override @SuppressWarnings({ "resource", "unused" }) public LightThemeImageListDao clone() { try { return new LightThemeImageListDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } | LightThemeImageListDao extends AbstractModelListDao<LightThemeImage, LightThemeImageListOptions> implements ModelListDao<LightThemeImage, LightThemeImageListOptions> { @Override @SuppressWarnings({ "resource", "unused" }) public LightThemeImageListDao clone() { try { return new LightThemeImageListDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } } | LightThemeImageListDao extends AbstractModelListDao<LightThemeImage, LightThemeImageListOptions> implements ModelListDao<LightThemeImage, LightThemeImageListOptions> { @Override @SuppressWarnings({ "resource", "unused" }) public LightThemeImageListDao clone() { try { return new LightThemeImageListDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } LightThemeImageListDao(); LightThemeImageListDao(ApiClientWrapper client); LightThemeImageListDao(ConnectionOptions options); LightThemeImageListDao(SdkContext sdkContext); } | LightThemeImageListDao extends AbstractModelListDao<LightThemeImage, LightThemeImageListOptions> implements ModelListDao<LightThemeImage, LightThemeImageListOptions> { @Override @SuppressWarnings({ "resource", "unused" }) public LightThemeImageListDao clone() { try { return new LightThemeImageListDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } LightThemeImageListDao(); LightThemeImageListDao(ApiClientWrapper client); LightThemeImageListDao(ConnectionOptions options); LightThemeImageListDao(SdkContext sdkContext); @Override @SuppressWarnings({ "resource", "unused" }) LightThemeImageListDao clone(); @Override @Internal @SuppressWarnings("unchecked") Class<LightThemeImageDao> getModelDaoClass(); @Override @Internal @SuppressWarnings({ "unchecked", "resource" }) LightThemeImageDao getNewModelDao(); } | LightThemeImageListDao extends AbstractModelListDao<LightThemeImage, LightThemeImageListOptions> implements ModelListDao<LightThemeImage, LightThemeImageListOptions> { @Override @SuppressWarnings({ "resource", "unused" }) public LightThemeImageListDao clone() { try { return new LightThemeImageListDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } LightThemeImageListDao(); LightThemeImageListDao(ApiClientWrapper client); LightThemeImageListDao(ConnectionOptions options); LightThemeImageListDao(SdkContext sdkContext); @Override @SuppressWarnings({ "resource", "unused" }) LightThemeImageListDao clone(); @Override @Internal @SuppressWarnings("unchecked") Class<LightThemeImageDao> getModelDaoClass(); @Override @Internal @SuppressWarnings({ "unchecked", "resource" }) LightThemeImageDao getNewModelDao(); } |
@SuppressWarnings("resource") @Test public void testClone() { try { DarkThemeImageListDao darkthemeimagelistdao1 = new DarkThemeImageListDao(); DarkThemeImageListDao darkthemeimagelistdao2 = darkthemeimagelistdao1.clone(); assertNotNull(darkthemeimagelistdao1); assertNotNull(darkthemeimagelistdao2); assertNotSame(darkthemeimagelistdao2, darkthemeimagelistdao1); assertEquals(darkthemeimagelistdao2, darkthemeimagelistdao1); } catch (Exception exception) { fail(exception.getMessage()); } } | @Override @SuppressWarnings({ "resource", "unused" }) public DarkThemeImageListDao clone() { try { return new DarkThemeImageListDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } | DarkThemeImageListDao extends AbstractModelListDao<DarkThemeImage, DarkThemeImageListOptions> implements ModelListDao<DarkThemeImage, DarkThemeImageListOptions> { @Override @SuppressWarnings({ "resource", "unused" }) public DarkThemeImageListDao clone() { try { return new DarkThemeImageListDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } } | DarkThemeImageListDao extends AbstractModelListDao<DarkThemeImage, DarkThemeImageListOptions> implements ModelListDao<DarkThemeImage, DarkThemeImageListOptions> { @Override @SuppressWarnings({ "resource", "unused" }) public DarkThemeImageListDao clone() { try { return new DarkThemeImageListDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } DarkThemeImageListDao(); DarkThemeImageListDao(ApiClientWrapper client); DarkThemeImageListDao(ConnectionOptions options); DarkThemeImageListDao(SdkContext sdkContext); } | DarkThemeImageListDao extends AbstractModelListDao<DarkThemeImage, DarkThemeImageListOptions> implements ModelListDao<DarkThemeImage, DarkThemeImageListOptions> { @Override @SuppressWarnings({ "resource", "unused" }) public DarkThemeImageListDao clone() { try { return new DarkThemeImageListDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } DarkThemeImageListDao(); DarkThemeImageListDao(ApiClientWrapper client); DarkThemeImageListDao(ConnectionOptions options); DarkThemeImageListDao(SdkContext sdkContext); @Override @SuppressWarnings({ "resource", "unused" }) DarkThemeImageListDao clone(); @Override @Internal @SuppressWarnings("unchecked") Class<DarkThemeImageDao> getModelDaoClass(); @Override @Internal @SuppressWarnings({ "unchecked", "resource" }) DarkThemeImageDao getNewModelDao(); } | DarkThemeImageListDao extends AbstractModelListDao<DarkThemeImage, DarkThemeImageListOptions> implements ModelListDao<DarkThemeImage, DarkThemeImageListOptions> { @Override @SuppressWarnings({ "resource", "unused" }) public DarkThemeImageListDao clone() { try { return new DarkThemeImageListDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } DarkThemeImageListDao(); DarkThemeImageListDao(ApiClientWrapper client); DarkThemeImageListDao(ConnectionOptions options); DarkThemeImageListDao(SdkContext sdkContext); @Override @SuppressWarnings({ "resource", "unused" }) DarkThemeImageListDao clone(); @Override @Internal @SuppressWarnings("unchecked") Class<DarkThemeImageDao> getModelDaoClass(); @Override @Internal @SuppressWarnings({ "unchecked", "resource" }) DarkThemeImageDao getNewModelDao(); } |
@SuppressWarnings("resource") @Test public void testClone() { try { SubtenantDarkThemeImageDao subtenantdarkthemeimagedao1 = new SubtenantDarkThemeImageDao(); SubtenantDarkThemeImageDao subtenantdarkthemeimagedao2 = subtenantdarkthemeimagedao1.clone(); assertNotNull(subtenantdarkthemeimagedao1); assertNotNull(subtenantdarkthemeimagedao2); assertNotSame(subtenantdarkthemeimagedao2, subtenantdarkthemeimagedao1); assertEquals(subtenantdarkthemeimagedao2, subtenantdarkthemeimagedao1); } catch (Exception exception) { fail(exception.getMessage()); } } | @Override @SuppressWarnings({ "resource", "unused" }) public SubtenantDarkThemeImageDao clone() { try { return new SubtenantDarkThemeImageDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } | SubtenantDarkThemeImageDao extends AbstractSubtenantDarkThemeImageDao { @Override @SuppressWarnings({ "resource", "unused" }) public SubtenantDarkThemeImageDao clone() { try { return new SubtenantDarkThemeImageDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } } | SubtenantDarkThemeImageDao extends AbstractSubtenantDarkThemeImageDao { @Override @SuppressWarnings({ "resource", "unused" }) public SubtenantDarkThemeImageDao clone() { try { return new SubtenantDarkThemeImageDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } SubtenantDarkThemeImageDao(); SubtenantDarkThemeImageDao(ApiClientWrapper client); SubtenantDarkThemeImageDao(ConnectionOptions options); SubtenantDarkThemeImageDao(SdkContext sdkContext); } | SubtenantDarkThemeImageDao extends AbstractSubtenantDarkThemeImageDao { @Override @SuppressWarnings({ "resource", "unused" }) public SubtenantDarkThemeImageDao clone() { try { return new SubtenantDarkThemeImageDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } SubtenantDarkThemeImageDao(); SubtenantDarkThemeImageDao(ApiClientWrapper client); SubtenantDarkThemeImageDao(ConnectionOptions options); SubtenantDarkThemeImageDao(SdkContext sdkContext); @Override @SuppressWarnings({ "resource", "unused" }) SubtenantDarkThemeImageDao clone(); @Override @NotImplemented SubtenantDarkThemeImage update(); @Override @NotImplemented SubtenantDarkThemeImage update(SubtenantDarkThemeImage modelToUpdate); @Override @NotImplemented void delete(); @Override @NotImplemented void delete(SubtenantDarkThemeImage modelToDelete); @Override @NotImplemented SubtenantDarkThemeImage read(); } | SubtenantDarkThemeImageDao extends AbstractSubtenantDarkThemeImageDao { @Override @SuppressWarnings({ "resource", "unused" }) public SubtenantDarkThemeImageDao clone() { try { return new SubtenantDarkThemeImageDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } SubtenantDarkThemeImageDao(); SubtenantDarkThemeImageDao(ApiClientWrapper client); SubtenantDarkThemeImageDao(ConnectionOptions options); SubtenantDarkThemeImageDao(SdkContext sdkContext); @Override @SuppressWarnings({ "resource", "unused" }) SubtenantDarkThemeImageDao clone(); @Override @NotImplemented SubtenantDarkThemeImage update(); @Override @NotImplemented SubtenantDarkThemeImage update(SubtenantDarkThemeImage modelToUpdate); @Override @NotImplemented void delete(); @Override @NotImplemented void delete(SubtenantDarkThemeImage modelToDelete); @Override @NotImplemented SubtenantDarkThemeImage read(); } |
@SuppressWarnings("resource") @Test public void testClone() { try { LightThemeImageDao lightthemeimagedao1 = new LightThemeImageDao(); LightThemeImageDao lightthemeimagedao2 = lightthemeimagedao1.clone(); assertNotNull(lightthemeimagedao1); assertNotNull(lightthemeimagedao2); assertNotSame(lightthemeimagedao2, lightthemeimagedao1); assertEquals(lightthemeimagedao2, lightthemeimagedao1); } catch (Exception exception) { fail(exception.getMessage()); } } | @Override @SuppressWarnings({ "resource", "unused" }) public LightThemeImageDao clone() { try { return new LightThemeImageDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } | LightThemeImageDao extends AbstractLightThemeImageDao { @Override @SuppressWarnings({ "resource", "unused" }) public LightThemeImageDao clone() { try { return new LightThemeImageDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } } | LightThemeImageDao extends AbstractLightThemeImageDao { @Override @SuppressWarnings({ "resource", "unused" }) public LightThemeImageDao clone() { try { return new LightThemeImageDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } LightThemeImageDao(); LightThemeImageDao(ApiClientWrapper client); LightThemeImageDao(ConnectionOptions options); LightThemeImageDao(SdkContext sdkContext); } | LightThemeImageDao extends AbstractLightThemeImageDao { @Override @SuppressWarnings({ "resource", "unused" }) public LightThemeImageDao clone() { try { return new LightThemeImageDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } LightThemeImageDao(); LightThemeImageDao(ApiClientWrapper client); LightThemeImageDao(ConnectionOptions options); LightThemeImageDao(SdkContext sdkContext); @Override @SuppressWarnings({ "resource", "unused" }) LightThemeImageDao clone(); @Override @NotImplemented LightThemeImage update(); @Override @NotImplemented LightThemeImage update(LightThemeImage modelToUpdate); @Override void delete(String id); @Override LightThemeImage read(String id); } | LightThemeImageDao extends AbstractLightThemeImageDao { @Override @SuppressWarnings({ "resource", "unused" }) public LightThemeImageDao clone() { try { return new LightThemeImageDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } LightThemeImageDao(); LightThemeImageDao(ApiClientWrapper client); LightThemeImageDao(ConnectionOptions options); LightThemeImageDao(SdkContext sdkContext); @Override @SuppressWarnings({ "resource", "unused" }) LightThemeImageDao clone(); @Override @NotImplemented LightThemeImage update(); @Override @NotImplemented LightThemeImage update(LightThemeImage modelToUpdate); @Override void delete(String id); @Override LightThemeImage read(String id); } |
@SuppressWarnings("resource") @Test public void testClone() { try { DarkThemeColorListOptions darkthemecolorlistoptions1 = new DarkThemeColorListOptions(Integer.valueOf(117), Long.valueOf(-22), Order.getDefault(), "115103fc-9fcb-4357-83c9-761c19556a69", null, null); DarkThemeColorListOptions darkthemecolorlistoptions2 = darkthemecolorlistoptions1.clone(); assertNotNull(darkthemecolorlistoptions1); assertNotNull(darkthemecolorlistoptions2); assertNotSame(darkthemecolorlistoptions2, darkthemecolorlistoptions1); assertEquals(darkthemecolorlistoptions2, darkthemecolorlistoptions1); } catch (Exception exception) { fail(exception.getMessage()); } } | @Override public DarkThemeColorListOptions clone() { final DarkThemeColorListOptions opt = new DarkThemeColorListOptions(); opt.setOptions(this); return opt; } | DarkThemeColorListOptions extends ListOptions { @Override public DarkThemeColorListOptions clone() { final DarkThemeColorListOptions opt = new DarkThemeColorListOptions(); opt.setOptions(this); return opt; } } | DarkThemeColorListOptions extends ListOptions { @Override public DarkThemeColorListOptions clone() { final DarkThemeColorListOptions opt = new DarkThemeColorListOptions(); opt.setOptions(this); return opt; } @Internal DarkThemeColorListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal DarkThemeColorListOptions(DarkThemeColorListOptions darkThemeColorListOptions); DarkThemeColorListOptions(); @Internal DarkThemeColorListOptions(String after, Filters filter); } | DarkThemeColorListOptions extends ListOptions { @Override public DarkThemeColorListOptions clone() { final DarkThemeColorListOptions opt = new DarkThemeColorListOptions(); opt.setOptions(this); return opt; } @Internal DarkThemeColorListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal DarkThemeColorListOptions(DarkThemeColorListOptions darkThemeColorListOptions); DarkThemeColorListOptions(); @Internal DarkThemeColorListOptions(String after, Filters filter); @Override String toString(); @Override DarkThemeColorListOptions clone(); @Override boolean equals(Object obj); @Override @SuppressWarnings("PMD.UselessOverridingMethod") int hashCode(); } | DarkThemeColorListOptions extends ListOptions { @Override public DarkThemeColorListOptions clone() { final DarkThemeColorListOptions opt = new DarkThemeColorListOptions(); opt.setOptions(this); return opt; } @Internal DarkThemeColorListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal DarkThemeColorListOptions(DarkThemeColorListOptions darkThemeColorListOptions); DarkThemeColorListOptions(); @Internal DarkThemeColorListOptions(String after, Filters filter); @Override String toString(); @Override DarkThemeColorListOptions clone(); @Override boolean equals(Object obj); @Override @SuppressWarnings("PMD.UselessOverridingMethod") int hashCode(); } |
@SuppressWarnings("resource") @Test public void testHashCode() { try { DarkThemeColorListOptions darkthemecolorlistoptions1 = new DarkThemeColorListOptions(Integer.valueOf(54), Long.valueOf(33), Order.getDefault(), "8e09201d-2459-4d6d-ad4a-5e9fd9e79d9e", null, null); DarkThemeColorListOptions darkthemecolorlistoptions2 = new DarkThemeColorListOptions(Integer.valueOf(54), Long.valueOf(33), Order.getDefault(), "8e09201d-2459-4d6d-ad4a-5e9fd9e79d9e", null, null); assertNotNull(darkthemecolorlistoptions1); assertNotNull(darkthemecolorlistoptions2); assertNotSame(darkthemecolorlistoptions2, darkthemecolorlistoptions1); assertEquals(darkthemecolorlistoptions2, darkthemecolorlistoptions1); assertEquals(darkthemecolorlistoptions2.hashCode(), darkthemecolorlistoptions1.hashCode()); int hashCode = darkthemecolorlistoptions1.hashCode(); for (int i = 0; i < 5; i++) { assertEquals(hashCode, darkthemecolorlistoptions1.hashCode()); } } catch (Exception exception) { fail(exception.getMessage()); } } | @Override @SuppressWarnings("PMD.UselessOverridingMethod") public int hashCode() { return super.hashCode(); } | DarkThemeColorListOptions extends ListOptions { @Override @SuppressWarnings("PMD.UselessOverridingMethod") public int hashCode() { return super.hashCode(); } } | DarkThemeColorListOptions extends ListOptions { @Override @SuppressWarnings("PMD.UselessOverridingMethod") public int hashCode() { return super.hashCode(); } @Internal DarkThemeColorListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal DarkThemeColorListOptions(DarkThemeColorListOptions darkThemeColorListOptions); DarkThemeColorListOptions(); @Internal DarkThemeColorListOptions(String after, Filters filter); } | DarkThemeColorListOptions extends ListOptions { @Override @SuppressWarnings("PMD.UselessOverridingMethod") public int hashCode() { return super.hashCode(); } @Internal DarkThemeColorListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal DarkThemeColorListOptions(DarkThemeColorListOptions darkThemeColorListOptions); DarkThemeColorListOptions(); @Internal DarkThemeColorListOptions(String after, Filters filter); @Override String toString(); @Override DarkThemeColorListOptions clone(); @Override boolean equals(Object obj); @Override @SuppressWarnings("PMD.UselessOverridingMethod") int hashCode(); } | DarkThemeColorListOptions extends ListOptions { @Override @SuppressWarnings("PMD.UselessOverridingMethod") public int hashCode() { return super.hashCode(); } @Internal DarkThemeColorListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal DarkThemeColorListOptions(DarkThemeColorListOptions darkThemeColorListOptions); DarkThemeColorListOptions(); @Internal DarkThemeColorListOptions(String after, Filters filter); @Override String toString(); @Override DarkThemeColorListOptions clone(); @Override boolean equals(Object obj); @Override @SuppressWarnings("PMD.UselessOverridingMethod") int hashCode(); } |
@SuppressWarnings("resource") @Test public void testEquals() { try { DarkThemeColorListOptions darkthemecolorlistoptions1 = new DarkThemeColorListOptions(Integer.valueOf(-45), Long.valueOf(121), Order.getDefault(), "866af6f2-a6f0-4ebb-9340-6dadd9e7a098", null, null); DarkThemeColorListOptions darkthemecolorlistoptions2 = new DarkThemeColorListOptions(Integer.valueOf(-45), Long.valueOf(121), Order.getDefault(), "866af6f2-a6f0-4ebb-9340-6dadd9e7a098", null, null); DarkThemeColorListOptions darkthemecolorlistoptions3 = new DarkThemeColorListOptions(Integer.valueOf(60), Long.valueOf(58), Order.getDefault(), "99ad924d-e4ff-4346-bdef-6500b176a1ca", null, null); assertNotNull(darkthemecolorlistoptions1); assertNotNull(darkthemecolorlistoptions2); assertNotNull(darkthemecolorlistoptions3); assertNotSame(darkthemecolorlistoptions2, darkthemecolorlistoptions1); assertNotSame(darkthemecolorlistoptions3, darkthemecolorlistoptions1); assertEquals(darkthemecolorlistoptions2, darkthemecolorlistoptions1); assertEquals(darkthemecolorlistoptions2, darkthemecolorlistoptions1); assertEquals(darkthemecolorlistoptions1, darkthemecolorlistoptions2); assertEquals(darkthemecolorlistoptions1, darkthemecolorlistoptions1); assertFalse(darkthemecolorlistoptions1.equals(null)); assertNotEquals(darkthemecolorlistoptions3, darkthemecolorlistoptions1); } catch (Exception exception) { fail(exception.getMessage()); } } | @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!super.equals(obj)) { return false; } if (!(obj instanceof DarkThemeColorListOptions)) { return false; } final DarkThemeColorListOptions other = (DarkThemeColorListOptions) obj; if (!other.canEqual(this)) { return false; } return true; } | DarkThemeColorListOptions extends ListOptions { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!super.equals(obj)) { return false; } if (!(obj instanceof DarkThemeColorListOptions)) { return false; } final DarkThemeColorListOptions other = (DarkThemeColorListOptions) obj; if (!other.canEqual(this)) { return false; } return true; } } | DarkThemeColorListOptions extends ListOptions { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!super.equals(obj)) { return false; } if (!(obj instanceof DarkThemeColorListOptions)) { return false; } final DarkThemeColorListOptions other = (DarkThemeColorListOptions) obj; if (!other.canEqual(this)) { return false; } return true; } @Internal DarkThemeColorListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal DarkThemeColorListOptions(DarkThemeColorListOptions darkThemeColorListOptions); DarkThemeColorListOptions(); @Internal DarkThemeColorListOptions(String after, Filters filter); } | DarkThemeColorListOptions extends ListOptions { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!super.equals(obj)) { return false; } if (!(obj instanceof DarkThemeColorListOptions)) { return false; } final DarkThemeColorListOptions other = (DarkThemeColorListOptions) obj; if (!other.canEqual(this)) { return false; } return true; } @Internal DarkThemeColorListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal DarkThemeColorListOptions(DarkThemeColorListOptions darkThemeColorListOptions); DarkThemeColorListOptions(); @Internal DarkThemeColorListOptions(String after, Filters filter); @Override String toString(); @Override DarkThemeColorListOptions clone(); @Override boolean equals(Object obj); @Override @SuppressWarnings("PMD.UselessOverridingMethod") int hashCode(); } | DarkThemeColorListOptions extends ListOptions { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!super.equals(obj)) { return false; } if (!(obj instanceof DarkThemeColorListOptions)) { return false; } final DarkThemeColorListOptions other = (DarkThemeColorListOptions) obj; if (!other.canEqual(this)) { return false; } return true; } @Internal DarkThemeColorListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal DarkThemeColorListOptions(DarkThemeColorListOptions darkThemeColorListOptions); DarkThemeColorListOptions(); @Internal DarkThemeColorListOptions(String after, Filters filter); @Override String toString(); @Override DarkThemeColorListOptions clone(); @Override boolean equals(Object obj); @Override @SuppressWarnings("PMD.UselessOverridingMethod") int hashCode(); } |
@SuppressWarnings("resource") @Test public void testClone() { try { SubtenantLightThemeColorListOptions subtenantlightthemecolorlistoptions1 = new SubtenantLightThemeColorListOptions(Integer.valueOf(106), Long.valueOf(25), Order.getDefault(), "fb967116-ebc9-434c-82dc-7a2c3efda67f", null, null); SubtenantLightThemeColorListOptions subtenantlightthemecolorlistoptions2 = subtenantlightthemecolorlistoptions1.clone(); assertNotNull(subtenantlightthemecolorlistoptions1); assertNotNull(subtenantlightthemecolorlistoptions2); assertNotSame(subtenantlightthemecolorlistoptions2, subtenantlightthemecolorlistoptions1); assertEquals(subtenantlightthemecolorlistoptions2, subtenantlightthemecolorlistoptions1); } catch (Exception exception) { fail(exception.getMessage()); } } | @Override public SubtenantLightThemeColorListOptions clone() { final SubtenantLightThemeColorListOptions opt = new SubtenantLightThemeColorListOptions(); opt.setOptions(this); return opt; } | SubtenantLightThemeColorListOptions extends ListOptions { @Override public SubtenantLightThemeColorListOptions clone() { final SubtenantLightThemeColorListOptions opt = new SubtenantLightThemeColorListOptions(); opt.setOptions(this); return opt; } } | SubtenantLightThemeColorListOptions extends ListOptions { @Override public SubtenantLightThemeColorListOptions clone() { final SubtenantLightThemeColorListOptions opt = new SubtenantLightThemeColorListOptions(); opt.setOptions(this); return opt; } @Internal SubtenantLightThemeColorListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal SubtenantLightThemeColorListOptions(SubtenantLightThemeColorListOptions subtenantLightThemeColorListOptions); SubtenantLightThemeColorListOptions(); @Internal SubtenantLightThemeColorListOptions(String after, Filters filter); } | SubtenantLightThemeColorListOptions extends ListOptions { @Override public SubtenantLightThemeColorListOptions clone() { final SubtenantLightThemeColorListOptions opt = new SubtenantLightThemeColorListOptions(); opt.setOptions(this); return opt; } @Internal SubtenantLightThemeColorListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal SubtenantLightThemeColorListOptions(SubtenantLightThemeColorListOptions subtenantLightThemeColorListOptions); SubtenantLightThemeColorListOptions(); @Internal SubtenantLightThemeColorListOptions(String after, Filters filter); @Override String toString(); @Override SubtenantLightThemeColorListOptions clone(); @Override boolean equals(Object obj); @Override @SuppressWarnings("PMD.UselessOverridingMethod") int hashCode(); } | SubtenantLightThemeColorListOptions extends ListOptions { @Override public SubtenantLightThemeColorListOptions clone() { final SubtenantLightThemeColorListOptions opt = new SubtenantLightThemeColorListOptions(); opt.setOptions(this); return opt; } @Internal SubtenantLightThemeColorListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal SubtenantLightThemeColorListOptions(SubtenantLightThemeColorListOptions subtenantLightThemeColorListOptions); SubtenantLightThemeColorListOptions(); @Internal SubtenantLightThemeColorListOptions(String after, Filters filter); @Override String toString(); @Override SubtenantLightThemeColorListOptions clone(); @Override boolean equals(Object obj); @Override @SuppressWarnings("PMD.UselessOverridingMethod") int hashCode(); } |
@SuppressWarnings("resource") @Test public void testHashCode() { try { SubtenantLightThemeColorListOptions subtenantlightthemecolorlistoptions1 = new SubtenantLightThemeColorListOptions(Integer.valueOf(-98), Long.valueOf(89), Order.getDefault(), "8b98408d-6160-4dfd-acc1-67ce4914d62f", null, null); SubtenantLightThemeColorListOptions subtenantlightthemecolorlistoptions2 = new SubtenantLightThemeColorListOptions(Integer.valueOf(-98), Long.valueOf(89), Order.getDefault(), "8b98408d-6160-4dfd-acc1-67ce4914d62f", null, null); assertNotNull(subtenantlightthemecolorlistoptions1); assertNotNull(subtenantlightthemecolorlistoptions2); assertNotSame(subtenantlightthemecolorlistoptions2, subtenantlightthemecolorlistoptions1); assertEquals(subtenantlightthemecolorlistoptions2, subtenantlightthemecolorlistoptions1); assertEquals(subtenantlightthemecolorlistoptions2.hashCode(), subtenantlightthemecolorlistoptions1.hashCode()); int hashCode = subtenantlightthemecolorlistoptions1.hashCode(); for (int i = 0; i < 5; i++) { assertEquals(hashCode, subtenantlightthemecolorlistoptions1.hashCode()); } } catch (Exception exception) { fail(exception.getMessage()); } } | @Override @SuppressWarnings("PMD.UselessOverridingMethod") public int hashCode() { return super.hashCode(); } | SubtenantLightThemeColorListOptions extends ListOptions { @Override @SuppressWarnings("PMD.UselessOverridingMethod") public int hashCode() { return super.hashCode(); } } | SubtenantLightThemeColorListOptions extends ListOptions { @Override @SuppressWarnings("PMD.UselessOverridingMethod") public int hashCode() { return super.hashCode(); } @Internal SubtenantLightThemeColorListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal SubtenantLightThemeColorListOptions(SubtenantLightThemeColorListOptions subtenantLightThemeColorListOptions); SubtenantLightThemeColorListOptions(); @Internal SubtenantLightThemeColorListOptions(String after, Filters filter); } | SubtenantLightThemeColorListOptions extends ListOptions { @Override @SuppressWarnings("PMD.UselessOverridingMethod") public int hashCode() { return super.hashCode(); } @Internal SubtenantLightThemeColorListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal SubtenantLightThemeColorListOptions(SubtenantLightThemeColorListOptions subtenantLightThemeColorListOptions); SubtenantLightThemeColorListOptions(); @Internal SubtenantLightThemeColorListOptions(String after, Filters filter); @Override String toString(); @Override SubtenantLightThemeColorListOptions clone(); @Override boolean equals(Object obj); @Override @SuppressWarnings("PMD.UselessOverridingMethod") int hashCode(); } | SubtenantLightThemeColorListOptions extends ListOptions { @Override @SuppressWarnings("PMD.UselessOverridingMethod") public int hashCode() { return super.hashCode(); } @Internal SubtenantLightThemeColorListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal SubtenantLightThemeColorListOptions(SubtenantLightThemeColorListOptions subtenantLightThemeColorListOptions); SubtenantLightThemeColorListOptions(); @Internal SubtenantLightThemeColorListOptions(String after, Filters filter); @Override String toString(); @Override SubtenantLightThemeColorListOptions clone(); @Override boolean equals(Object obj); @Override @SuppressWarnings("PMD.UselessOverridingMethod") int hashCode(); } |
@SuppressWarnings("resource") @Test public void testEquals() { try { SubtenantLightThemeColorListOptions subtenantlightthemecolorlistoptions1 = new SubtenantLightThemeColorListOptions(Integer.valueOf(112), Long.valueOf(-60), Order.getDefault(), "8dc9ddcb-1c2f-4adb-9b06-68a74f942338", null, null); SubtenantLightThemeColorListOptions subtenantlightthemecolorlistoptions2 = new SubtenantLightThemeColorListOptions(Integer.valueOf(112), Long.valueOf(-60), Order.getDefault(), "8dc9ddcb-1c2f-4adb-9b06-68a74f942338", null, null); SubtenantLightThemeColorListOptions subtenantlightthemecolorlistoptions3 = new SubtenantLightThemeColorListOptions(Integer.valueOf(-106), Long.valueOf(-79), Order.getDefault(), "f6ad052f-30de-4f4f-bff2-54b8254f58e5", null, null); assertNotNull(subtenantlightthemecolorlistoptions1); assertNotNull(subtenantlightthemecolorlistoptions2); assertNotNull(subtenantlightthemecolorlistoptions3); assertNotSame(subtenantlightthemecolorlistoptions2, subtenantlightthemecolorlistoptions1); assertNotSame(subtenantlightthemecolorlistoptions3, subtenantlightthemecolorlistoptions1); assertEquals(subtenantlightthemecolorlistoptions2, subtenantlightthemecolorlistoptions1); assertEquals(subtenantlightthemecolorlistoptions2, subtenantlightthemecolorlistoptions1); assertEquals(subtenantlightthemecolorlistoptions1, subtenantlightthemecolorlistoptions2); assertEquals(subtenantlightthemecolorlistoptions1, subtenantlightthemecolorlistoptions1); assertFalse(subtenantlightthemecolorlistoptions1.equals(null)); assertNotEquals(subtenantlightthemecolorlistoptions3, subtenantlightthemecolorlistoptions1); } catch (Exception exception) { fail(exception.getMessage()); } } | @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!super.equals(obj)) { return false; } if (!(obj instanceof SubtenantLightThemeColorListOptions)) { return false; } final SubtenantLightThemeColorListOptions other = (SubtenantLightThemeColorListOptions) obj; if (!other.canEqual(this)) { return false; } return true; } | SubtenantLightThemeColorListOptions extends ListOptions { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!super.equals(obj)) { return false; } if (!(obj instanceof SubtenantLightThemeColorListOptions)) { return false; } final SubtenantLightThemeColorListOptions other = (SubtenantLightThemeColorListOptions) obj; if (!other.canEqual(this)) { return false; } return true; } } | SubtenantLightThemeColorListOptions extends ListOptions { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!super.equals(obj)) { return false; } if (!(obj instanceof SubtenantLightThemeColorListOptions)) { return false; } final SubtenantLightThemeColorListOptions other = (SubtenantLightThemeColorListOptions) obj; if (!other.canEqual(this)) { return false; } return true; } @Internal SubtenantLightThemeColorListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal SubtenantLightThemeColorListOptions(SubtenantLightThemeColorListOptions subtenantLightThemeColorListOptions); SubtenantLightThemeColorListOptions(); @Internal SubtenantLightThemeColorListOptions(String after, Filters filter); } | SubtenantLightThemeColorListOptions extends ListOptions { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!super.equals(obj)) { return false; } if (!(obj instanceof SubtenantLightThemeColorListOptions)) { return false; } final SubtenantLightThemeColorListOptions other = (SubtenantLightThemeColorListOptions) obj; if (!other.canEqual(this)) { return false; } return true; } @Internal SubtenantLightThemeColorListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal SubtenantLightThemeColorListOptions(SubtenantLightThemeColorListOptions subtenantLightThemeColorListOptions); SubtenantLightThemeColorListOptions(); @Internal SubtenantLightThemeColorListOptions(String after, Filters filter); @Override String toString(); @Override SubtenantLightThemeColorListOptions clone(); @Override boolean equals(Object obj); @Override @SuppressWarnings("PMD.UselessOverridingMethod") int hashCode(); } | SubtenantLightThemeColorListOptions extends ListOptions { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!super.equals(obj)) { return false; } if (!(obj instanceof SubtenantLightThemeColorListOptions)) { return false; } final SubtenantLightThemeColorListOptions other = (SubtenantLightThemeColorListOptions) obj; if (!other.canEqual(this)) { return false; } return true; } @Internal SubtenantLightThemeColorListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal SubtenantLightThemeColorListOptions(SubtenantLightThemeColorListOptions subtenantLightThemeColorListOptions); SubtenantLightThemeColorListOptions(); @Internal SubtenantLightThemeColorListOptions(String after, Filters filter); @Override String toString(); @Override SubtenantLightThemeColorListOptions clone(); @Override boolean equals(Object obj); @Override @SuppressWarnings("PMD.UselessOverridingMethod") int hashCode(); } |
@Test public void testConvertRFC3339TimestampStringDate() { assumeThat(Locale.getDefault(), is(Locale.UK)); String timestamp = "Fri, 11 Aug 2017 19:33:35 GMT"; Date now = new Date(); Date date = TranslationUtils.convertRfc3339Timestamp(timestamp, now); assertEquals(now, date); timestamp = "2017-08-11T19:33:35+0000"; Calendar calendar = Calendar.getInstance(); calendar.setTimeZone(TimeZone.getTimeZone("GMT")); calendar.set(2017, 7, 11, 19, 33, 35); calendar.set(Calendar.MILLISECOND, 0); assertEquals(calendar.getTime(), TranslationUtils.convertRfc3339Timestamp(timestamp, now)); } | public static synchronized Date convertRfc3339Timestamp(String timestamp) throws MbedCloudException { return convertTimestamp(timestamp, RFC3339_DATE_FORMAT); } | TranslationUtils { public static synchronized Date convertRfc3339Timestamp(String timestamp) throws MbedCloudException { return convertTimestamp(timestamp, RFC3339_DATE_FORMAT); } } | TranslationUtils { public static synchronized Date convertRfc3339Timestamp(String timestamp) throws MbedCloudException { return convertTimestamp(timestamp, RFC3339_DATE_FORMAT); } private TranslationUtils(); } | TranslationUtils { public static synchronized Date convertRfc3339Timestamp(String timestamp) throws MbedCloudException { return convertTimestamp(timestamp, RFC3339_DATE_FORMAT); } private TranslationUtils(); static Date toDate(DateTime date); static Date toDate(LocalDate ldate); static Date toDate(Calendar date); static Date toDate(Number timestamp); static Date toDate(Number timestamp, TimeUnit unit); static DateTime toDateTime(Date date); static LocalDate toLocalDate(Date date); static DataFile toDataFile(File file); static DataFile toDataFile(String filePath); static long toLong(Number longE); static long toLong(Date value); static long toLong(String value); static long toLong(Number longE, long defaultValue); static long toLong(Date value, long defaultValue); static long toLong(String stringContainingANumber, long defaultValue); static int toInt(Number number); static int toInt(String value); static int toInt(Number integer, int defaultV); static int toInt(String value, int defaultV); static Integer toInteger(String value, Integer defaultV); static boolean toBool(Boolean bool); static boolean toBool(String value); static boolean toBool(Boolean bool, boolean defaultB); static boolean toBool(String value, boolean defaultV); static double toDouble(Number value); static double toDouble(String value); static double toDouble(Number value, double defaultD); static double toDouble(String value, double defaultD); static URL toUrl(String url); static String toString(Object obj); static Base64 toBase64(Object obj); static byte[] toByteArray(Object obj); static synchronized Date convertTimestamp(String timestamp); static synchronized Date convertTimestamp(String timestamp, Date defaultDate); static synchronized Date convertTimestamp(String timestamp, DateFormat format, Date defaultDate); static synchronized Date convertTimestamp(String timestamp, DateFormat format); static synchronized Date convertRfc3339Timestamp(String timestamp); static synchronized Date convertRfc3339Timestamp(String timestamp, Date defaultDate); static synchronized String toDefaultTimestamp(Date date); static synchronized String toRfc3339Timestamp(Date date); static String toTimestamp(Date date, DateFormat format); static List<String> parseList(String string, String separator); static DateTime moveToUtc(Date date); static Date moveDateTimeToUtc(Date date); static String toUtcTimestamp(Date date); static Date convertStringToDate(String valueStr); } | TranslationUtils { public static synchronized Date convertRfc3339Timestamp(String timestamp) throws MbedCloudException { return convertTimestamp(timestamp, RFC3339_DATE_FORMAT); } private TranslationUtils(); static Date toDate(DateTime date); static Date toDate(LocalDate ldate); static Date toDate(Calendar date); static Date toDate(Number timestamp); static Date toDate(Number timestamp, TimeUnit unit); static DateTime toDateTime(Date date); static LocalDate toLocalDate(Date date); static DataFile toDataFile(File file); static DataFile toDataFile(String filePath); static long toLong(Number longE); static long toLong(Date value); static long toLong(String value); static long toLong(Number longE, long defaultValue); static long toLong(Date value, long defaultValue); static long toLong(String stringContainingANumber, long defaultValue); static int toInt(Number number); static int toInt(String value); static int toInt(Number integer, int defaultV); static int toInt(String value, int defaultV); static Integer toInteger(String value, Integer defaultV); static boolean toBool(Boolean bool); static boolean toBool(String value); static boolean toBool(Boolean bool, boolean defaultB); static boolean toBool(String value, boolean defaultV); static double toDouble(Number value); static double toDouble(String value); static double toDouble(Number value, double defaultD); static double toDouble(String value, double defaultD); static URL toUrl(String url); static String toString(Object obj); static Base64 toBase64(Object obj); static byte[] toByteArray(Object obj); static synchronized Date convertTimestamp(String timestamp); static synchronized Date convertTimestamp(String timestamp, Date defaultDate); static synchronized Date convertTimestamp(String timestamp, DateFormat format, Date defaultDate); static synchronized Date convertTimestamp(String timestamp, DateFormat format); static synchronized Date convertRfc3339Timestamp(String timestamp); static synchronized Date convertRfc3339Timestamp(String timestamp, Date defaultDate); static synchronized String toDefaultTimestamp(Date date); static synchronized String toRfc3339Timestamp(Date date); static String toTimestamp(Date date, DateFormat format); static List<String> parseList(String string, String separator); static DateTime moveToUtc(Date date); static Date moveDateTimeToUtc(Date date); static String toUtcTimestamp(Date date); static Date convertStringToDate(String valueStr); static final String METHOD_CONVERT_STRING_TO_DATE; static final String METHOD_CONVERT_OTHER_TO_DATE; static final String METHOD_CONVERT_DATE_TO_DATETIME; static final String METHOD_CONVERT_DATE_TO_LOCALDATE; static final String METHOD_CONVERT_DATE_TO_STRING; static final String METHOD_CONVERT_STRING_TO_URL; static final String METHOD_CONVERT_BOOL_TO_BOOL; static final String METHOD_CONVERT_NUMBER_TO_LONG; static final String METHOD_CONVERT_NUMBER_TO_INT; static final String METHOD_CONVERT_NUMBER_TO_DOUBLE; static final String METHOD_CONVERT_ANY_TO_STRING; static final String METHOD_CONVERT_ANY_TO_BYTE_ARRAY; static final String METHOD_CONVERT_ANY_TO_BASE64; static final String METHOD_CONVERT_TO_DATA_FILE; } |
@SuppressWarnings("resource") @Test public void testClone() { try { SubtenantDarkThemeColorDao subtenantdarkthemecolordao1 = new SubtenantDarkThemeColorDao(); SubtenantDarkThemeColorDao subtenantdarkthemecolordao2 = subtenantdarkthemecolordao1.clone(); assertNotNull(subtenantdarkthemecolordao1); assertNotNull(subtenantdarkthemecolordao2); assertNotSame(subtenantdarkthemecolordao2, subtenantdarkthemecolordao1); assertEquals(subtenantdarkthemecolordao2, subtenantdarkthemecolordao1); } catch (Exception exception) { fail(exception.getMessage()); } } | @Override @SuppressWarnings({ "resource", "unused" }) public SubtenantDarkThemeColorDao clone() { try { return new SubtenantDarkThemeColorDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } | SubtenantDarkThemeColorDao extends AbstractSubtenantDarkThemeColorDao { @Override @SuppressWarnings({ "resource", "unused" }) public SubtenantDarkThemeColorDao clone() { try { return new SubtenantDarkThemeColorDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } } | SubtenantDarkThemeColorDao extends AbstractSubtenantDarkThemeColorDao { @Override @SuppressWarnings({ "resource", "unused" }) public SubtenantDarkThemeColorDao clone() { try { return new SubtenantDarkThemeColorDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } SubtenantDarkThemeColorDao(); SubtenantDarkThemeColorDao(ApiClientWrapper client); SubtenantDarkThemeColorDao(ConnectionOptions options); SubtenantDarkThemeColorDao(SdkContext sdkContext); } | SubtenantDarkThemeColorDao extends AbstractSubtenantDarkThemeColorDao { @Override @SuppressWarnings({ "resource", "unused" }) public SubtenantDarkThemeColorDao clone() { try { return new SubtenantDarkThemeColorDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } SubtenantDarkThemeColorDao(); SubtenantDarkThemeColorDao(ApiClientWrapper client); SubtenantDarkThemeColorDao(ConnectionOptions options); SubtenantDarkThemeColorDao(SdkContext sdkContext); @Override @SuppressWarnings({ "resource", "unused" }) SubtenantDarkThemeColorDao clone(); @Override @NotImplemented void delete(); @Override @NotImplemented void delete(SubtenantDarkThemeColor modelToDelete); @Override @NotImplemented SubtenantDarkThemeColor read(); @Override @NotImplemented SubtenantDarkThemeColor update(); @Override @NotImplemented SubtenantDarkThemeColor update(SubtenantDarkThemeColor modelToUpdate); } | SubtenantDarkThemeColorDao extends AbstractSubtenantDarkThemeColorDao { @Override @SuppressWarnings({ "resource", "unused" }) public SubtenantDarkThemeColorDao clone() { try { return new SubtenantDarkThemeColorDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } SubtenantDarkThemeColorDao(); SubtenantDarkThemeColorDao(ApiClientWrapper client); SubtenantDarkThemeColorDao(ConnectionOptions options); SubtenantDarkThemeColorDao(SdkContext sdkContext); @Override @SuppressWarnings({ "resource", "unused" }) SubtenantDarkThemeColorDao clone(); @Override @NotImplemented void delete(); @Override @NotImplemented void delete(SubtenantDarkThemeColor modelToDelete); @Override @NotImplemented SubtenantDarkThemeColor read(); @Override @NotImplemented SubtenantDarkThemeColor update(); @Override @NotImplemented SubtenantDarkThemeColor update(SubtenantDarkThemeColor modelToUpdate); } |
@SuppressWarnings("resource") @Test public void testClone() { try { DarkThemeColorDao darkthemecolordao1 = new DarkThemeColorDao(); DarkThemeColorDao darkthemecolordao2 = darkthemecolordao1.clone(); assertNotNull(darkthemecolordao1); assertNotNull(darkthemecolordao2); assertNotSame(darkthemecolordao2, darkthemecolordao1); assertEquals(darkthemecolordao2, darkthemecolordao1); } catch (Exception exception) { fail(exception.getMessage()); } } | @Override @SuppressWarnings({ "resource", "unused" }) public DarkThemeColorDao clone() { try { return new DarkThemeColorDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } | DarkThemeColorDao extends AbstractDarkThemeColorDao { @Override @SuppressWarnings({ "resource", "unused" }) public DarkThemeColorDao clone() { try { return new DarkThemeColorDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } } | DarkThemeColorDao extends AbstractDarkThemeColorDao { @Override @SuppressWarnings({ "resource", "unused" }) public DarkThemeColorDao clone() { try { return new DarkThemeColorDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } DarkThemeColorDao(); DarkThemeColorDao(ApiClientWrapper client); DarkThemeColorDao(ConnectionOptions options); DarkThemeColorDao(SdkContext sdkContext); } | DarkThemeColorDao extends AbstractDarkThemeColorDao { @Override @SuppressWarnings({ "resource", "unused" }) public DarkThemeColorDao clone() { try { return new DarkThemeColorDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } DarkThemeColorDao(); DarkThemeColorDao(ApiClientWrapper client); DarkThemeColorDao(ConnectionOptions options); DarkThemeColorDao(SdkContext sdkContext); @Override @SuppressWarnings({ "resource", "unused" }) DarkThemeColorDao clone(); @Override void delete(String id); @Override DarkThemeColor read(String id); } | DarkThemeColorDao extends AbstractDarkThemeColorDao { @Override @SuppressWarnings({ "resource", "unused" }) public DarkThemeColorDao clone() { try { return new DarkThemeColorDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } DarkThemeColorDao(); DarkThemeColorDao(ApiClientWrapper client); DarkThemeColorDao(ConnectionOptions options); DarkThemeColorDao(SdkContext sdkContext); @Override @SuppressWarnings({ "resource", "unused" }) DarkThemeColorDao clone(); @Override void delete(String id); @Override DarkThemeColor read(String id); } |
@SuppressWarnings("resource") @Test public void testClone() { try { DarkThemeImageDao darkthemeimagedao1 = new DarkThemeImageDao(); DarkThemeImageDao darkthemeimagedao2 = darkthemeimagedao1.clone(); assertNotNull(darkthemeimagedao1); assertNotNull(darkthemeimagedao2); assertNotSame(darkthemeimagedao2, darkthemeimagedao1); assertEquals(darkthemeimagedao2, darkthemeimagedao1); } catch (Exception exception) { fail(exception.getMessage()); } } | @Override @SuppressWarnings({ "resource", "unused" }) public DarkThemeImageDao clone() { try { return new DarkThemeImageDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } | DarkThemeImageDao extends AbstractDarkThemeImageDao { @Override @SuppressWarnings({ "resource", "unused" }) public DarkThemeImageDao clone() { try { return new DarkThemeImageDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } } | DarkThemeImageDao extends AbstractDarkThemeImageDao { @Override @SuppressWarnings({ "resource", "unused" }) public DarkThemeImageDao clone() { try { return new DarkThemeImageDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } DarkThemeImageDao(); DarkThemeImageDao(ApiClientWrapper client); DarkThemeImageDao(ConnectionOptions options); DarkThemeImageDao(SdkContext sdkContext); } | DarkThemeImageDao extends AbstractDarkThemeImageDao { @Override @SuppressWarnings({ "resource", "unused" }) public DarkThemeImageDao clone() { try { return new DarkThemeImageDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } DarkThemeImageDao(); DarkThemeImageDao(ApiClientWrapper client); DarkThemeImageDao(ConnectionOptions options); DarkThemeImageDao(SdkContext sdkContext); @Override @SuppressWarnings({ "resource", "unused" }) DarkThemeImageDao clone(); @Override @NotImplemented DarkThemeImage update(); @Override @NotImplemented DarkThemeImage update(DarkThemeImage modelToUpdate); @Override void delete(String id); @Override DarkThemeImage read(String id); } | DarkThemeImageDao extends AbstractDarkThemeImageDao { @Override @SuppressWarnings({ "resource", "unused" }) public DarkThemeImageDao clone() { try { return new DarkThemeImageDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } DarkThemeImageDao(); DarkThemeImageDao(ApiClientWrapper client); DarkThemeImageDao(ConnectionOptions options); DarkThemeImageDao(SdkContext sdkContext); @Override @SuppressWarnings({ "resource", "unused" }) DarkThemeImageDao clone(); @Override @NotImplemented DarkThemeImage update(); @Override @NotImplemented DarkThemeImage update(DarkThemeImage modelToUpdate); @Override void delete(String id); @Override DarkThemeImage read(String id); } |
@SuppressWarnings("resource") @Test public void testClone() { try { LightThemeColorListOptions lightthemecolorlistoptions1 = new LightThemeColorListOptions(Integer.valueOf(-106), Long.valueOf(-16), Order.getDefault(), "dfd4f456-3350-41d8-a26d-47379f58b050", null, null); LightThemeColorListOptions lightthemecolorlistoptions2 = lightthemecolorlistoptions1.clone(); assertNotNull(lightthemecolorlistoptions1); assertNotNull(lightthemecolorlistoptions2); assertNotSame(lightthemecolorlistoptions2, lightthemecolorlistoptions1); assertEquals(lightthemecolorlistoptions2, lightthemecolorlistoptions1); } catch (Exception exception) { fail(exception.getMessage()); } } | @Override public LightThemeColorListOptions clone() { final LightThemeColorListOptions opt = new LightThemeColorListOptions(); opt.setOptions(this); return opt; } | LightThemeColorListOptions extends ListOptions { @Override public LightThemeColorListOptions clone() { final LightThemeColorListOptions opt = new LightThemeColorListOptions(); opt.setOptions(this); return opt; } } | LightThemeColorListOptions extends ListOptions { @Override public LightThemeColorListOptions clone() { final LightThemeColorListOptions opt = new LightThemeColorListOptions(); opt.setOptions(this); return opt; } @Internal LightThemeColorListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal LightThemeColorListOptions(LightThemeColorListOptions lightThemeColorListOptions); LightThemeColorListOptions(); @Internal LightThemeColorListOptions(String after, Filters filter); } | LightThemeColorListOptions extends ListOptions { @Override public LightThemeColorListOptions clone() { final LightThemeColorListOptions opt = new LightThemeColorListOptions(); opt.setOptions(this); return opt; } @Internal LightThemeColorListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal LightThemeColorListOptions(LightThemeColorListOptions lightThemeColorListOptions); LightThemeColorListOptions(); @Internal LightThemeColorListOptions(String after, Filters filter); @Override String toString(); @Override LightThemeColorListOptions clone(); @Override boolean equals(Object obj); @Override @SuppressWarnings("PMD.UselessOverridingMethod") int hashCode(); } | LightThemeColorListOptions extends ListOptions { @Override public LightThemeColorListOptions clone() { final LightThemeColorListOptions opt = new LightThemeColorListOptions(); opt.setOptions(this); return opt; } @Internal LightThemeColorListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal LightThemeColorListOptions(LightThemeColorListOptions lightThemeColorListOptions); LightThemeColorListOptions(); @Internal LightThemeColorListOptions(String after, Filters filter); @Override String toString(); @Override LightThemeColorListOptions clone(); @Override boolean equals(Object obj); @Override @SuppressWarnings("PMD.UselessOverridingMethod") int hashCode(); } |
@SuppressWarnings("resource") @Test public void testHashCode() { try { LightThemeColorListOptions lightthemecolorlistoptions1 = new LightThemeColorListOptions(Integer.valueOf(-124), Long.valueOf(-70), Order.getDefault(), "20240cfb-5178-4824-b701-e9aa650faa74", null, null); LightThemeColorListOptions lightthemecolorlistoptions2 = new LightThemeColorListOptions(Integer.valueOf(-124), Long.valueOf(-70), Order.getDefault(), "20240cfb-5178-4824-b701-e9aa650faa74", null, null); assertNotNull(lightthemecolorlistoptions1); assertNotNull(lightthemecolorlistoptions2); assertNotSame(lightthemecolorlistoptions2, lightthemecolorlistoptions1); assertEquals(lightthemecolorlistoptions2, lightthemecolorlistoptions1); assertEquals(lightthemecolorlistoptions2.hashCode(), lightthemecolorlistoptions1.hashCode()); int hashCode = lightthemecolorlistoptions1.hashCode(); for (int i = 0; i < 5; i++) { assertEquals(hashCode, lightthemecolorlistoptions1.hashCode()); } } catch (Exception exception) { fail(exception.getMessage()); } } | @Override @SuppressWarnings("PMD.UselessOverridingMethod") public int hashCode() { return super.hashCode(); } | LightThemeColorListOptions extends ListOptions { @Override @SuppressWarnings("PMD.UselessOverridingMethod") public int hashCode() { return super.hashCode(); } } | LightThemeColorListOptions extends ListOptions { @Override @SuppressWarnings("PMD.UselessOverridingMethod") public int hashCode() { return super.hashCode(); } @Internal LightThemeColorListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal LightThemeColorListOptions(LightThemeColorListOptions lightThemeColorListOptions); LightThemeColorListOptions(); @Internal LightThemeColorListOptions(String after, Filters filter); } | LightThemeColorListOptions extends ListOptions { @Override @SuppressWarnings("PMD.UselessOverridingMethod") public int hashCode() { return super.hashCode(); } @Internal LightThemeColorListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal LightThemeColorListOptions(LightThemeColorListOptions lightThemeColorListOptions); LightThemeColorListOptions(); @Internal LightThemeColorListOptions(String after, Filters filter); @Override String toString(); @Override LightThemeColorListOptions clone(); @Override boolean equals(Object obj); @Override @SuppressWarnings("PMD.UselessOverridingMethod") int hashCode(); } | LightThemeColorListOptions extends ListOptions { @Override @SuppressWarnings("PMD.UselessOverridingMethod") public int hashCode() { return super.hashCode(); } @Internal LightThemeColorListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal LightThemeColorListOptions(LightThemeColorListOptions lightThemeColorListOptions); LightThemeColorListOptions(); @Internal LightThemeColorListOptions(String after, Filters filter); @Override String toString(); @Override LightThemeColorListOptions clone(); @Override boolean equals(Object obj); @Override @SuppressWarnings("PMD.UselessOverridingMethod") int hashCode(); } |
@SuppressWarnings("resource") @Test public void testEquals() { try { LightThemeColorListOptions lightthemecolorlistoptions1 = new LightThemeColorListOptions(Integer.valueOf(55), Long.valueOf(54), Order.getDefault(), "9f2ff365-c85c-48cb-9165-0dc875d58f3f", null, null); LightThemeColorListOptions lightthemecolorlistoptions2 = new LightThemeColorListOptions(Integer.valueOf(55), Long.valueOf(54), Order.getDefault(), "9f2ff365-c85c-48cb-9165-0dc875d58f3f", null, null); LightThemeColorListOptions lightthemecolorlistoptions3 = new LightThemeColorListOptions(Integer.valueOf(-120), Long.valueOf(59), Order.getDefault(), "b1b9ed32-470c-4f13-a8af-9616d6f053d2", null, null); assertNotNull(lightthemecolorlistoptions1); assertNotNull(lightthemecolorlistoptions2); assertNotNull(lightthemecolorlistoptions3); assertNotSame(lightthemecolorlistoptions2, lightthemecolorlistoptions1); assertNotSame(lightthemecolorlistoptions3, lightthemecolorlistoptions1); assertEquals(lightthemecolorlistoptions2, lightthemecolorlistoptions1); assertEquals(lightthemecolorlistoptions2, lightthemecolorlistoptions1); assertEquals(lightthemecolorlistoptions1, lightthemecolorlistoptions2); assertEquals(lightthemecolorlistoptions1, lightthemecolorlistoptions1); assertFalse(lightthemecolorlistoptions1.equals(null)); assertNotEquals(lightthemecolorlistoptions3, lightthemecolorlistoptions1); } catch (Exception exception) { fail(exception.getMessage()); } } | @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!super.equals(obj)) { return false; } if (!(obj instanceof LightThemeColorListOptions)) { return false; } final LightThemeColorListOptions other = (LightThemeColorListOptions) obj; if (!other.canEqual(this)) { return false; } return true; } | LightThemeColorListOptions extends ListOptions { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!super.equals(obj)) { return false; } if (!(obj instanceof LightThemeColorListOptions)) { return false; } final LightThemeColorListOptions other = (LightThemeColorListOptions) obj; if (!other.canEqual(this)) { return false; } return true; } } | LightThemeColorListOptions extends ListOptions { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!super.equals(obj)) { return false; } if (!(obj instanceof LightThemeColorListOptions)) { return false; } final LightThemeColorListOptions other = (LightThemeColorListOptions) obj; if (!other.canEqual(this)) { return false; } return true; } @Internal LightThemeColorListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal LightThemeColorListOptions(LightThemeColorListOptions lightThemeColorListOptions); LightThemeColorListOptions(); @Internal LightThemeColorListOptions(String after, Filters filter); } | LightThemeColorListOptions extends ListOptions { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!super.equals(obj)) { return false; } if (!(obj instanceof LightThemeColorListOptions)) { return false; } final LightThemeColorListOptions other = (LightThemeColorListOptions) obj; if (!other.canEqual(this)) { return false; } return true; } @Internal LightThemeColorListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal LightThemeColorListOptions(LightThemeColorListOptions lightThemeColorListOptions); LightThemeColorListOptions(); @Internal LightThemeColorListOptions(String after, Filters filter); @Override String toString(); @Override LightThemeColorListOptions clone(); @Override boolean equals(Object obj); @Override @SuppressWarnings("PMD.UselessOverridingMethod") int hashCode(); } | LightThemeColorListOptions extends ListOptions { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!super.equals(obj)) { return false; } if (!(obj instanceof LightThemeColorListOptions)) { return false; } final LightThemeColorListOptions other = (LightThemeColorListOptions) obj; if (!other.canEqual(this)) { return false; } return true; } @Internal LightThemeColorListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal LightThemeColorListOptions(LightThemeColorListOptions lightThemeColorListOptions); LightThemeColorListOptions(); @Internal LightThemeColorListOptions(String after, Filters filter); @Override String toString(); @Override LightThemeColorListOptions clone(); @Override boolean equals(Object obj); @Override @SuppressWarnings("PMD.UselessOverridingMethod") int hashCode(); } |
@SuppressWarnings("resource") @Test public void testClone() { try { DarkThemeImageListOptions darkthemeimagelistoptions1 = new DarkThemeImageListOptions(Integer.valueOf(83), Long.valueOf(-47), Order.getDefault(), "48cfac6f-839a-473f-8758-d508923bf51a", null, null); DarkThemeImageListOptions darkthemeimagelistoptions2 = darkthemeimagelistoptions1.clone(); assertNotNull(darkthemeimagelistoptions1); assertNotNull(darkthemeimagelistoptions2); assertNotSame(darkthemeimagelistoptions2, darkthemeimagelistoptions1); assertEquals(darkthemeimagelistoptions2, darkthemeimagelistoptions1); } catch (Exception exception) { fail(exception.getMessage()); } } | @Override public DarkThemeImageListOptions clone() { final DarkThemeImageListOptions opt = new DarkThemeImageListOptions(); opt.setOptions(this); return opt; } | DarkThemeImageListOptions extends ListOptions { @Override public DarkThemeImageListOptions clone() { final DarkThemeImageListOptions opt = new DarkThemeImageListOptions(); opt.setOptions(this); return opt; } } | DarkThemeImageListOptions extends ListOptions { @Override public DarkThemeImageListOptions clone() { final DarkThemeImageListOptions opt = new DarkThemeImageListOptions(); opt.setOptions(this); return opt; } @Internal DarkThemeImageListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal DarkThemeImageListOptions(DarkThemeImageListOptions darkThemeImageListOptions); DarkThemeImageListOptions(); @Internal DarkThemeImageListOptions(String after, Filters filter); } | DarkThemeImageListOptions extends ListOptions { @Override public DarkThemeImageListOptions clone() { final DarkThemeImageListOptions opt = new DarkThemeImageListOptions(); opt.setOptions(this); return opt; } @Internal DarkThemeImageListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal DarkThemeImageListOptions(DarkThemeImageListOptions darkThemeImageListOptions); DarkThemeImageListOptions(); @Internal DarkThemeImageListOptions(String after, Filters filter); @Override String toString(); @Override DarkThemeImageListOptions clone(); @Override boolean equals(Object obj); @Override @SuppressWarnings("PMD.UselessOverridingMethod") int hashCode(); } | DarkThemeImageListOptions extends ListOptions { @Override public DarkThemeImageListOptions clone() { final DarkThemeImageListOptions opt = new DarkThemeImageListOptions(); opt.setOptions(this); return opt; } @Internal DarkThemeImageListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal DarkThemeImageListOptions(DarkThemeImageListOptions darkThemeImageListOptions); DarkThemeImageListOptions(); @Internal DarkThemeImageListOptions(String after, Filters filter); @Override String toString(); @Override DarkThemeImageListOptions clone(); @Override boolean equals(Object obj); @Override @SuppressWarnings("PMD.UselessOverridingMethod") int hashCode(); } |
@SuppressWarnings("resource") @Test public void testHashCode() { try { DarkThemeImageListOptions darkthemeimagelistoptions1 = new DarkThemeImageListOptions(Integer.valueOf(0), Long.valueOf(80), Order.getDefault(), "9932fffe-29c3-42ff-8483-e578b75847e1", null, null); DarkThemeImageListOptions darkthemeimagelistoptions2 = new DarkThemeImageListOptions(Integer.valueOf(0), Long.valueOf(80), Order.getDefault(), "9932fffe-29c3-42ff-8483-e578b75847e1", null, null); assertNotNull(darkthemeimagelistoptions1); assertNotNull(darkthemeimagelistoptions2); assertNotSame(darkthemeimagelistoptions2, darkthemeimagelistoptions1); assertEquals(darkthemeimagelistoptions2, darkthemeimagelistoptions1); assertEquals(darkthemeimagelistoptions2.hashCode(), darkthemeimagelistoptions1.hashCode()); int hashCode = darkthemeimagelistoptions1.hashCode(); for (int i = 0; i < 5; i++) { assertEquals(hashCode, darkthemeimagelistoptions1.hashCode()); } } catch (Exception exception) { fail(exception.getMessage()); } } | @Override @SuppressWarnings("PMD.UselessOverridingMethod") public int hashCode() { return super.hashCode(); } | DarkThemeImageListOptions extends ListOptions { @Override @SuppressWarnings("PMD.UselessOverridingMethod") public int hashCode() { return super.hashCode(); } } | DarkThemeImageListOptions extends ListOptions { @Override @SuppressWarnings("PMD.UselessOverridingMethod") public int hashCode() { return super.hashCode(); } @Internal DarkThemeImageListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal DarkThemeImageListOptions(DarkThemeImageListOptions darkThemeImageListOptions); DarkThemeImageListOptions(); @Internal DarkThemeImageListOptions(String after, Filters filter); } | DarkThemeImageListOptions extends ListOptions { @Override @SuppressWarnings("PMD.UselessOverridingMethod") public int hashCode() { return super.hashCode(); } @Internal DarkThemeImageListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal DarkThemeImageListOptions(DarkThemeImageListOptions darkThemeImageListOptions); DarkThemeImageListOptions(); @Internal DarkThemeImageListOptions(String after, Filters filter); @Override String toString(); @Override DarkThemeImageListOptions clone(); @Override boolean equals(Object obj); @Override @SuppressWarnings("PMD.UselessOverridingMethod") int hashCode(); } | DarkThemeImageListOptions extends ListOptions { @Override @SuppressWarnings("PMD.UselessOverridingMethod") public int hashCode() { return super.hashCode(); } @Internal DarkThemeImageListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal DarkThemeImageListOptions(DarkThemeImageListOptions darkThemeImageListOptions); DarkThemeImageListOptions(); @Internal DarkThemeImageListOptions(String after, Filters filter); @Override String toString(); @Override DarkThemeImageListOptions clone(); @Override boolean equals(Object obj); @Override @SuppressWarnings("PMD.UselessOverridingMethod") int hashCode(); } |
@SuppressWarnings("resource") @Test public void testEquals() { try { DarkThemeImageListOptions darkthemeimagelistoptions1 = new DarkThemeImageListOptions(Integer.valueOf(46), Long.valueOf(3), Order.getDefault(), "85e99437-3b6d-479e-b531-ebab72bbf20f", null, null); DarkThemeImageListOptions darkthemeimagelistoptions2 = new DarkThemeImageListOptions(Integer.valueOf(46), Long.valueOf(3), Order.getDefault(), "85e99437-3b6d-479e-b531-ebab72bbf20f", null, null); DarkThemeImageListOptions darkthemeimagelistoptions3 = new DarkThemeImageListOptions(Integer.valueOf(-64), Long.valueOf(-103), Order.getDefault(), "5fad5c74-dd14-4f50-b6a5-d5033ab1ec6f", null, null); assertNotNull(darkthemeimagelistoptions1); assertNotNull(darkthemeimagelistoptions2); assertNotNull(darkthemeimagelistoptions3); assertNotSame(darkthemeimagelistoptions2, darkthemeimagelistoptions1); assertNotSame(darkthemeimagelistoptions3, darkthemeimagelistoptions1); assertEquals(darkthemeimagelistoptions2, darkthemeimagelistoptions1); assertEquals(darkthemeimagelistoptions2, darkthemeimagelistoptions1); assertEquals(darkthemeimagelistoptions1, darkthemeimagelistoptions2); assertEquals(darkthemeimagelistoptions1, darkthemeimagelistoptions1); assertFalse(darkthemeimagelistoptions1.equals(null)); assertNotEquals(darkthemeimagelistoptions3, darkthemeimagelistoptions1); } catch (Exception exception) { fail(exception.getMessage()); } } | @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!super.equals(obj)) { return false; } if (!(obj instanceof DarkThemeImageListOptions)) { return false; } final DarkThemeImageListOptions other = (DarkThemeImageListOptions) obj; if (!other.canEqual(this)) { return false; } return true; } | DarkThemeImageListOptions extends ListOptions { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!super.equals(obj)) { return false; } if (!(obj instanceof DarkThemeImageListOptions)) { return false; } final DarkThemeImageListOptions other = (DarkThemeImageListOptions) obj; if (!other.canEqual(this)) { return false; } return true; } } | DarkThemeImageListOptions extends ListOptions { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!super.equals(obj)) { return false; } if (!(obj instanceof DarkThemeImageListOptions)) { return false; } final DarkThemeImageListOptions other = (DarkThemeImageListOptions) obj; if (!other.canEqual(this)) { return false; } return true; } @Internal DarkThemeImageListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal DarkThemeImageListOptions(DarkThemeImageListOptions darkThemeImageListOptions); DarkThemeImageListOptions(); @Internal DarkThemeImageListOptions(String after, Filters filter); } | DarkThemeImageListOptions extends ListOptions { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!super.equals(obj)) { return false; } if (!(obj instanceof DarkThemeImageListOptions)) { return false; } final DarkThemeImageListOptions other = (DarkThemeImageListOptions) obj; if (!other.canEqual(this)) { return false; } return true; } @Internal DarkThemeImageListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal DarkThemeImageListOptions(DarkThemeImageListOptions darkThemeImageListOptions); DarkThemeImageListOptions(); @Internal DarkThemeImageListOptions(String after, Filters filter); @Override String toString(); @Override DarkThemeImageListOptions clone(); @Override boolean equals(Object obj); @Override @SuppressWarnings("PMD.UselessOverridingMethod") int hashCode(); } | DarkThemeImageListOptions extends ListOptions { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!super.equals(obj)) { return false; } if (!(obj instanceof DarkThemeImageListOptions)) { return false; } final DarkThemeImageListOptions other = (DarkThemeImageListOptions) obj; if (!other.canEqual(this)) { return false; } return true; } @Internal DarkThemeImageListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal DarkThemeImageListOptions(DarkThemeImageListOptions darkThemeImageListOptions); DarkThemeImageListOptions(); @Internal DarkThemeImageListOptions(String after, Filters filter); @Override String toString(); @Override DarkThemeImageListOptions clone(); @Override boolean equals(Object obj); @Override @SuppressWarnings("PMD.UselessOverridingMethod") int hashCode(); } |
@SuppressWarnings("resource") @Test public void testClone() { try { LightThemeImageListOptions lightthemeimagelistoptions1 = new LightThemeImageListOptions(Integer.valueOf(-37), Long.valueOf(-122), Order.getDefault(), "d8afcaaf-2d6d-486d-aacd-210c1e3694e4", null, null); LightThemeImageListOptions lightthemeimagelistoptions2 = lightthemeimagelistoptions1.clone(); assertNotNull(lightthemeimagelistoptions1); assertNotNull(lightthemeimagelistoptions2); assertNotSame(lightthemeimagelistoptions2, lightthemeimagelistoptions1); assertEquals(lightthemeimagelistoptions2, lightthemeimagelistoptions1); } catch (Exception exception) { fail(exception.getMessage()); } } | @Override public LightThemeImageListOptions clone() { final LightThemeImageListOptions opt = new LightThemeImageListOptions(); opt.setOptions(this); return opt; } | LightThemeImageListOptions extends ListOptions { @Override public LightThemeImageListOptions clone() { final LightThemeImageListOptions opt = new LightThemeImageListOptions(); opt.setOptions(this); return opt; } } | LightThemeImageListOptions extends ListOptions { @Override public LightThemeImageListOptions clone() { final LightThemeImageListOptions opt = new LightThemeImageListOptions(); opt.setOptions(this); return opt; } @Internal LightThemeImageListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal LightThemeImageListOptions(LightThemeImageListOptions lightThemeImageListOptions); LightThemeImageListOptions(); @Internal LightThemeImageListOptions(String after, Filters filter); } | LightThemeImageListOptions extends ListOptions { @Override public LightThemeImageListOptions clone() { final LightThemeImageListOptions opt = new LightThemeImageListOptions(); opt.setOptions(this); return opt; } @Internal LightThemeImageListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal LightThemeImageListOptions(LightThemeImageListOptions lightThemeImageListOptions); LightThemeImageListOptions(); @Internal LightThemeImageListOptions(String after, Filters filter); @Override String toString(); @Override LightThemeImageListOptions clone(); @Override boolean equals(Object obj); @Override @SuppressWarnings("PMD.UselessOverridingMethod") int hashCode(); } | LightThemeImageListOptions extends ListOptions { @Override public LightThemeImageListOptions clone() { final LightThemeImageListOptions opt = new LightThemeImageListOptions(); opt.setOptions(this); return opt; } @Internal LightThemeImageListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal LightThemeImageListOptions(LightThemeImageListOptions lightThemeImageListOptions); LightThemeImageListOptions(); @Internal LightThemeImageListOptions(String after, Filters filter); @Override String toString(); @Override LightThemeImageListOptions clone(); @Override boolean equals(Object obj); @Override @SuppressWarnings("PMD.UselessOverridingMethod") int hashCode(); } |
@Test public void testConvertTimestampStringDateFormatDate() { assumeThat(Locale.getDefault(), is(Locale.UK)); String timestamp = "Fri, 11 Aug 2017 19:33:35 GMT"; Date now = new Date(); Date date = TranslationUtils.convertTimestamp(timestamp, new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss z"), now); Calendar calendar = Calendar.getInstance(); calendar.setTimeZone(TimeZone.getTimeZone("GMT")); calendar.set(2017, 7, 11, 19, 33, 35); calendar.set(Calendar.MILLISECOND, 0); assertEquals(calendar.getTime(), date); date = TranslationUtils.convertTimestamp("Fri 11 Aug 2017 19:33:35", new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss z"), now); assertEquals(now, date); } | public static synchronized Date convertTimestamp(String timestamp) throws MbedCloudException { return convertTimestamp(timestamp, DateFormat.getDateTimeInstance()); } | TranslationUtils { public static synchronized Date convertTimestamp(String timestamp) throws MbedCloudException { return convertTimestamp(timestamp, DateFormat.getDateTimeInstance()); } } | TranslationUtils { public static synchronized Date convertTimestamp(String timestamp) throws MbedCloudException { return convertTimestamp(timestamp, DateFormat.getDateTimeInstance()); } private TranslationUtils(); } | TranslationUtils { public static synchronized Date convertTimestamp(String timestamp) throws MbedCloudException { return convertTimestamp(timestamp, DateFormat.getDateTimeInstance()); } private TranslationUtils(); static Date toDate(DateTime date); static Date toDate(LocalDate ldate); static Date toDate(Calendar date); static Date toDate(Number timestamp); static Date toDate(Number timestamp, TimeUnit unit); static DateTime toDateTime(Date date); static LocalDate toLocalDate(Date date); static DataFile toDataFile(File file); static DataFile toDataFile(String filePath); static long toLong(Number longE); static long toLong(Date value); static long toLong(String value); static long toLong(Number longE, long defaultValue); static long toLong(Date value, long defaultValue); static long toLong(String stringContainingANumber, long defaultValue); static int toInt(Number number); static int toInt(String value); static int toInt(Number integer, int defaultV); static int toInt(String value, int defaultV); static Integer toInteger(String value, Integer defaultV); static boolean toBool(Boolean bool); static boolean toBool(String value); static boolean toBool(Boolean bool, boolean defaultB); static boolean toBool(String value, boolean defaultV); static double toDouble(Number value); static double toDouble(String value); static double toDouble(Number value, double defaultD); static double toDouble(String value, double defaultD); static URL toUrl(String url); static String toString(Object obj); static Base64 toBase64(Object obj); static byte[] toByteArray(Object obj); static synchronized Date convertTimestamp(String timestamp); static synchronized Date convertTimestamp(String timestamp, Date defaultDate); static synchronized Date convertTimestamp(String timestamp, DateFormat format, Date defaultDate); static synchronized Date convertTimestamp(String timestamp, DateFormat format); static synchronized Date convertRfc3339Timestamp(String timestamp); static synchronized Date convertRfc3339Timestamp(String timestamp, Date defaultDate); static synchronized String toDefaultTimestamp(Date date); static synchronized String toRfc3339Timestamp(Date date); static String toTimestamp(Date date, DateFormat format); static List<String> parseList(String string, String separator); static DateTime moveToUtc(Date date); static Date moveDateTimeToUtc(Date date); static String toUtcTimestamp(Date date); static Date convertStringToDate(String valueStr); } | TranslationUtils { public static synchronized Date convertTimestamp(String timestamp) throws MbedCloudException { return convertTimestamp(timestamp, DateFormat.getDateTimeInstance()); } private TranslationUtils(); static Date toDate(DateTime date); static Date toDate(LocalDate ldate); static Date toDate(Calendar date); static Date toDate(Number timestamp); static Date toDate(Number timestamp, TimeUnit unit); static DateTime toDateTime(Date date); static LocalDate toLocalDate(Date date); static DataFile toDataFile(File file); static DataFile toDataFile(String filePath); static long toLong(Number longE); static long toLong(Date value); static long toLong(String value); static long toLong(Number longE, long defaultValue); static long toLong(Date value, long defaultValue); static long toLong(String stringContainingANumber, long defaultValue); static int toInt(Number number); static int toInt(String value); static int toInt(Number integer, int defaultV); static int toInt(String value, int defaultV); static Integer toInteger(String value, Integer defaultV); static boolean toBool(Boolean bool); static boolean toBool(String value); static boolean toBool(Boolean bool, boolean defaultB); static boolean toBool(String value, boolean defaultV); static double toDouble(Number value); static double toDouble(String value); static double toDouble(Number value, double defaultD); static double toDouble(String value, double defaultD); static URL toUrl(String url); static String toString(Object obj); static Base64 toBase64(Object obj); static byte[] toByteArray(Object obj); static synchronized Date convertTimestamp(String timestamp); static synchronized Date convertTimestamp(String timestamp, Date defaultDate); static synchronized Date convertTimestamp(String timestamp, DateFormat format, Date defaultDate); static synchronized Date convertTimestamp(String timestamp, DateFormat format); static synchronized Date convertRfc3339Timestamp(String timestamp); static synchronized Date convertRfc3339Timestamp(String timestamp, Date defaultDate); static synchronized String toDefaultTimestamp(Date date); static synchronized String toRfc3339Timestamp(Date date); static String toTimestamp(Date date, DateFormat format); static List<String> parseList(String string, String separator); static DateTime moveToUtc(Date date); static Date moveDateTimeToUtc(Date date); static String toUtcTimestamp(Date date); static Date convertStringToDate(String valueStr); static final String METHOD_CONVERT_STRING_TO_DATE; static final String METHOD_CONVERT_OTHER_TO_DATE; static final String METHOD_CONVERT_DATE_TO_DATETIME; static final String METHOD_CONVERT_DATE_TO_LOCALDATE; static final String METHOD_CONVERT_DATE_TO_STRING; static final String METHOD_CONVERT_STRING_TO_URL; static final String METHOD_CONVERT_BOOL_TO_BOOL; static final String METHOD_CONVERT_NUMBER_TO_LONG; static final String METHOD_CONVERT_NUMBER_TO_INT; static final String METHOD_CONVERT_NUMBER_TO_DOUBLE; static final String METHOD_CONVERT_ANY_TO_STRING; static final String METHOD_CONVERT_ANY_TO_BYTE_ARRAY; static final String METHOD_CONVERT_ANY_TO_BASE64; static final String METHOD_CONVERT_TO_DATA_FILE; } |
@SuppressWarnings("resource") @Test public void testHashCode() { try { LightThemeImageListOptions lightthemeimagelistoptions1 = new LightThemeImageListOptions(Integer.valueOf(114), Long.valueOf(-108), Order.getDefault(), "6535f1da-8cb2-4169-aaee-8fcab42dd3e1", null, null); LightThemeImageListOptions lightthemeimagelistoptions2 = new LightThemeImageListOptions(Integer.valueOf(114), Long.valueOf(-108), Order.getDefault(), "6535f1da-8cb2-4169-aaee-8fcab42dd3e1", null, null); assertNotNull(lightthemeimagelistoptions1); assertNotNull(lightthemeimagelistoptions2); assertNotSame(lightthemeimagelistoptions2, lightthemeimagelistoptions1); assertEquals(lightthemeimagelistoptions2, lightthemeimagelistoptions1); assertEquals(lightthemeimagelistoptions2.hashCode(), lightthemeimagelistoptions1.hashCode()); int hashCode = lightthemeimagelistoptions1.hashCode(); for (int i = 0; i < 5; i++) { assertEquals(hashCode, lightthemeimagelistoptions1.hashCode()); } } catch (Exception exception) { fail(exception.getMessage()); } } | @Override @SuppressWarnings("PMD.UselessOverridingMethod") public int hashCode() { return super.hashCode(); } | LightThemeImageListOptions extends ListOptions { @Override @SuppressWarnings("PMD.UselessOverridingMethod") public int hashCode() { return super.hashCode(); } } | LightThemeImageListOptions extends ListOptions { @Override @SuppressWarnings("PMD.UselessOverridingMethod") public int hashCode() { return super.hashCode(); } @Internal LightThemeImageListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal LightThemeImageListOptions(LightThemeImageListOptions lightThemeImageListOptions); LightThemeImageListOptions(); @Internal LightThemeImageListOptions(String after, Filters filter); } | LightThemeImageListOptions extends ListOptions { @Override @SuppressWarnings("PMD.UselessOverridingMethod") public int hashCode() { return super.hashCode(); } @Internal LightThemeImageListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal LightThemeImageListOptions(LightThemeImageListOptions lightThemeImageListOptions); LightThemeImageListOptions(); @Internal LightThemeImageListOptions(String after, Filters filter); @Override String toString(); @Override LightThemeImageListOptions clone(); @Override boolean equals(Object obj); @Override @SuppressWarnings("PMD.UselessOverridingMethod") int hashCode(); } | LightThemeImageListOptions extends ListOptions { @Override @SuppressWarnings("PMD.UselessOverridingMethod") public int hashCode() { return super.hashCode(); } @Internal LightThemeImageListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal LightThemeImageListOptions(LightThemeImageListOptions lightThemeImageListOptions); LightThemeImageListOptions(); @Internal LightThemeImageListOptions(String after, Filters filter); @Override String toString(); @Override LightThemeImageListOptions clone(); @Override boolean equals(Object obj); @Override @SuppressWarnings("PMD.UselessOverridingMethod") int hashCode(); } |
@SuppressWarnings("resource") @Test public void testEquals() { try { LightThemeImageListOptions lightthemeimagelistoptions1 = new LightThemeImageListOptions(Integer.valueOf(116), Long.valueOf(2), Order.getDefault(), "9390a0e9-4e11-4918-9db1-bbb6cbb88db2", null, null); LightThemeImageListOptions lightthemeimagelistoptions2 = new LightThemeImageListOptions(Integer.valueOf(116), Long.valueOf(2), Order.getDefault(), "9390a0e9-4e11-4918-9db1-bbb6cbb88db2", null, null); LightThemeImageListOptions lightthemeimagelistoptions3 = new LightThemeImageListOptions(Integer.valueOf(6), Long.valueOf(102), Order.getDefault(), "87daa01d-ac61-47db-a77c-84f6ef8265ca", null, null); assertNotNull(lightthemeimagelistoptions1); assertNotNull(lightthemeimagelistoptions2); assertNotNull(lightthemeimagelistoptions3); assertNotSame(lightthemeimagelistoptions2, lightthemeimagelistoptions1); assertNotSame(lightthemeimagelistoptions3, lightthemeimagelistoptions1); assertEquals(lightthemeimagelistoptions2, lightthemeimagelistoptions1); assertEquals(lightthemeimagelistoptions2, lightthemeimagelistoptions1); assertEquals(lightthemeimagelistoptions1, lightthemeimagelistoptions2); assertEquals(lightthemeimagelistoptions1, lightthemeimagelistoptions1); assertFalse(lightthemeimagelistoptions1.equals(null)); assertNotEquals(lightthemeimagelistoptions3, lightthemeimagelistoptions1); } catch (Exception exception) { fail(exception.getMessage()); } } | @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!super.equals(obj)) { return false; } if (!(obj instanceof LightThemeImageListOptions)) { return false; } final LightThemeImageListOptions other = (LightThemeImageListOptions) obj; if (!other.canEqual(this)) { return false; } return true; } | LightThemeImageListOptions extends ListOptions { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!super.equals(obj)) { return false; } if (!(obj instanceof LightThemeImageListOptions)) { return false; } final LightThemeImageListOptions other = (LightThemeImageListOptions) obj; if (!other.canEqual(this)) { return false; } return true; } } | LightThemeImageListOptions extends ListOptions { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!super.equals(obj)) { return false; } if (!(obj instanceof LightThemeImageListOptions)) { return false; } final LightThemeImageListOptions other = (LightThemeImageListOptions) obj; if (!other.canEqual(this)) { return false; } return true; } @Internal LightThemeImageListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal LightThemeImageListOptions(LightThemeImageListOptions lightThemeImageListOptions); LightThemeImageListOptions(); @Internal LightThemeImageListOptions(String after, Filters filter); } | LightThemeImageListOptions extends ListOptions { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!super.equals(obj)) { return false; } if (!(obj instanceof LightThemeImageListOptions)) { return false; } final LightThemeImageListOptions other = (LightThemeImageListOptions) obj; if (!other.canEqual(this)) { return false; } return true; } @Internal LightThemeImageListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal LightThemeImageListOptions(LightThemeImageListOptions lightThemeImageListOptions); LightThemeImageListOptions(); @Internal LightThemeImageListOptions(String after, Filters filter); @Override String toString(); @Override LightThemeImageListOptions clone(); @Override boolean equals(Object obj); @Override @SuppressWarnings("PMD.UselessOverridingMethod") int hashCode(); } | LightThemeImageListOptions extends ListOptions { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!super.equals(obj)) { return false; } if (!(obj instanceof LightThemeImageListOptions)) { return false; } final LightThemeImageListOptions other = (LightThemeImageListOptions) obj; if (!other.canEqual(this)) { return false; } return true; } @Internal LightThemeImageListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal LightThemeImageListOptions(LightThemeImageListOptions lightThemeImageListOptions); LightThemeImageListOptions(); @Internal LightThemeImageListOptions(String after, Filters filter); @Override String toString(); @Override LightThemeImageListOptions clone(); @Override boolean equals(Object obj); @Override @SuppressWarnings("PMD.UselessOverridingMethod") int hashCode(); } |
@SuppressWarnings("resource") @Test public void testClone() { try { SubtenantDarkThemeColorListOptions subtenantdarkthemecolorlistoptions1 = new SubtenantDarkThemeColorListOptions(Integer.valueOf(103), Long.valueOf(-48), Order.getDefault(), "e07ff200-7815-4ca2-b9f7-9d235cf8ade3", null, null); SubtenantDarkThemeColorListOptions subtenantdarkthemecolorlistoptions2 = subtenantdarkthemecolorlistoptions1.clone(); assertNotNull(subtenantdarkthemecolorlistoptions1); assertNotNull(subtenantdarkthemecolorlistoptions2); assertNotSame(subtenantdarkthemecolorlistoptions2, subtenantdarkthemecolorlistoptions1); assertEquals(subtenantdarkthemecolorlistoptions2, subtenantdarkthemecolorlistoptions1); } catch (Exception exception) { fail(exception.getMessage()); } } | @Override public SubtenantDarkThemeColorListOptions clone() { final SubtenantDarkThemeColorListOptions opt = new SubtenantDarkThemeColorListOptions(); opt.setOptions(this); return opt; } | SubtenantDarkThemeColorListOptions extends ListOptions { @Override public SubtenantDarkThemeColorListOptions clone() { final SubtenantDarkThemeColorListOptions opt = new SubtenantDarkThemeColorListOptions(); opt.setOptions(this); return opt; } } | SubtenantDarkThemeColorListOptions extends ListOptions { @Override public SubtenantDarkThemeColorListOptions clone() { final SubtenantDarkThemeColorListOptions opt = new SubtenantDarkThemeColorListOptions(); opt.setOptions(this); return opt; } @Internal SubtenantDarkThemeColorListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal SubtenantDarkThemeColorListOptions(SubtenantDarkThemeColorListOptions subtenantDarkThemeColorListOptions); SubtenantDarkThemeColorListOptions(); @Internal SubtenantDarkThemeColorListOptions(String after, Filters filter); } | SubtenantDarkThemeColorListOptions extends ListOptions { @Override public SubtenantDarkThemeColorListOptions clone() { final SubtenantDarkThemeColorListOptions opt = new SubtenantDarkThemeColorListOptions(); opt.setOptions(this); return opt; } @Internal SubtenantDarkThemeColorListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal SubtenantDarkThemeColorListOptions(SubtenantDarkThemeColorListOptions subtenantDarkThemeColorListOptions); SubtenantDarkThemeColorListOptions(); @Internal SubtenantDarkThemeColorListOptions(String after, Filters filter); @Override String toString(); @Override SubtenantDarkThemeColorListOptions clone(); @Override boolean equals(Object obj); @Override @SuppressWarnings("PMD.UselessOverridingMethod") int hashCode(); } | SubtenantDarkThemeColorListOptions extends ListOptions { @Override public SubtenantDarkThemeColorListOptions clone() { final SubtenantDarkThemeColorListOptions opt = new SubtenantDarkThemeColorListOptions(); opt.setOptions(this); return opt; } @Internal SubtenantDarkThemeColorListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal SubtenantDarkThemeColorListOptions(SubtenantDarkThemeColorListOptions subtenantDarkThemeColorListOptions); SubtenantDarkThemeColorListOptions(); @Internal SubtenantDarkThemeColorListOptions(String after, Filters filter); @Override String toString(); @Override SubtenantDarkThemeColorListOptions clone(); @Override boolean equals(Object obj); @Override @SuppressWarnings("PMD.UselessOverridingMethod") int hashCode(); } |
@SuppressWarnings("resource") @Test public void testHashCode() { try { SubtenantDarkThemeColorListOptions subtenantdarkthemecolorlistoptions1 = new SubtenantDarkThemeColorListOptions(Integer.valueOf(-24), Long.valueOf(-24), Order.getDefault(), "3b5cfa46-27cc-46a5-a3b9-c1b317aaeafd", null, null); SubtenantDarkThemeColorListOptions subtenantdarkthemecolorlistoptions2 = new SubtenantDarkThemeColorListOptions(Integer.valueOf(-24), Long.valueOf(-24), Order.getDefault(), "3b5cfa46-27cc-46a5-a3b9-c1b317aaeafd", null, null); assertNotNull(subtenantdarkthemecolorlistoptions1); assertNotNull(subtenantdarkthemecolorlistoptions2); assertNotSame(subtenantdarkthemecolorlistoptions2, subtenantdarkthemecolorlistoptions1); assertEquals(subtenantdarkthemecolorlistoptions2, subtenantdarkthemecolorlistoptions1); assertEquals(subtenantdarkthemecolorlistoptions2.hashCode(), subtenantdarkthemecolorlistoptions1.hashCode()); int hashCode = subtenantdarkthemecolorlistoptions1.hashCode(); for (int i = 0; i < 5; i++) { assertEquals(hashCode, subtenantdarkthemecolorlistoptions1.hashCode()); } } catch (Exception exception) { fail(exception.getMessage()); } } | @Override @SuppressWarnings("PMD.UselessOverridingMethod") public int hashCode() { return super.hashCode(); } | SubtenantDarkThemeColorListOptions extends ListOptions { @Override @SuppressWarnings("PMD.UselessOverridingMethod") public int hashCode() { return super.hashCode(); } } | SubtenantDarkThemeColorListOptions extends ListOptions { @Override @SuppressWarnings("PMD.UselessOverridingMethod") public int hashCode() { return super.hashCode(); } @Internal SubtenantDarkThemeColorListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal SubtenantDarkThemeColorListOptions(SubtenantDarkThemeColorListOptions subtenantDarkThemeColorListOptions); SubtenantDarkThemeColorListOptions(); @Internal SubtenantDarkThemeColorListOptions(String after, Filters filter); } | SubtenantDarkThemeColorListOptions extends ListOptions { @Override @SuppressWarnings("PMD.UselessOverridingMethod") public int hashCode() { return super.hashCode(); } @Internal SubtenantDarkThemeColorListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal SubtenantDarkThemeColorListOptions(SubtenantDarkThemeColorListOptions subtenantDarkThemeColorListOptions); SubtenantDarkThemeColorListOptions(); @Internal SubtenantDarkThemeColorListOptions(String after, Filters filter); @Override String toString(); @Override SubtenantDarkThemeColorListOptions clone(); @Override boolean equals(Object obj); @Override @SuppressWarnings("PMD.UselessOverridingMethod") int hashCode(); } | SubtenantDarkThemeColorListOptions extends ListOptions { @Override @SuppressWarnings("PMD.UselessOverridingMethod") public int hashCode() { return super.hashCode(); } @Internal SubtenantDarkThemeColorListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal SubtenantDarkThemeColorListOptions(SubtenantDarkThemeColorListOptions subtenantDarkThemeColorListOptions); SubtenantDarkThemeColorListOptions(); @Internal SubtenantDarkThemeColorListOptions(String after, Filters filter); @Override String toString(); @Override SubtenantDarkThemeColorListOptions clone(); @Override boolean equals(Object obj); @Override @SuppressWarnings("PMD.UselessOverridingMethod") int hashCode(); } |
@SuppressWarnings("resource") @Test public void testEquals() { try { SubtenantDarkThemeColorListOptions subtenantdarkthemecolorlistoptions1 = new SubtenantDarkThemeColorListOptions(Integer.valueOf(-96), Long.valueOf(-92), Order.getDefault(), "ad02212d-11b8-49e6-9533-b54f4902a5c3", null, null); SubtenantDarkThemeColorListOptions subtenantdarkthemecolorlistoptions2 = new SubtenantDarkThemeColorListOptions(Integer.valueOf(-96), Long.valueOf(-92), Order.getDefault(), "ad02212d-11b8-49e6-9533-b54f4902a5c3", null, null); SubtenantDarkThemeColorListOptions subtenantdarkthemecolorlistoptions3 = new SubtenantDarkThemeColorListOptions(Integer.valueOf(55), Long.valueOf(-27), Order.getDefault(), "81973b2f-076f-40fb-9de0-6119b83ec9a2", null, null); assertNotNull(subtenantdarkthemecolorlistoptions1); assertNotNull(subtenantdarkthemecolorlistoptions2); assertNotNull(subtenantdarkthemecolorlistoptions3); assertNotSame(subtenantdarkthemecolorlistoptions2, subtenantdarkthemecolorlistoptions1); assertNotSame(subtenantdarkthemecolorlistoptions3, subtenantdarkthemecolorlistoptions1); assertEquals(subtenantdarkthemecolorlistoptions2, subtenantdarkthemecolorlistoptions1); assertEquals(subtenantdarkthemecolorlistoptions2, subtenantdarkthemecolorlistoptions1); assertEquals(subtenantdarkthemecolorlistoptions1, subtenantdarkthemecolorlistoptions2); assertEquals(subtenantdarkthemecolorlistoptions1, subtenantdarkthemecolorlistoptions1); assertFalse(subtenantdarkthemecolorlistoptions1.equals(null)); assertNotEquals(subtenantdarkthemecolorlistoptions3, subtenantdarkthemecolorlistoptions1); } catch (Exception exception) { fail(exception.getMessage()); } } | @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!super.equals(obj)) { return false; } if (!(obj instanceof SubtenantDarkThemeColorListOptions)) { return false; } final SubtenantDarkThemeColorListOptions other = (SubtenantDarkThemeColorListOptions) obj; if (!other.canEqual(this)) { return false; } return true; } | SubtenantDarkThemeColorListOptions extends ListOptions { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!super.equals(obj)) { return false; } if (!(obj instanceof SubtenantDarkThemeColorListOptions)) { return false; } final SubtenantDarkThemeColorListOptions other = (SubtenantDarkThemeColorListOptions) obj; if (!other.canEqual(this)) { return false; } return true; } } | SubtenantDarkThemeColorListOptions extends ListOptions { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!super.equals(obj)) { return false; } if (!(obj instanceof SubtenantDarkThemeColorListOptions)) { return false; } final SubtenantDarkThemeColorListOptions other = (SubtenantDarkThemeColorListOptions) obj; if (!other.canEqual(this)) { return false; } return true; } @Internal SubtenantDarkThemeColorListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal SubtenantDarkThemeColorListOptions(SubtenantDarkThemeColorListOptions subtenantDarkThemeColorListOptions); SubtenantDarkThemeColorListOptions(); @Internal SubtenantDarkThemeColorListOptions(String after, Filters filter); } | SubtenantDarkThemeColorListOptions extends ListOptions { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!super.equals(obj)) { return false; } if (!(obj instanceof SubtenantDarkThemeColorListOptions)) { return false; } final SubtenantDarkThemeColorListOptions other = (SubtenantDarkThemeColorListOptions) obj; if (!other.canEqual(this)) { return false; } return true; } @Internal SubtenantDarkThemeColorListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal SubtenantDarkThemeColorListOptions(SubtenantDarkThemeColorListOptions subtenantDarkThemeColorListOptions); SubtenantDarkThemeColorListOptions(); @Internal SubtenantDarkThemeColorListOptions(String after, Filters filter); @Override String toString(); @Override SubtenantDarkThemeColorListOptions clone(); @Override boolean equals(Object obj); @Override @SuppressWarnings("PMD.UselessOverridingMethod") int hashCode(); } | SubtenantDarkThemeColorListOptions extends ListOptions { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!super.equals(obj)) { return false; } if (!(obj instanceof SubtenantDarkThemeColorListOptions)) { return false; } final SubtenantDarkThemeColorListOptions other = (SubtenantDarkThemeColorListOptions) obj; if (!other.canEqual(this)) { return false; } return true; } @Internal SubtenantDarkThemeColorListOptions(Integer pageSize, Long maxResults, Order order, String after,
List<IncludeField> include, Filters filter); @Internal SubtenantDarkThemeColorListOptions(SubtenantDarkThemeColorListOptions subtenantDarkThemeColorListOptions); SubtenantDarkThemeColorListOptions(); @Internal SubtenantDarkThemeColorListOptions(String after, Filters filter); @Override String toString(); @Override SubtenantDarkThemeColorListOptions clone(); @Override boolean equals(Object obj); @Override @SuppressWarnings("PMD.UselessOverridingMethod") int hashCode(); } |
@SuppressWarnings("resource") @Test public void testClone() { try { DarkThemeColorListDao darkthemecolorlistdao1 = new DarkThemeColorListDao(); DarkThemeColorListDao darkthemecolorlistdao2 = darkthemecolorlistdao1.clone(); assertNotNull(darkthemecolorlistdao1); assertNotNull(darkthemecolorlistdao2); assertNotSame(darkthemecolorlistdao2, darkthemecolorlistdao1); assertEquals(darkthemecolorlistdao2, darkthemecolorlistdao1); } catch (Exception exception) { fail(exception.getMessage()); } } | @Override @SuppressWarnings({ "resource", "unused" }) public DarkThemeColorListDao clone() { try { return new DarkThemeColorListDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } | DarkThemeColorListDao extends AbstractModelListDao<DarkThemeColor, DarkThemeColorListOptions> implements ModelListDao<DarkThemeColor, DarkThemeColorListOptions> { @Override @SuppressWarnings({ "resource", "unused" }) public DarkThemeColorListDao clone() { try { return new DarkThemeColorListDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } } | DarkThemeColorListDao extends AbstractModelListDao<DarkThemeColor, DarkThemeColorListOptions> implements ModelListDao<DarkThemeColor, DarkThemeColorListOptions> { @Override @SuppressWarnings({ "resource", "unused" }) public DarkThemeColorListDao clone() { try { return new DarkThemeColorListDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } DarkThemeColorListDao(); DarkThemeColorListDao(ApiClientWrapper client); DarkThemeColorListDao(ConnectionOptions options); DarkThemeColorListDao(SdkContext sdkContext); } | DarkThemeColorListDao extends AbstractModelListDao<DarkThemeColor, DarkThemeColorListOptions> implements ModelListDao<DarkThemeColor, DarkThemeColorListOptions> { @Override @SuppressWarnings({ "resource", "unused" }) public DarkThemeColorListDao clone() { try { return new DarkThemeColorListDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } DarkThemeColorListDao(); DarkThemeColorListDao(ApiClientWrapper client); DarkThemeColorListDao(ConnectionOptions options); DarkThemeColorListDao(SdkContext sdkContext); @Override @SuppressWarnings({ "resource", "unused" }) DarkThemeColorListDao clone(); @Override @Internal @SuppressWarnings("unchecked") Class<DarkThemeColorDao> getModelDaoClass(); @Override @Internal @SuppressWarnings({ "unchecked", "resource" }) DarkThemeColorDao getNewModelDao(); } | DarkThemeColorListDao extends AbstractModelListDao<DarkThemeColor, DarkThemeColorListOptions> implements ModelListDao<DarkThemeColor, DarkThemeColorListOptions> { @Override @SuppressWarnings({ "resource", "unused" }) public DarkThemeColorListDao clone() { try { return new DarkThemeColorListDao().configureAndGet(getModuleOrThrow() == null ? null : getModuleOrThrow().clone()); } catch (MbedCloudException exception) { return null; } } DarkThemeColorListDao(); DarkThemeColorListDao(ApiClientWrapper client); DarkThemeColorListDao(ConnectionOptions options); DarkThemeColorListDao(SdkContext sdkContext); @Override @SuppressWarnings({ "resource", "unused" }) DarkThemeColorListDao clone(); @Override @Internal @SuppressWarnings("unchecked") Class<DarkThemeColorDao> getModelDaoClass(); @Override @Internal @SuppressWarnings({ "unchecked", "resource" }) DarkThemeColorDao getNewModelDao(); } |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.