input
stringlengths
28
18.7k
output
stringlengths
39
1.69k
notADirectory ( ) { java . lang . String ufsDirectory = mFileSystem . getStatus ( alluxio . client . fs . CheckConsistencyIntegrationTest . DIRECTORY ) . getUfsPath ( ) ; alluxio . underfs . UnderFileSystem ufs = UnderFileSystem . Factory . create ( ufsDirectory , alluxio . conf . ServerConfiguration . global ( ) ) ; ufs . deleteDirectory ( ufsDirectory , alluxio . underfs . options . DeleteOptions . defaults ( ) . setRecursive ( true ) ) ; ufs . create ( ufsDirectory ) . close ( ) ; java . util . List < alluxio . AlluxioURI > expected = com . google . common . collect . Lists . newArrayList ( alluxio . client . fs . CheckConsistencyIntegrationTest . DIRECTORY , alluxio . client . fs . CheckConsistencyIntegrationTest . FILE ) ; java . util . List < alluxio . AlluxioURI > result = mFileSystemMaster . checkConsistency ( new alluxio . AlluxioURI ( "/" ) , alluxio . master . file . contexts . CheckConsistencyContext . defaults ( ) ) ; java . util . Collections . sort ( expected ) ; java . util . Collections . sort ( result ) ; "<AssertPlaceHolder>" ; } defaults ( ) { return alluxio . master . file . contexts . CheckConsistencyContext . create ( alluxio . util . FileSystemOptions . checkConsistencyDefaults ( alluxio . conf . ServerConfiguration . global ( ) ) . toBuilder ( ) ) ; }
org . junit . Assert . assertEquals ( expected , result )
testAtan2_2 ( ) { org . nd4j . linalg . api . ndarray . INDArray x = org . nd4j . linalg . factory . Nd4j . create ( 10 ) . assign ( 1.0 ) ; org . nd4j . linalg . api . ndarray . INDArray y = org . nd4j . linalg . factory . Nd4j . create ( 10 ) . assign ( 0.0 ) ; org . nd4j . linalg . api . ndarray . INDArray exp = org . nd4j . linalg . factory . Nd4j . create ( 10 ) . assign ( 0.0 ) ; org . nd4j . linalg . api . ndarray . INDArray z = org . nd4j . linalg . ops . transforms . Transforms . atan2 ( x , y ) ; "<AssertPlaceHolder>" ; } atan2 ( org . nd4j . linalg . api . ndarray . INDArray , org . nd4j . linalg . api . ndarray . INDArray ) { return org . nd4j . linalg . factory . Nd4j . getExecutioner ( ) . execAndReturn ( new org . nd4j . linalg . api . ops . impl . transforms . OldAtan2Op ( x , y , org . nd4j . linalg . factory . Nd4j . createUninitialized ( x . shape ( ) , x . ordering ( ) ) ) ) ; }
org . junit . Assert . assertEquals ( exp , z )
shouldGiveVoiceMailNumber ( ) { org . robolectric . Shadows . shadowOf ( telephonyManager ) . setVoiceMailNumber ( "123" ) ; "<AssertPlaceHolder>" ; } getVoiceMailNumber ( ) { return voiceMailNumber ; }
org . junit . Assert . assertEquals ( "123" , telephonyManager . getVoiceMailNumber ( ) )
testFindByPrimaryKeyExisting ( ) { com . liferay . portal . kernel . model . RepositoryEntry newRepositoryEntry = addRepositoryEntry ( ) ; com . liferay . portal . kernel . model . RepositoryEntry existingRepositoryEntry = _persistence . findByPrimaryKey ( newRepositoryEntry . getPrimaryKey ( ) ) ; "<AssertPlaceHolder>" ; } getPrimaryKey ( ) { return _amImageEntryId ; }
org . junit . Assert . assertEquals ( existingRepositoryEntry , newRepositoryEntry )
testAnnotationRemoved ( ) { final org . hyalinedto . test . domainclasses . Person dto = org . hyalinedto . api . Hyaline . dtoFromScratch ( john , new org . hyalinedto . api . DTO ( ) { } ) ; java . lang . reflect . Field field = dto . getClass ( ) . getDeclaredField ( "address" ) ; org . hyalinedto . test . annotations . TestFieldAnnotation annotation = field . getAnnotation ( org . hyalinedto . test . annotations . TestFieldAnnotation . class ) ; "<AssertPlaceHolder>" ; } dtoFromScratch ( org . hyalinedto . api . DTO , java . lang . String ) { return org . hyalinedto . api . Hyaline . dtoFromScratch ( new java . lang . Object ( ) , dtoTemplate , proxyClassName ) ; }
org . junit . Assert . assertEquals ( null , annotation )
getFixedNextInvocationValue_A$int$int$RawCrontabLine ( ) { int arg0 = 0 ; int arg1 = 60 ; com . github . seratch . taskun . scheduler . crond . CrontabElement arg2 = new com . github . seratch . taskun . scheduler . crond . CrontabElement ( "*/3" ) ; int actual = parser . getFixedNextInvocationValue ( arg0 , arg1 , arg2 ) ; int expected = 3 ; "<AssertPlaceHolder>" ; } getFixedNextInvocationValue ( int , int , com . github . seratch . taskun . scheduler . crond . CrontabElement ) { java . lang . String elementValue = element . toString ( ) ; if ( elementValue . matches ( "^\\d+$" ) ) { return java . lang . Integer . valueOf ( elementValue ) ; } else if ( ( elementValue . contains ( "/" ) ) || ( elementValue . matches ( "^[\\d,]+$" ) ) ) { java . util . List < java . lang . Integer > fixedInvocations = getFixedInvocations ( maxValue , element ) ; for ( int fixed : fixedInvocations ) { if ( fixed > currentValue ) { return fixed ; } } return fixedInvocations . get ( 0 ) ; } else { throw new java . lang . IllegalArgumentException ( ( "Invalid<sp>crontab<sp>configuration<sp>value:" + elementValue ) ) ; } }
org . junit . Assert . assertEquals ( expected , actual )
testIsValidSudoku ( ) { java . lang . String [ ] s = new java . lang . String [ ] { ".87654321" , "2........" , "3........" , "4........" , "5........" , "6........" , "7........" , "8........" , "9........" } ; char [ ] [ ] board = getBoard ( s ) ; "<AssertPlaceHolder>" ; } isValidSudoku ( char [ ] [ ] ) { for ( int i = 0 ; i < ( com . pengyifan . leetcode . ValidSudoku . SIZE ) ; i ++ ) { if ( ! ( validRow ( board , i ) ) ) { return false ; } if ( ! ( validCol ( board , i ) ) ) { return false ; } } for ( int i = 0 ; i < ( com . pengyifan . leetcode . ValidSudoku . SIZE ) ; i += 3 ) { for ( int j = 0 ; j < ( com . pengyifan . leetcode . ValidSudoku . SIZE ) ; j += 3 ) { if ( ! ( validSquare ( board , i , j ) ) ) { return false ; } } } return true ; }
org . junit . Assert . assertTrue ( t . isValidSudoku ( board ) )
shouldRejectHostMachines ( ) { cluster . setNumberOfHostMachines ( 2 ) ; org . openstack . atlas . api . validation . results . ValidatorResult result = cTest . validate ( cluster , org . openstack . atlas . api . mgmt . validation . validators . POST ) ; "<AssertPlaceHolder>" ; } resultMessage ( org . openstack . atlas . api . validation . results . ValidatorResult , java . lang . Enum ) { java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; if ( ! ( result . passedValidation ( ) ) ) { java . util . List < org . openstack . atlas . api . validation . results . ExpectationResult > ers = result . getValidationResults ( ) ; sb . append ( java . lang . String . format ( "ON<sp>%s<sp>result.withMessage([" , ctx . toString ( ) ) ) ; for ( org . openstack . atlas . api . validation . results . ExpectationResult er : ers ) { sb . append ( java . lang . String . format ( "%s" , er . getMessage ( ) ) ) ; sb . append ( "])" ) ; } } else { sb . append ( java . lang . String . format ( "On<sp>%s<sp>All<sp>Expectations<sp>PASSED\n" , ctx . toString ( ) ) ) ; } return sb . toString ( ) ; }
org . junit . Assert . assertFalse ( resultMessage ( result , org . openstack . atlas . api . mgmt . validation . validators . POST ) , result . passedValidation ( ) )
testGetActivityItems ( ) { "<AssertPlaceHolder>" ; } getActivityItems ( ) { return javafx . collections . FXCollections . unmodifiableObservableList ( activityItems ) ; }
org . junit . Assert . assertNotNull ( logger . getActivityItems ( ) )
testBatcher ( ) { try { com . marklogic . client . io . DocumentMetadataHandle documentMetadata = new com . marklogic . client . io . DocumentMetadataHandle ( ) ; com . marklogic . client . datamovement . WriteBatcher batcher = moveMgr . newWriteBatcher ( ) . withDefaultMetadata ( documentMetadata ) ; "<AssertPlaceHolder>" ; com . marklogic . client . document . DocumentWriteOperation docWriteImpl = new com . marklogic . client . impl . DocumentWriteOperationImpl ( com . marklogic . client . document . DocumentWriteOperation . OperationType . DOCUMENT_WRITE , "/sample/test/test1.txt" , documentMetadata , new com . marklogic . client . io . StringHandle ( ) . with ( "Test1" ) ) ; com . marklogic . client . document . DocumentWriteOperation docWriteImpl1 = new com . marklogic . client . impl . DocumentWriteOperationImpl ( com . marklogic . client . document . DocumentWriteOperation . OperationType . DOCUMENT_WRITE , "/sample/test/test2.txt" , documentMetadata , new com . marklogic . client . io . StringHandle ( ) . with ( "Test2" ) ) ; java . util . stream . Stream < com . marklogic . client . document . DocumentWriteOperation > docSteam = java . util . stream . Stream . of ( docWriteImpl , docWriteImpl1 ) ; moveMgr . startJob ( batcher ) ; batcher . addAll ( docSteam ) ; batcher . flushAndWait ( ) ; } finally { com . marklogic . client . query . QueryManager queryMgr = client . newQueryManager ( ) ; com . marklogic . client . query . DeleteQueryDefinition deleteDef = queryMgr . newDeleteDefinition ( ) ; deleteDef . setDirectory ( "/sample/test/" ) ; queryMgr . delete ( deleteDef ) ; } } getDocumentMetadata ( ) { return defaultMetadata ; }
org . junit . Assert . assertTrue ( ( ( batcher . getDocumentMetadata ( ) ) == documentMetadata ) )
testGetReportDownloadUrlWithOptions ( ) { com . google . api . ads . admanager . axis . utils . v201808 . ReportDownloader downloader = new com . google . api . ads . admanager . axis . utils . v201808 . ReportDownloader ( reportService , 1 ) ; when ( reportService . getReportJobStatus ( org . mockito . Matchers . anyLong ( ) ) ) . thenReturn ( ReportJobStatus . COMPLETED ) ; when ( reportService . getReportDownloadUrlWithOptions ( org . mockito . Matchers . anyLong ( ) , org . mockito . Matchers . any ( com . google . api . ads . admanager . axis . v201808 . ReportDownloadOptions . class ) ) ) . thenReturn ( "https://www.google.com/" ) ; java . net . URL downloadUrl = downloader . getDownloadUrl ( new com . google . api . ads . admanager . axis . v201808 . ReportDownloadOptions ( ) ) ; "<AssertPlaceHolder>" ; } toString ( ) { return com . google . common . base . MoreObjects . toStringHelper ( this . getClass ( ) ) . omitNullValues ( ) . add ( "currencyCode" , getCurrencyCode ( ) ) . add ( "id" , getId ( ) ) . add ( "name" , getName ( ) ) . add ( "primaryBillingId" , getPrimaryBillingId ( ) ) . add ( "secondaryBillingId" , getSecondaryBillingId ( ) ) . toString ( ) ; }
org . junit . Assert . assertEquals ( "https://www.google.com/" , downloadUrl . toString ( ) )
Test_GlobPatternMatcher_AbsolutePath_InRoot ( ) { java . nio . file . Path root = java . nio . file . Paths . get ( "c:\\temp" ) ; java . nio . file . Path examplePath = java . nio . file . Paths . get ( "c:\\temp\\blabla.sql" ) ; java . lang . String pattern = java . lang . String . format ( "glob:%1$s%2$s%3$s" , root . normalize ( ) . toString ( ) . replace ( '\\' , '/' ) , "/" , "**/*.sql" ) ; java . nio . file . PathMatcher testMatcher = java . nio . file . FileSystems . getDefault ( ) . getPathMatcher ( pattern ) ; "<AssertPlaceHolder>" ; } getPathMatcher ( java . lang . String ) { return java . nio . file . FileSystems . getDefault ( ) . getPathMatcher ( java . lang . String . format ( "glob:%1$s" , pattern ) ) ; }
org . junit . Assert . assertFalse ( testMatcher . matches ( examplePath ) )
test_isQualifierEqual_AnnotationLiteral_nonEmptyQualifier ( ) { org . apache . webbeans . test . util . TestQualifier q1 = new org . apache . webbeans . test . util . TestQualifierAnnotationLiteral ( ) ; org . apache . webbeans . test . util . TestQualifier q2 = new org . apache . webbeans . test . util . TestQualifierAnnotationLiteral ( ) ; "<AssertPlaceHolder>" ; } isCdiAnnotationEqual ( java . lang . annotation . Annotation , java . lang . annotation . Annotation ) { if ( ( annotation1 == null ) && ( annotation2 == null ) ) { return true ; } if ( ( ( annotation1 == null ) && ( annotation2 != null ) ) || ( ( annotation1 != null ) && ( annotation2 == null ) ) ) { return false ; } if ( annotation1 == annotation2 ) { return true ; } java . lang . Class < ? extends java . lang . annotation . Annotation > qualifier1AnnotationType = annotation1 . annotationType ( ) ; if ( ( qualifier1AnnotationType == null ) || ( ! ( qualifier1AnnotationType . equals ( annotation2 . annotationType ( ) ) ) ) ) { return false ; } java . util . List < java . lang . reflect . Method > bindingCdiAnnotationMethods = org . apache . webbeans . util . AnnotationUtil . getBindingCdiAnnotationMethods ( qualifier1AnnotationType ) ; return org . apache . webbeans . util . AnnotationUtil . areParamEquals ( annotation1 , annotation2 , bindingCdiAnnotationMethods ) ; }
org . junit . Assert . assertTrue ( org . apache . webbeans . util . AnnotationUtil . isCdiAnnotationEqual ( q1 , q2 ) )
loadSnapshotAndSave_theResultTreeIdShouldBeTheSame ( ) { writeSomethingToCache ( ) ; org . eclipse . jgit . lib . ObjectId loaded = commit ( ) . getTree ( ) ; org . eclipse . jgit . lib . ObjectId saved = com . beijunyi . parallelgit . utils . io . TreeSnapshot . load ( loaded , repo ) . save ( repo ) ; "<AssertPlaceHolder>" ; } save ( com . beijunyi . parallelgit . utils . io . ObjectInserter ) { return inserter . insert ( com . beijunyi . parallelgit . utils . io . OBJ_BLOB , getData ( ) ) ; }
org . junit . Assert . assertEquals ( loaded , saved )
testSelectOrgUnit ( ) { organizationSelectorDisplayer . filterUpdate ( org . kie . workbench . common . screens . contributors . client . COLUMN_ORG , 0 ) ; org . dashbuilder . dataset . DataSet dataSet = allCommitsDisplayer . getDataSetHandler ( ) . getLastDataSet ( ) ; "<AssertPlaceHolder>" ; } getRowCount ( ) { return delegate . getRowCount ( ) ; }
org . junit . Assert . assertEquals ( dataSet . getRowCount ( ) , 1 )
testEqualityWithAnotherActionType ( ) { edu . harvard . iq . dataverse . actionlogging . ActionLogRecord record = new edu . harvard . iq . dataverse . actionlogging . ActionLogRecord ( ) ; record . setStartTime ( this . referenceRecord . getStartTime ( ) ) ; record . setEndTime ( this . referenceRecord . getEndTime ( ) ) ; record . setActionResult ( this . referenceRecord . getActionResult ( ) ) ; record . setUserIdentifier ( this . referenceRecord . getUserIdentifier ( ) ) ; record . setActionType ( ActionType . BuiltinUser ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ! ( object instanceof edu . harvard . iq . dataverse . makedatacount . DatasetExternalCitations ) ) { return false ; } edu . harvard . iq . dataverse . makedatacount . DatasetExternalCitations other = ( ( edu . harvard . iq . dataverse . makedatacount . DatasetExternalCitations ) ( object ) ) ; if ( ( ( ( this . id ) == null ) && ( ( other . id ) != null ) ) || ( ( ( this . id ) != null ) && ( ! ( this . id . equals ( other . id ) ) ) ) ) { return false ; } return true ; }
org . junit . Assert . assertFalse ( this . referenceRecord . equals ( record ) )
testLength ( ) { java . lang . Object [ ] expected = new java . lang . Object [ ] { 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 } ; java . lang . Object [ ] actual = result . stream ( ) . map ( Token :: getLength ) . toArray ( ) ; "<AssertPlaceHolder>" ; } stream ( ) { return java . util . stream . StreamSupport . stream ( java . util . Spliterators . spliteratorUnknownSize ( iterator ( ) , ( ( java . util . Spliterator . DISTINCT ) | ( java . util . Spliterator . NONNULL ) ) ) , false ) ; }
org . junit . Assert . assertArrayEquals ( expected , actual )
test_hour_shouldReturnHourBetween0and11_whenTimeBetween0and11 ( ) { java . util . Calendar calendar = org . openl . util . DateToolTest . createCalendar ( 15 , 6 , 2018 ) ; for ( int hour = 0 ; hour < 12 ; hour ++ ) { calendar . set ( Calendar . HOUR_OF_DAY , hour ) ; int actual = org . openl . util . DateTool . hour ( calendar . getTime ( ) ) ; "<AssertPlaceHolder>" ; } } hour ( java . util . Date ) { if ( d == null ) { return null ; } java . util . Calendar c = java . util . Calendar . getInstance ( ) ; c . setTime ( d ) ; return c . get ( Calendar . HOUR ) ; }
org . junit . Assert . assertEquals ( hour , actual )
testRemove ( ) { com . liferay . portal . kernel . model . RepositoryEntry newRepositoryEntry = addRepositoryEntry ( ) ; _persistence . remove ( newRepositoryEntry ) ; com . liferay . portal . kernel . model . RepositoryEntry existingRepositoryEntry = _persistence . fetchByPrimaryKey ( newRepositoryEntry . getPrimaryKey ( ) ) ; "<AssertPlaceHolder>" ; } getPrimaryKey ( ) { return _amImageEntryId ; }
org . junit . Assert . assertNull ( existingRepositoryEntry )
testNoOverflow ( ) { brown . tracingplane . baggageprotocol . BaggageReader reader = makeBaggage ( ) ; for ( int i = 0 ; i < ( payloads . length ) ; i ++ ) { reader . nextData ( ) ; } "<AssertPlaceHolder>" ; } overflowAtoms ( ) { finish ( ) ; return overflowAtoms ; }
org . junit . Assert . assertNull ( reader . overflowAtoms ( ) )
shouldNotCacheTheSameFile ( ) { java . io . File cachedFile = cacheFile ( ) ; cachedFile . setLastModified ( com . threerings . getdown . cache . ResourceCacheTest . YESTERDAY ) ; long expectedLastModified = cachedFile . lastModified ( ) ; java . io . File sameCachedFile = cacheFile ( ) ; "<AssertPlaceHolder>" ; } cacheFile ( ) { return _cache . cacheFile ( _fileToCache , "abc123" , "abc123" ) ; }
org . junit . Assert . assertEquals ( expectedLastModified , sameCachedFile . lastModified ( ) )
testCount ( ) { java . lang . String sqlText = java . lang . String . format ( ( "count(salary)<sp>over<sp>(Partition<sp>by<sp>dept)<sp>as<sp>c<sp>from<sp>%s<sp>--SPLICE-PROPERTIES<sp>useSpark<sp>=<sp>%s<sp>\n<sp>order<sp>by<sp>dept,<sp>empnum" 2 + "count(salary)<sp>over<sp>(Partition<sp>by<sp>dept)<sp>as<sp>c<sp>from<sp>%s<sp>--SPLICE-PROPERTIES<sp>useSpark<sp>=<sp>%s<sp>\n<sp>order<sp>by<sp>dept,<sp>empnum" ) , this . getTableReference ( com . splicemachine . derby . impl . sql . execute . operations . WindowFunctionIT . EMPTAB ) , useSpark ) ; java . sql . ResultSet rs = com . splicemachine . derby . impl . sql . execute . operations . WindowFunctionIT . methodWatcher . executeQuery ( sqlText ) ; java . lang . String expected = "count(salary)<sp>over<sp>(Partition<sp>by<sp>dept)<sp>as<sp>c<sp>from<sp>%s<sp>--SPLICE-PROPERTIES<sp>useSpark<sp>=<sp>%s<sp>\n<sp>order<sp>by<sp>dept,<sp>empnum" 6 + ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "count(salary)<sp>over<sp>(Partition<sp>by<sp>dept)<sp>as<sp>c<sp>from<sp>%s<sp>--SPLICE-PROPERTIES<sp>useSpark<sp>=<sp>%s<sp>\n<sp>order<sp>by<sp>dept,<sp>empnum" 8 + "<sp>10<sp>|<sp>1<sp>|<sp>50000<sp>|<sp>7<sp>|\n" ) + "<sp>20<sp>|<sp>1<sp>|<sp>75000<sp>|<sp>7<sp>|\n" ) + "count(salary)<sp>over<sp>(Partition<sp>by<sp>dept)<sp>as<sp>c<sp>from<sp>%s<sp>--SPLICE-PROPERTIES<sp>useSpark<sp>=<sp>%s<sp>\n<sp>order<sp>by<sp>dept,<sp>empnum" 4 ) + "count(salary)<sp>over<sp>(Partition<sp>by<sp>dept)<sp>as<sp>c<sp>from<sp>%s<sp>--SPLICE-PROPERTIES<sp>useSpark<sp>=<sp>%s<sp>\n<sp>order<sp>by<sp>dept,<sp>empnum" 0 ) + "count(salary)<sp>over<sp>(Partition<sp>by<sp>dept)<sp>as<sp>c<sp>from<sp>%s<sp>--SPLICE-PROPERTIES<sp>useSpark<sp>=<sp>%s<sp>\n<sp>order<sp>by<sp>dept,<sp>empnum" 9 ) + "count(salary)<sp>over<sp>(Partition<sp>by<sp>dept)<sp>as<sp>c<sp>from<sp>%s<sp>--SPLICE-PROPERTIES<sp>useSpark<sp>=<sp>%s<sp>\n<sp>order<sp>by<sp>dept,<sp>empnum" 5 ) + "<sp>110<sp>|<sp>1<sp>|<sp>53000<sp>|<sp>7<sp>|\n" ) + "<sp>40<sp>|<sp>2<sp>|<sp>52000<sp>|<sp>4<sp>|\n" ) + "<sp>44<sp>|<sp>2<sp>|<sp>52000<sp>|<sp>4<sp>|\n" ) + "count(salary)<sp>over<sp>(Partition<sp>by<sp>dept)<sp>as<sp>c<sp>from<sp>%s<sp>--SPLICE-PROPERTIES<sp>useSpark<sp>=<sp>%s<sp>\n<sp>order<sp>by<sp>dept,<sp>empnum" 3 ) + "<sp>90<sp>|<sp>2<sp>|<sp>51000<sp>|<sp>4<sp>|\n" ) + "<sp>30<sp>|<sp>3<sp>|<sp>84000<sp>|<sp>4<sp>|\n" ) + "<sp>80<sp>|<sp>3<sp>|<sp>79000<sp>|<sp>4<sp>|\n" ) + "<sp>100<sp>|<sp>3<sp>|<sp>55000<sp>|<sp>4<sp>|\n" ) + "count(salary)<sp>over<sp>(Partition<sp>by<sp>dept)<sp>as<sp>c<sp>from<sp>%s<sp>--SPLICE-PROPERTIES<sp>useSpark<sp>=<sp>%s<sp>\n<sp>order<sp>by<sp>dept,<sp>empnum" 1 ) ; "<AssertPlaceHolder>" ; rs . close ( ) ; } toStringUnsorted ( com . splicemachine . homeless . ResultSet ) { return com . splicemachine . homeless . TestUtils . FormattedResult . ResultFactory . convert ( "" , rs , false ) . toString ( ) . trim ( ) ; }
org . junit . Assert . assertEquals ( ( ( "count(salary)<sp>over<sp>(Partition<sp>by<sp>dept)<sp>as<sp>c<sp>from<sp>%s<sp>--SPLICE-PROPERTIES<sp>useSpark<sp>=<sp>%s<sp>\n<sp>order<sp>by<sp>dept,<sp>empnum" 7 + sqlText ) + "count(salary)<sp>over<sp>(Partition<sp>by<sp>dept)<sp>as<sp>c<sp>from<sp>%s<sp>--SPLICE-PROPERTIES<sp>useSpark<sp>=<sp>%s<sp>\n<sp>order<sp>by<sp>dept,<sp>empnum" 7 ) , expected , TestUtils . FormattedResult . ResultFactory . toStringUnsorted ( rs ) )
testFindInObjectLiteralDefault ( ) { java . lang . String input = "a<sp>=<sp>{<sp>\"foo\"<sp>:<sp>{},<sp>\"default\"<sp>:<sp>{}<sp>}" ; org . eclipse . rap . clientbuilder . TokenList tokens = org . eclipse . rap . clientbuilder . TestUtil . parse ( input ) ; int startSelectedExpr = tokens . findInObjectLiteral ( "bar" , 2 ) ; "<AssertPlaceHolder>" ; } findInObjectLiteral ( java . lang . String , int ) { if ( ! ( org . eclipse . rap . clientbuilder . TokenList . TokenMatcher . LEFT_BRACE . matches ( getToken ( offset ) ) ) ) { throw new java . lang . IllegalArgumentException ( ( "Not<sp>an<sp>object<sp>literal<sp>at<sp>pos<sp>" + offset ) ) ; } int result = - 1 ; int closingBrace = findClosing ( offset ) ; if ( closingBrace == ( - 1 ) ) { throw new java . lang . IllegalArgumentException ( ( "No<sp>closing<sp>brace<sp>found<sp>for<sp>pos<sp>" + offset ) ) ; } int pos = offset + 1 ; org . eclipse . rap . clientbuilder . TokenList . TokenMatcher keyStringMatcher = org . eclipse . rap . clientbuilder . TokenList . TokenMatcher . string ( ) ; org . eclipse . rap . clientbuilder . TokenList . TokenMatcher keyNameMatcher = org . eclipse . rap . clientbuilder . TokenList . TokenMatcher . name ( ) ; while ( pos < ( closingBrace - 2 ) ) { com . yahoo . platform . yui . compressor . JavaScriptToken token = getToken ( pos ) ; if ( ( keyStringMatcher . matches ( token ) ) || ( keyNameMatcher . matches ( token ) ) ) { if ( ( ( ( key . equals ( keyStringMatcher . matchedValue ) ) || ( key . equals ( keyNameMatcher . matchedValue ) ) ) || ( "default" . equals ( keyStringMatcher . matchedValue ) ) ) || ( "default" . equals ( keyNameMatcher . matchedValue ) ) ) { if ( org . eclipse . rap . clientbuilder . TokenList . TokenMatcher . OBJECTLIT . matches ( getToken ( ( pos + 1 ) ) ) ) { result = pos + 2 ; } } } pos ++ ; } return result ; }
org . junit . Assert . assertEquals ( 10 , startSelectedExpr )
testGetEmptyWrapperJar ( ) { System . out . println ( "getWrapperJar" ) ; com . espirit . moddev . cli . commands . server . ServerStartCommand instance = createTestling ( ) ; java . lang . String result = instance . getWrapperJar ( ) ; "<AssertPlaceHolder>" ; } getWrapperJar ( ) { return wrapperJar ; }
org . junit . Assert . assertNull ( result )
createBoundingRectangleFromQuadPointsTest02 ( ) { float [ ] points = new float [ ] { 0 , 0 , 2 , 1 , 1 , 2 , - 2 , 1 , 0 } ; com . itextpdf . kernel . pdf . PdfArray quadpoints = new com . itextpdf . kernel . pdf . PdfArray ( points ) ; boolean exception = false ; try { com . itextpdf . kernel . geom . Rectangle . createBoundingRectangleFromQuadPoint ( quadpoints ) ; } catch ( com . itextpdf . kernel . PdfException e ) { exception = true ; } "<AssertPlaceHolder>" ; } createBoundingRectangleFromQuadPoint ( com . itextpdf . kernel . pdf . PdfArray ) { if ( ( ( quadPoints . size ( ) ) % 8 ) != 0 ) { throw new com . itextpdf . kernel . PdfException ( com . itextpdf . kernel . PdfException . QuadPointArrayLengthIsNotAMultipleOfEight ) ; } float llx = Float . MAX_VALUE ; float lly = Float . MAX_VALUE ; float urx = - ( Float . MAX_VALUE ) ; float ury = - ( Float . MAX_VALUE ) ; for ( int j = 0 ; j < 8 ; j += 2 ) { float x = quadPoints . getAsNumber ( j ) . floatValue ( ) ; float y = quadPoints . getAsNumber ( ( j + 1 ) ) . floatValue ( ) ; if ( x < llx ) llx = x ; if ( x > urx ) urx = x ; if ( y < lly ) lly = y ; if ( y > ury ) ury = y ; } return new com . itextpdf . kernel . geom . Rectangle ( llx , lly , ( urx - llx ) , ( ury - lly ) ) ; }
org . junit . Assert . assertTrue ( exception )
testRewriteRTxt ( ) { org . junit . Assume . assumeTrue ( ( ( com . facebook . buck . util . environment . Platform . detect ( ) ) != ( com . facebook . buck . util . environment . Platform . WINDOWS ) ) ) ; java . nio . file . Path inputRTxt = tmpFolder . getRoot ( ) . resolve ( "input.R.txt" ) ; java . lang . String rtxtContent = "int<sp>styleable<sp>ActionMode_backgroundSplit<sp>4\n" 0 + ( ( ( ( ( ( ( "int<sp>styleable<sp>ActionMode_backgroundSplit<sp>4\n" 3 + "int[]<sp>styleable<sp>ActionMode<sp>{<sp>0x7f010000,<sp>0x7f01005a,<sp>0x7f01005b,<sp>0x7f01005e,<sp>0x7f010060,<sp>0x7f01006e<sp>}\n" ) + "int<sp>styleable<sp>ActionMode_backgroundSplit<sp>4\n" 2 ) + "int<sp>styleable<sp>ActionMode_backgroundSplit<sp>4\n" ) + "int<sp>styleable<sp>ActionMode_closeItemLayout<sp>5\n" ) + "int<sp>styleable<sp>ActionMode_backgroundSplit<sp>4\n" 4 ) + "int<sp>styleable<sp>ActionMode_backgroundSplit<sp>4\n" 5 ) + "int<sp>styleable<sp>ActionMode_titleTextStyle<sp>1\n" ) ; java . lang . String expectedOutput = "int<sp>style<sp>Widget_AppCompat_Light_PopupMenu<sp>0x7f0b0001\n" + ( ( ( ( ( ( ( "int<sp>styleable<sp>ActionMode_backgroundSplit<sp>4\n" 3 + "int[]<sp>styleable<sp>ActionMode<sp>{<sp>0x7f010000,<sp>0x7f010001,<sp>0x7f010002,<sp>0x7f01005a,<sp>0x7f01005e,<sp>0x7f01006e<sp>}\n" ) + "int<sp>styleable<sp>ActionMode_background<sp>4\n" ) + "int<sp>styleable<sp>ActionMode_backgroundSplit<sp>1\n" ) + "int<sp>styleable<sp>ActionMode_closeItemLayout<sp>5\n" ) + "int<sp>styleable<sp>ActionMode_backgroundSplit<sp>4\n" 4 ) + "int<sp>styleable<sp>ActionMode_backgroundSplit<sp>4\n" 5 ) + "int<sp>styleable<sp>ActionMode_backgroundSplit<sp>4\n" 1 ) ; filesystem . writeContentsToPath ( rtxtContent , inputRTxt ) ; java . nio . file . Path outputRTxt = tmpFolder . getRoot ( ) . resolve ( "output.R.txt" ) ; com . facebook . buck . android . resources . ExoResourcesRewriter . rewriteRDotTxt ( new com . facebook . buck . android . resources . ReferenceMapper ( ) { @ com . facebook . buck . android . resources . Override public int map ( int id ) { switch ( id ) { case 2131427365 : return 2131427329 ; case 2130772059 : return 2130771970 ; case 2130772064 : return 2130771969 ; } return id ; } @ com . facebook . buck . android . resources . Override public void rewrite ( int type , java . nio . IntBuffer buf ) { throw new java . lang . UnsupportedOperationException ( ) ; } } , inputRTxt , outputRTxt ) ; "<AssertPlaceHolder>" ; } readFileIfItExists ( java . nio . file . Path ) { if ( ! ( exists ( path ) ) ) { return java . util . Optional . empty ( ) ; } return java . util . Optional . of ( new java . lang . String ( getFileBytes ( path ) , com . google . common . base . Charsets . UTF_8 ) ) ; }
org . junit . Assert . assertEquals ( expectedOutput , filesystem . readFileIfItExists ( outputRTxt ) . get ( ) )
testSanitizerGoodStyle ( ) { java . lang . String input = "<p<sp>style=\"text-decoration:<sp>line-through;padding-left:<sp>20.0px;\">content</p>" ; "<AssertPlaceHolder>" ; } sanitize ( java . lang . String ) { return com . github . bordertech . wcomponents . util . HtmlSanitizerUtil . sanitize ( input , false ) ; }
org . junit . Assert . assertEquals ( input , com . github . bordertech . wcomponents . util . HtmlSanitizerUtil . sanitize ( input ) )
shouldReturnSameResultWithPyhtonImplementation ( ) { java . lang . String clientSecret = "5f395ee5acae448bbbcf01a251c480f6" ; java . lang . String jsonResponse = "[{\"subscription_id\":\"1\",\"object\":\"user\",\"object_id\":\"1234\",\"changed_aspect\":\"media\",\"time\":1297286541},{\"subscription_id\":\"2\",\"object\":\"tag\",\"object_id\":\"nofilter\",\"changed_aspect\":\"media\",\"time\":1297286541}]" ; java . lang . String xHubSignature = "53a41d80a55a9265fc72633d432e22e6dc05fd64" ; org . jinstagram . realtime . SubscriptionUtil . VerificationResult result = org . jinstagram . realtime . SubscriptionUtil . verifySubscriptionPostRequestSignature ( clientSecret , jsonResponse . getBytes ( java . nio . charset . Charset . forName ( "UTF-8" ) ) , xHubSignature ) ; "<AssertPlaceHolder>" ; } isSuccess ( ) { return success ; }
org . junit . Assert . assertTrue ( result . isSuccess ( ) )
testMarkingWorks ( ) { final java . io . File temp = java . io . File . createTempFile ( "temp-file-name" , ".tmp" ) ; final org . apache . commons . vfs2 . FileSystemManager fileSystemManager = org . apache . commons . vfs2 . VFS . getManager ( ) ; try ( org . apache . commons . vfs2 . FileObject file = fileSystemManager . resolveFile ( temp . getAbsolutePath ( ) ) ) { try ( java . io . OutputStream outputStream = file . getContent ( ) . getOutputStream ( ) ) { outputStream . write ( org . apache . commons . vfs2 . provider . DefaultFileContentTest . expected . getBytes ( ) ) ; outputStream . flush ( ) ; } try ( java . io . InputStream stream = file . getContent ( ) . getInputStream ( ) ) { if ( stream . markSupported ( ) ) { for ( int i = 0 ; i < 10 ; i ++ ) { stream . mark ( 0 ) ; final byte [ ] data = new byte [ 100 ] ; stream . read ( data , 0 , 7 ) ; "<AssertPlaceHolder>" ; stream . reset ( ) ; } } } } } read ( byte [ ] , int , int ) { int retLen = - 1 ; final int left = getLeftBytes ( ) ; if ( left > 0 ) { retLen = java . lang . Math . min ( len , left ) ; this . readFully ( b , off , retLen ) ; } return retLen ; }
org . junit . Assert . assertEquals ( org . apache . commons . vfs2 . provider . DefaultFileContentTest . expected , new java . lang . String ( data ) . trim ( ) )
testXPathHelperWithNamespaceTextPath ( ) { try { java . lang . String xmlString = getFileContentsAsString ( ( ( ddf . catalog . impl . XPathHelperTest . TEST_DATA_PATH ) + ( ddf . catalog . impl . XPathHelperTest . INPUT_FILE ) ) ) ; ddf . util . XPathHelper xHelper = new ddf . util . XPathHelper ( xmlString ) ; org . w3c . dom . NodeList nodeList = ( ( org . w3c . dom . NodeList ) ( xHelper . evaluate ( "//abc:fileTitle" , XPathConstants . NODESET , new ddf . catalog . impl . MockNamespaceResolver ( ) ) ) ) ; ddf . catalog . impl . XPathHelperTest . LOGGER . debug ( "testXPathHelper_WithNamespaceTextPath()<sp>-<sp>nodeList<sp>length<sp>=<sp>{}" , nodeList . getLength ( ) ) ; "<AssertPlaceHolder>" ; } catch ( java . lang . Exception e1 ) { ddf . catalog . impl . XPathHelperTest . LOGGER . error ( "Exception<sp>thrown<sp>during<sp>testXPathHelper_WithNamespaceTextPath" , e1 ) ; } } getLength ( ) { return length ; }
org . junit . Assert . assertEquals ( 1 , nodeList . getLength ( ) )
testEncryptDecryptStream ( ) { final byte [ ] plainBytes = new byte [ ( ddf . security . encryption . crypter . Crypter . CHUNK_SIZE ) * 3 ] ; new java . security . SecureRandom ( ) . nextBytes ( plainBytes ) ; final java . io . InputStream plainInputStream = new java . io . ByteArrayInputStream ( plainBytes ) ; final ddf . security . encryption . crypter . Crypter crypter = new ddf . security . encryption . crypter . Crypter ( ) ; final java . io . InputStream encryptedInputStream = crypter . encrypt ( plainInputStream ) ; final java . io . InputStream decryptedInputStream = crypter . decrypt ( encryptedInputStream ) ; final byte [ ] decryptedBytes = com . google . common . io . ByteStreams . toByteArray ( decryptedInputStream ) ; "<AssertPlaceHolder>" ; } decrypt ( byte [ ] ) { if ( ( encryptedBytes == null ) || ( ( encryptedBytes . length ) < 1 ) ) { throw new ddf . security . encryption . crypter . Crypter . CrypterException ( "Bytes<sp>to<sp>decrypt<sp>cannot<sp>be<sp>null<sp>or<sp>empty." ) ; } if ( ( associatedData ) == null ) { throw new ddf . security . encryption . crypter . Crypter . CrypterException ( "Associated<sp>data<sp>cannot<sp>be<sp>null." ) ; } try { return aead . decrypt ( encryptedBytes , associatedData ) ; } catch ( java . security . GeneralSecurityException | java . lang . NullPointerException e ) { throw new ddf . security . encryption . crypter . Crypter . CrypterException ( "Problem<sp>decrypting." , e ) ; } }
org . junit . Assert . assertArrayEquals ( plainBytes , decryptedBytes )
lookUpEndpointTest ( ) { names . clear ( ) ; names . add ( org . talend . esb . locator . service . rest . LocatorRestServiceTest . ENDPOINTURL ) ; expect ( sl . lookup ( org . talend . esb . locator . service . rest . LocatorRestServiceTest . SERVICE_NAME ) ) . andStubReturn ( names ) ; expect ( sl . getEndpoint ( org . talend . esb . locator . service . rest . LocatorRestServiceTest . SERVICE_NAME , org . talend . esb . locator . service . rest . LocatorRestServiceTest . ENDPOINTURL ) ) . andStubReturn ( endpoint ) ; expect ( endpoint . getProperties ( ) ) . andStubReturn ( SLPropertiesImpl . EMPTY_PROPERTIES ) ; replayAll ( ) ; javax . xml . ws . wsaddressing . W3CEndpointReference endpointRef ; javax . xml . ws . wsaddressing . W3CEndpointReference expectedRef ; javax . xml . ws . wsaddressing . W3CEndpointReferenceBuilder builder = new javax . xml . ws . wsaddressing . W3CEndpointReferenceBuilder ( ) ; builder . address ( org . talend . esb . locator . service . rest . LocatorRestServiceTest . ENDPOINTURL ) ; expectedRef = builder . build ( ) ; endpointRef = lps . lookupEndpoint ( org . talend . esb . locator . service . rest . LocatorRestServiceTest . SERVICE_NAME . toString ( ) , new java . util . ArrayList < java . lang . String > ( ) ) ; "<AssertPlaceHolder>" ; } toString ( ) { if ( ( ( ( ( variant ) == null ) || ( variant . isEmpty ( ) ) ) || ( ( destinationName ) == null ) ) || ( destinationName . isEmpty ( ) ) ) { return "jms://" ; } final java . lang . StringBuilder buf = new java . lang . StringBuilder ( "jms:" ) ; buf . append ( variant ) . append ( ':' ) . append ( encode ( destinationName ) ) ; if ( ! ( parameters . isEmpty ( ) ) ) { buf . append ( '?' ) ; boolean addDelimiter = false ; for ( java . util . Map . Entry < java . lang . String , java . lang . String > param : parameters . entrySet ( ) ) { if ( addDelimiter ) { buf . append ( '&' ) ; } else { addDelimiter = true ; } buf . append ( encode ( param . getKey ( ) ) ) ; final java . lang . String value = param . getValue ( ) ; if ( ( value != null ) && ( ( value . length ( ) ) > 0 ) ) { buf . append ( '=' ) . append ( encode ( value ) ) ; } } } return buf . toString ( ) ; }
org . junit . Assert . assertTrue ( endpointRef . toString ( ) . equals ( expectedRef . toString ( ) ) )
shouldCacheSmallSetOfLabelsPerNode ( ) { org . neo4j . unsafe . impl . batchimport . cache . NodeLabelsCache cache = new org . neo4j . unsafe . impl . batchimport . cache . NodeLabelsCache ( NumberArrayFactory . AUTO_WITHOUT_PAGECACHE , 5 , org . neo4j . unsafe . impl . batchimport . cache . NodeLabelsCacheTest . CHUNK_SIZE ) ; org . neo4j . unsafe . impl . batchimport . cache . NodeLabelsCache . Client client = cache . newClient ( ) ; long nodeId = 0 ; cache . put ( nodeId , new long [ ] { 1 , 2 , 3 } ) ; int [ ] readLabels = new int [ 3 ] ; cache . get ( client , nodeId , readLabels ) ; "<AssertPlaceHolder>" ; } get ( org . neo4j . unsafe . impl . batchimport . cache . NodeLabelsCache$Client , long , int [ ] ) { client . fieldBits . clear ( false ) ; client . fieldScratch [ 0 ] = cache . get ( nodeId ) ; if ( ( client . fieldScratch [ 0 ] ) == 0 ) { target [ 0 ] = - 1 ; return target ; } int length = client . fieldBits . getInt ( bitsPerLabel ) ; int longsInUse = ( ( ( ( bitsPerLabel ) * ( length + 1 ) ) - 1 ) / ( Long . SIZE ) ) + 1 ; target = org . neo4j . unsafe . impl . batchimport . cache . NodeLabelsCache . ensureCapacity ( target , length ) ; if ( longsInUse == 1 ) { decode ( client . fieldBits , length , target ) ; } else { long spillOverIndex = client . fieldBits . getLong ( ( ( Long . SIZE ) - ( bitsPerLabel ) ) ) ; client . labelBits . clear ( false ) ; for ( int i = 0 ; i < longsInUse ; i ++ ) { client . labelScratch [ i ] = spillOver . get ( ( spillOverIndex + i ) ) ; } client . labelBits . getInt ( bitsPerLabel ) ; decode ( client . labelBits , length , target ) ; } return target ; }
org . junit . Assert . assertArrayEquals ( new int [ ] { 1 , 2 , 3 } , readLabels )
testEventWithOneStatementWithOneListener ( ) { org . opencredo . esper . EsperStatement statement = addTestStatement ( ) ; org . opencredo . esper . sample . CallRecordingListener listener = this . addListenerToStatement ( statement ) ; template . addStatement ( statement ) ; setupTemplateAndSendSampleEvent ( ) ; "<AssertPlaceHolder>" ; } getNumberOfTimesInvoked ( ) { return numberOfTimesInvoked ; }
org . junit . Assert . assertEquals ( 1 , listener . getNumberOfTimesInvoked ( ) )
testCopyToWriterWithBuf ( ) { org . eclipse . jgit . lfs . lib . AnyLongObjectId id1 = org . eclipse . jgit . lfs . test . LongObjectIdTestUtils . hash ( "test" ) ; java . io . ByteArrayOutputStream os = new java . io . ByteArrayOutputStream ( 64 ) ; java . io . OutputStreamWriter w = new java . io . OutputStreamWriter ( os , org . eclipse . jgit . lib . Constants . CHARSET ) ; char [ ] buf = new char [ 64 ] ; id1 . copyTo ( buf , w ) ; w . close ( ) ; "<AssertPlaceHolder>" ; } fromString ( byte [ ] , int ) { return org . eclipse . jgit . lfs . lib . LongObjectId . fromHexString ( buf , offset ) ; }
org . junit . Assert . assertEquals ( id1 , org . eclipse . jgit . lfs . lib . LongObjectId . fromString ( os . toByteArray ( ) , 0 ) )
shouldNotPollWhenAllGroupEmpty ( ) { org . openkilda . wfm . topology . flow . transactions . FlowCommandRegistry registry = new org . openkilda . wfm . topology . flow . transactions . FlowCommandRegistry ( ) ; registerBatchWith2Groups ( registry ) ; registry . pollNextGroup ( org . openkilda . wfm . topology . flow . transactions . FlowCommandRegistryTest . TEST_FLOW ) ; registry . removeCommand ( org . openkilda . wfm . topology . flow . transactions . FlowCommandRegistryTest . TEST_FLOW , org . openkilda . wfm . topology . flow . transactions . FlowCommandRegistryTest . FLOW_COMMAND_1 . getTransactionId ( ) ) ; registry . pollNextGroup ( org . openkilda . wfm . topology . flow . transactions . FlowCommandRegistryTest . TEST_FLOW ) ; registry . removeCommand ( org . openkilda . wfm . topology . flow . transactions . FlowCommandRegistryTest . TEST_FLOW , org . openkilda . wfm . topology . flow . transactions . FlowCommandRegistryTest . FLOW_COMMAND_2 . getTransactionId ( ) ) ; java . util . List < org . openkilda . messaging . command . CommandData > currentGroup = registry . pollNextGroup ( org . openkilda . wfm . topology . flow . transactions . FlowCommandRegistryTest . TEST_FLOW ) ; "<AssertPlaceHolder>" ; } empty ( ) { org . openkilda . wfm . topology . nbworker . services . ValidationService validationService = new org . openkilda . wfm . topology . nbworker . services . ValidationService ( repositoryFactory ( ) . build ( ) ) ; org . openkilda . messaging . info . switches . SyncRulesResponse response = validationService . validate ( generateSwitchFlowEntries ( ) ) ; org . junit . Assert . assertTrue ( response . getMissingRules ( ) . isEmpty ( ) ) ; org . junit . Assert . assertTrue ( response . getProperRules ( ) . isEmpty ( ) ) ; org . junit . Assert . assertTrue ( response . getExcessRules ( ) . isEmpty ( ) ) ; }
org . junit . Assert . assertThat ( currentGroup , org . hamcrest . Matchers . empty ( ) )
serializationGetProfile ( ) { org . digidoc4j . impl . bdoc . Container container = this . createEmptyContainerBy ( Container . DocumentType . BDOC ) ; container . addDataFile ( "src/test/resources/testFiles/helper-files/test.txt" , "text/plain" ) ; this . createSignatureBy ( container , this . pkcs12SignatureToken ) ; this . serialize ( container , this . serializedContainerLocation ) ; org . digidoc4j . impl . bdoc . Container deserializedContainer = this . deserializer ( this . serializedContainerLocation ) ; org . digidoc4j . impl . bdoc . SignatureProfile signatureProfileBeforeSerialization = container . getSignatures ( ) . get ( 0 ) . getProfile ( ) ; org . digidoc4j . impl . bdoc . SignatureProfile signatureProfileAfterSerialization = deserializedContainer . getSignatures ( ) . get ( 0 ) . getProfile ( ) ; "<AssertPlaceHolder>" ; } getProfile ( ) { return null ; }
org . junit . Assert . assertEquals ( signatureProfileBeforeSerialization , signatureProfileAfterSerialization )
shouldComapareDigitsOnlyIdentifiersNumerically ( ) { com . github . zafarkhaja . semver . MetadataVersion v1 = new com . github . zafarkhaja . semver . MetadataVersion ( new java . lang . String [ ] { "alpha" , "123" } ) ; com . github . zafarkhaja . semver . MetadataVersion v2 = new com . github . zafarkhaja . semver . MetadataVersion ( new java . lang . String [ ] { "alpha" , "321" } ) ; "<AssertPlaceHolder>" ; } compareTo ( com . github . zafarkhaja . semver . Version ) { int result = normal . compareTo ( other . normal ) ; if ( result == 0 ) { result = preRelease . compareTo ( other . preRelease ) ; } return result ; }
org . junit . Assert . assertTrue ( ( 0 > ( v1 . compareTo ( v2 ) ) ) )
testVerifyWithInvalidKeyStoreChooserFails ( ) { java . lang . String signature = signer . sign ( com . springcryptoutils . core . signature . Base64EncodedSignerAndVerifierWithChoosersByAliasImplTest . keyStoreChooser , com . springcryptoutils . core . signature . Base64EncodedSignerAndVerifierWithChoosersByAliasImplTest . privateKeyChooserByAlias , message ) ; "<AssertPlaceHolder>" ; verifier . verify ( com . springcryptoutils . core . signature . Base64EncodedSignerAndVerifierWithChoosersByAliasImplTest . badKeyStoreChooser , com . springcryptoutils . core . signature . Base64EncodedSignerAndVerifierWithChoosersByAliasImplTest . badPublicKeyChooserByAlias , message , signature ) ; } sign ( com . springcryptoutils . core . keystore . KeyStoreChooser , com . springcryptoutils . core . key . PrivateKeyChooserByAlias , byte [ ] ) { com . springcryptoutils . core . signature . Signer signer = cache . get ( com . springcryptoutils . core . signature . SignerWithChoosersByAliasImpl . cacheKey ( keyStoreChooser , privateKeyChooserByAlias ) ) ; if ( signer != null ) { return signer . sign ( message ) ; } com . springcryptoutils . core . signature . SignerImpl signerImpl = new com . springcryptoutils . core . signature . SignerImpl ( ) ; signerImpl . setAlgorithm ( algorithm ) ; signerImpl . setProvider ( provider ) ; java . security . PrivateKey privateKey = privateKeyRegistryByAlias . get ( keyStoreChooser , privateKeyChooserByAlias ) ; if ( privateKey == null ) { throw new com . springcryptoutils . core . signature . SignatureException ( ( ( ( "private<sp>key<sp>not<sp>found<sp>in<sp>registry:<sp>keyStoreName=" + ( keyStoreChooser . getKeyStoreName ( ) ) ) + ",<sp>alias=" ) + ( privateKeyChooserByAlias . getAlias ( ) ) ) ) ; } signerImpl . setPrivateKey ( privateKey ) ; cache . put ( com . springcryptoutils . core . signature . SignerWithChoosersByAliasImpl . cacheKey ( keyStoreChooser , privateKeyChooserByAlias ) , signerImpl ) ; return signerImpl . sign ( message ) ; }
org . junit . Assert . assertNotNull ( signature )
renameIfDuplicatedToConstructorArgNames_A$String$List$List_notDuplicated ( ) { org . junithelper . core . extractor . ClassMetaExtractor target = new org . junithelper . core . extractor . ClassMetaExtractor ( config ) ; java . lang . String argName = "name" ; java . util . List < java . lang . String > constructorArgs = new java . util . ArrayList < java . lang . String > ( ) ; constructorArgs . add ( "category" ) ; java . util . List < java . lang . String > methodArgs = new java . util . ArrayList < java . lang . String > ( ) ; java . lang . String actual = target . renameIfDuplicatedToConstructorArgNames ( argName , constructorArgs , methodArgs ) ; java . lang . String expected = "name" ; "<AssertPlaceHolder>" ; } renameIfDuplicatedToConstructorArgNames ( java . lang . String , java . util . List , java . util . List ) { if ( argName == null ) { return null ; } if ( isDuplicatedVariableName ( argName ) ) { return renameIfDuplicatedToConstructorArgNames ( ( argName + "_" ) , constructorArgs , methodArgs ) ; } for ( java . lang . String consArg : constructorArgs ) { if ( argName . equals ( consArg ) ) { return renameIfDuplicatedToConstructorArgNames ( ( argName + "_" ) , constructorArgs , methodArgs ) ; } } for ( java . lang . String methodArg : methodArgs ) { if ( argName . equals ( methodArg ) ) { return renameIfDuplicatedToConstructorArgNames ( ( argName + "_" ) , constructorArgs , methodArgs ) ; } } return argName ; }
org . junit . Assert . assertEquals ( expected , actual )
getList_null ( ) { software . amazon . awssdk . services . dynamodb . document . Item item = new software . amazon . awssdk . services . dynamodb . document . Item ( ) ; "<AssertPlaceHolder>" ; } getList ( java . lang . String ) { java . lang . Object val = attributes . get ( attrName ) ; if ( val == null ) { return null ; } if ( val instanceof java . util . List ) { @ software . amazon . awssdk . services . dynamodb . document . SuppressWarnings ( "unchecked" ) java . util . List < T > ret = ( ( java . util . List < T > ) ( val ) ) ; return ret ; } java . util . List < T > list = new java . util . ArrayList < T > ( ) ; if ( val instanceof java . util . Collection ) { java . util . Collection < ? > col = ( ( java . util . Collection < ? > ) ( val ) ) ; for ( java . lang . Object element : col ) { @ software . amazon . awssdk . services . dynamodb . document . SuppressWarnings ( "unchecked" ) T t = ( ( T ) ( element ) ) ; list . add ( t ) ; } return list ; } @ software . amazon . awssdk . services . dynamodb . document . SuppressWarnings ( "unchecked" ) T t = ( ( T ) ( val ) ) ; list . add ( t ) ; return list ; }
org . junit . Assert . assertNull ( item . getList ( "test" ) )
tailEmptyFile ( ) { alluxio . client . file . FileSystemTestUtils . createByteFile ( mFileSystem , "/emptyFile" , WritePType . MUST_CACHE , 0 ) ; int ret = mFsShell . run ( "tail" , "/emptyFile" ) ; "<AssertPlaceHolder>" ; } run ( alluxio . grpc . RunPRequest , io . grpc . stub . StreamObserver ) { alluxio . RpcUtils . call ( alluxio . master . job . JobMasterClientServiceHandler . LOG , ( ( alluxio . RpcUtils . RpcCallableThrowsIOException < alluxio . grpc . RunPResponse > ) ( ( ) -> { try { byte [ ] jobConfigBytes = request . getJobConfig ( ) . toByteArray ( ) ; return alluxio . grpc . RunPResponse . newBuilder ( ) . setJobId ( mJobMaster . run ( ( ( alluxio . job . JobConfig ) ( alluxio . job . util . SerializationUtils . deserialize ( jobConfigBytes ) ) ) ) ) . build ( ) ; } catch ( e ) { throw new < alluxio . master . job . e > alluxio . exception . status . InvalidArgumentException ( ) ; } } ) ) , "run" , "request=%s" , responseObserver , request ) ; }
org . junit . Assert . assertEquals ( 0 , ret )
testFindServer ( ) { org . apache . druid . server . router . QueryHostFinder queryRunner = new org . apache . druid . server . router . QueryHostFinder ( brokerSelector , new org . apache . druid . server . router . RendezvousHashAvaticaConnectionBalancer ( ) ) ; org . apache . druid . client . selector . Server server = queryRunner . findServer ( new org . apache . druid . query . timeboundary . TimeBoundaryQuery ( new org . apache . druid . query . TableDataSource ( "test" ) , new org . apache . druid . query . spec . MultipleIntervalSegmentSpec ( java . util . Collections . singletonList ( org . apache . druid . java . util . common . Intervals . of ( "2011-08-31/2011-09-01" ) ) ) , null , null , null ) ) ; "<AssertPlaceHolder>" ; } getHost ( ) { return ( ( address ) + ":" ) + ( port ) ; }
org . junit . Assert . assertEquals ( "foo" , server . getHost ( ) )
getUserSecurityNameWithValidUser ( ) { java . lang . String user = "vmmtestuser" ; java . lang . String securityName = "cn=vmmtestuser,o=ibm,c=us" ; com . ibm . websphere . simplicity . log . Log . info ( com . ibm . ws . security . wim . adapter . ldap . fat . FATTestIDSwithSSL . c , "getUserSecurityNameWithValidUser" , "Checking<sp>with<sp>a<sp>valid<sp>user." ) ; "<AssertPlaceHolder>" ; } getUserSecurityName ( java . lang . String ) { return userRegistry . getUserSecurityName ( uniqueId ) ; }
org . junit . Assert . assertEquals ( securityName , com . ibm . ws . security . wim . adapter . ldap . fat . FATTestIDSwithSSL . servlet . getUserSecurityName ( user ) )
testIsEmptyFalse ( ) { "<AssertPlaceHolder>" ; }
org . junit . Assert . assertFalse ( config . isEmpty ( ) )
whenCreatingFluentIterableFromArray_shouldContainAllUsers ( ) { com . baeldung . guava . entity . User [ ] usersArray = new com . baeldung . guava . entity . User [ ] { new com . baeldung . guava . entity . User ( 1L , "John" , 45 ) , new com . baeldung . guava . entity . User ( 2L , "Max" , 15 ) } ; com . google . common . collect . FluentIterable < com . baeldung . guava . entity . User > users = com . google . common . collect . FluentIterable . of ( usersArray ) ; "<AssertPlaceHolder>" ; } size ( ) { return elements . size ( ) ; }
org . junit . Assert . assertThat ( users . size ( ) , org . hamcrest . CoreMatchers . equalTo ( 2 ) )
nextNumber ( ) { victim = new org . sejda . sambox . input . COSParser ( inMemorySeekableSourceFrom ( "1" . getBytes ( ) ) ) ; "<AssertPlaceHolder>" ; } nextNumber ( ) { victim = new org . sejda . sambox . input . COSParser ( inMemorySeekableSourceFrom ( "1" . getBytes ( ) ) ) ; org . junit . Assert . assertEquals ( COSInteger . ONE , victim . nextNumber ( ) ) ; }
org . junit . Assert . assertEquals ( COSInteger . ONE , victim . nextNumber ( ) )
testStreamTaskLogWithNegative ( ) { final java . lang . String testLog = "hello<sp>this<sp>is<sp>a<sp>log" ; final java . lang . String logPath = ( ( org . apache . druid . storage . google . GoogleTaskLogsTest . prefix ) + "/" ) + ( org . apache . druid . storage . google . GoogleTaskLogsTest . taskid ) ; expect ( storage . exists ( org . apache . druid . storage . google . GoogleTaskLogsTest . bucket , logPath ) ) . andReturn ( true ) ; expect ( storage . size ( org . apache . druid . storage . google . GoogleTaskLogsTest . bucket , logPath ) ) . andReturn ( ( ( long ) ( testLog . length ( ) ) ) ) ; expect ( storage . get ( org . apache . druid . storage . google . GoogleTaskLogsTest . bucket , logPath ) ) . andReturn ( new java . io . ByteArrayInputStream ( org . apache . druid . java . util . common . StringUtils . toUtf8 ( testLog ) ) ) ; replayAll ( ) ; final com . google . common . base . Optional < com . google . common . io . ByteSource > byteSource = googleTaskLogs . streamTaskLog ( org . apache . druid . storage . google . GoogleTaskLogsTest . taskid , ( - 3 ) ) ; final java . io . StringWriter writer = new java . io . StringWriter ( ) ; org . apache . commons . io . IOUtils . copy ( byteSource . get ( ) . openStream ( ) , writer , "UTF-8" ) ; "<AssertPlaceHolder>" ; verifyAll ( ) ; } toString ( ) { return ( ( ( ( ( ( ( ( ( "SqlQuery{" + "query='" ) + ( query ) ) + '\'' ) + ",<sp>resultFormat=" ) + ( resultFormat ) ) + ",<sp>header=" ) + ( header ) ) + ",<sp>context=" ) + ( context ) ) + '}' ; }
org . junit . Assert . assertEquals ( writer . toString ( ) , testLog . substring ( ( ( testLog . length ( ) ) - 3 ) ) )
testSkipLong ( ) { long sentinel = Long . MAX_VALUE ; org . apache . trevni . OutputBuffer out = new org . apache . trevni . OutputBuffer ( ) ; out . writeValue ( Long . MAX_VALUE , ValueType . LONG ) ; out . writeLong ( sentinel ) ; org . apache . trevni . InputBuffer in = new org . apache . trevni . InputBuffer ( new org . apache . trevni . InputBytes ( out . toByteArray ( ) ) ) ; in . skipValue ( ValueType . LONG ) ; "<AssertPlaceHolder>" ; } readLong ( ) { if ( ( ( limit ) - ( pos ) ) < 10 ) { int b = read ( ) ; long n = b & 127 ; for ( int shift = 7 ; b > 127 ; shift += 7 ) { b = read ( ) ; n ^= ( b & 127L ) << shift ; } return ( n > > > 1 ) ^ ( - ( n & 1 ) ) ; } int b = ( buf [ ( ( pos ) ++ ) ] ) & 255 ; int n = b & 127 ; long l ; if ( b > 127 ) { b = ( buf [ ( ( pos ) ++ ) ] ) & 255 ; n ^= ( b & 127 ) << 7 ; if ( b > 127 ) { b = ( buf [ ( ( pos ) ++ ) ] ) & 255 ; n ^= ( b & 127 ) << 14 ; if ( b > 127 ) { b = ( buf [ ( ( pos ) ++ ) ] ) & 255 ; n ^= ( b & 127 ) << 21 ; if ( b > 127 ) { l = innerLongDecode ( ( ( long ) ( n ) ) ) ; } else { l = n ; } } else { l = n ; } } else { l = n ; } } else { l = n ; } if ( ( pos ) > ( limit ) ) { throw new java . io . EOFException ( ) ; } return ( l > > > 1 ) ^ ( - ( l & 1 ) ) ; }
org . junit . Assert . assertEquals ( sentinel , in . readLong ( ) )
injectIntoWith ( ) { org . eclipse . collections . api . collection . MutableCollection < java . lang . Integer > objects = this . newWith ( 1 , 2 , 3 ) ; java . lang . Integer result = objects . injectIntoWith ( 1 , ( injectedValued , item , parameter ) -> ( injectedValued + item ) + parameter , 0 ) ; "<AssertPlaceHolder>" ; } valueOf ( K ) { return this . multimap . get ( subject ) ; }
org . junit . Assert . assertEquals ( java . lang . Integer . valueOf ( 7 ) , result )
testHasPageConfigurationForId ( ) { com . eclipsesource . tabris . ui . UIConfiguration configuration = new com . eclipsesource . tabris . ui . UIConfiguration ( ) ; com . eclipsesource . tabris . ui . PageConfiguration pageConfiguration = new com . eclipsesource . tabris . ui . PageConfiguration ( "foo" , com . eclipsesource . tabris . internal . ui . TestPage . class ) ; configuration . addPageConfiguration ( pageConfiguration ) ; com . eclipsesource . tabris . ui . PageConfiguration actualPageConfiguration = configuration . getPageConfiguration ( "foo" ) ; "<AssertPlaceHolder>" ; } getPageConfiguration ( com . eclipsesource . tabris . ui . Page ) { java . util . List < com . eclipsesource . tabris . internal . ui . rendering . PageRenderer > pages = getAllPages ( ) ; for ( com . eclipsesource . tabris . internal . ui . rendering . PageRenderer renderer : pages ) { if ( ( renderer . getPage ( ) ) == page ) { java . lang . String id = renderer . getDescriptor ( ) . getId ( ) ; return ui . getConfiguration ( ) . getPageConfiguration ( id ) ; } } return null ; }
org . junit . Assert . assertSame ( pageConfiguration , actualPageConfiguration )
shouldReturnMultiDay2 ( ) { java . time . LocalDate st = java . time . LocalDate . now ( ) . minusDays ( 4 ) ; java . time . LocalDate et = st . plusDays ( 4 ) ; entry . changeStartDate ( st ) ; entry . changeEndDate ( et ) ; boolean multiDay = entry . isMultiDay ( ) ; "<AssertPlaceHolder>" ; } isMultiDay ( ) { return ( multiDay ) == null ? _multiDay : multiDay . get ( ) ; }
org . junit . Assert . assertThat ( multiDay , org . hamcrest . Matchers . is ( true ) )
testTaggedDerivativeGauge ( ) { taggedMetric = new com . github . sps . metrics . TaggedDerivativeGauge < java . lang . Integer , java . lang . Integer > ( mock ( com . codahale . metrics . Gauge . class ) ) { @ com . github . sps . metrics . Override public java . util . Map < java . lang . String , java . lang . String > getTags ( ) { return tags ; } @ com . github . sps . metrics . Override protected com . github . sps . metrics . Integer transform ( java . lang . Integer value ) { return null ; } } ; "<AssertPlaceHolder>" ; } getTags ( ) { return tags ; }
org . junit . Assert . assertEquals ( tags , taggedMetric . getTags ( ) )
testExceptionallyComposeUnused ( ) { final java . util . concurrent . CompletionStage < java . lang . String > future = java . util . concurrent . CompletableFuture . completedFuture ( "hello" ) ; final java . util . concurrent . CompletionStage < java . lang . String > composed = com . spotify . futures . CompletableFuturesExtra . exceptionallyCompose ( future , ( throwable ) -> com . spotify . futures . CompletableFuturesExtra . exceptionallyCompletedFuture ( new java . lang . IllegalStateException ( ) ) ) ; "<AssertPlaceHolder>" ; } getCompleted ( java . util . concurrent . CompletionStage ) { java . util . concurrent . CompletableFuture < T > future = stage . toCompletableFuture ( ) ; com . spotify . futures . CompletableFuturesExtra . checkCompleted ( future ) ; return future . join ( ) ; }
org . junit . Assert . assertEquals ( "hello" , com . spotify . futures . CompletableFuturesExtra . getCompleted ( composed ) )
deveObterSerieComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe400 . classes . evento . inutilizacao . NFRetornoEventoInutilizacaoDados dados = new com . fincatto . documentofiscal . nfe400 . classes . evento . inutilizacao . NFRetornoEventoInutilizacaoDados ( ) ; final java . lang . String serie = "088" ; dados . setSerie ( serie ) ; "<AssertPlaceHolder>" ; } getSerie ( ) { return this . serie ; }
org . junit . Assert . assertEquals ( serie , dados . getSerie ( ) )
transferTo ( ) { java . io . File dest = new java . io . File ( "/dest" ) ; javax . xml . ws . Holder < java . lang . String > destName = new javax . xml . ws . Holder ( ) ; new mockit . MockUp < javax . servlet . http . Part > ( part ) { @ mockit . Mock void write ( java . lang . String fileName ) throws java . io . IOException { destName . value = fileName ; } } ; multipartFile . transferTo ( dest ) ; "<AssertPlaceHolder>" ; } getPath ( ) { return path ; }
org . junit . Assert . assertEquals ( dest . getPath ( ) , destName . value )
testIsSyntheticOnSyntheticClass ( ) { com . openpojo . reflection . PojoClass syntheticPojoClass = com . openpojo . reflection . impl . PojoClassImplTest . getPojoClassImplForClass ( com . openpojo . reflection . impl . AClassWithSythetics . class ) ; com . openpojo . validation . affirm . Affirm . affirmEquals ( "Expected<sp>2<sp>constructors" , 2 , syntheticPojoClass . getPojoConstructors ( ) . size ( ) ) ; com . openpojo . reflection . PojoMethod constructor = null ; for ( com . openpojo . reflection . PojoMethod constructorEntry : syntheticPojoClass . getPojoConstructors ( ) ) { if ( ( constructorEntry . getParameterTypes ( ) . length ) > 0 ) constructor = constructorEntry ; } "<AssertPlaceHolder>" ; com . openpojo . validation . affirm . Affirm . affirmTrue ( "Failed<sp>to<sp>find<sp>synthetic<sp>constructor" , constructor . isSynthetic ( ) ) ; com . openpojo . validation . affirm . Affirm . affirmEquals ( "Synthetic<sp>Constructor<sp>should<sp>have<sp>just<sp>one<sp>parameter" , 1 , constructor . getParameterTypes ( ) . length ) ; com . openpojo . reflection . PojoClass aSyntheticClass = com . openpojo . reflection . impl . PojoClassImplTest . getPojoClassImplForClass ( constructor . getParameterTypes ( ) [ 0 ] ) ; com . openpojo . validation . affirm . Affirm . affirmTrue ( "Parameter<sp>to<sp>synthetic<sp>constructor<sp>should<sp>be<sp>synthetic<sp>class" , aSyntheticClass . isSynthetic ( ) ) ; } getParameterTypes ( ) { if ( isConstructor ( ) ) { return getAsConstructor ( ) . getParameterTypes ( ) ; } return getAsMethod ( ) . getParameterTypes ( ) ; }
org . junit . Assert . assertNotNull ( constructor )
testXsalsa20HappyFlow ( ) { org . abstractj . kalium . crypto . Random random = new org . abstractj . kalium . crypto . Random ( ) ; org . abstractj . kalium . crypto . Advanced advanced = new org . abstractj . kalium . crypto . Advanced ( ) ; byte [ ] nonce = random . randomBytes ( 24 ) ; byte [ ] key = random . randomBytes ( 32 ) ; java . lang . String pwd = "This<sp>is<sp>a<sp>test<sp>message<sp>:-)..." ; byte [ ] plaintext = pwd . getBytes ( ) ; byte [ ] ciphertext = advanced . crypto_stream_xsalsa20_xor ( plaintext , nonce , key ) ; plaintext = advanced . crypto_stream_xsalsa20_xor ( ciphertext , nonce , key ) ; "<AssertPlaceHolder>" ; } crypto_stream_xsalsa20_xor ( byte [ ] , byte [ ] , byte [ ] ) { org . abstractj . kalium . crypto . Util . checkLength ( nonce , org . abstractj . kalium . crypto . CRYPTO_STREAM_NONCEBYTES ) ; org . abstractj . kalium . crypto . Util . checkLength ( key , org . abstractj . kalium . crypto . CRYPTO_STREAM_KEYBYTES ) ; byte [ ] buffer = new byte [ message . length ] ; org . abstractj . kalium . NaCl . sodium ( ) . crypto_stream_xor ( buffer , message , message . length , nonce , key ) ; return buffer ; }
org . junit . Assert . assertEquals ( pwd , new java . lang . String ( plaintext ) )
save_unbound_noChanges ( ) { com . vaadin . data . Binder < com . vaadin . tests . data . bean . Person > binder = new com . vaadin . data . Binder ( ) ; com . vaadin . tests . data . bean . Person person = new com . vaadin . tests . data . bean . Person ( ) ; int age = 10 ; person . setAge ( age ) ; binder . writeBean ( person ) ; "<AssertPlaceHolder>" ; } getAge ( ) { return age ; }
org . junit . Assert . assertEquals ( age , person . getAge ( ) )
testSetResidueNumberUsage ( ) { java . util . List < org . biojava . nbio . structure . Group > resNumgroups = new java . util . ArrayList < org . biojava . nbio . structure . Group > ( ) ; for ( int i = 0 ; i < ( bigTestNumber ) ; i ++ ) { org . biojava . nbio . structure . ResidueNumber resNum = new org . biojava . nbio . structure . ResidueNumber ( "A" , i , '<sp>' ) ; org . biojava . nbio . structure . HetatomImpl hetAtom = new org . biojava . nbio . structure . HetatomImpl ( ) ; hetAtom . setResidueNumber ( resNum ) ; resNumgroups . add ( hetAtom ) ; } int groupsSize = resNumgroups . size ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return ( mapping . size ( ) ) - 2 ; }
org . junit . Assert . assertEquals ( bigTestNumber , groupsSize )
setCallbackTest ( ) { presenter . showDialog ( null , callback ) ; "<AssertPlaceHolder>" ; } showDialog ( int , int ) { this . show ( ) ; this . setPopupPosition ( ( x - ( getOffsetWidth ( ) ) ) , ( y + 1 ) ) ; }
org . junit . Assert . assertNotNull ( presenter . callback )
retrieveAandConly_CFirst_range ( ) { com . redhat . lightblue . crud . FindRequest fr = new com . redhat . lightblue . crud . FindRequest ( ) ; fr . setQuery ( query ( "{'field':'obj1.c.*.objectType','op':'=','rvalue':'C'}" ) ) ; fr . setProjection ( projection ( "[{'field':'*','recursive':1},{'field':'obj1.c'}]" ) ) ; fr . setFrom ( 0L ) ; fr . setTo ( 0L ) ; fr . setEntityVersion ( new com . redhat . lightblue . EntityVersion ( "A" , "1.0.0" ) ) ; com . redhat . lightblue . Response response = mediator . find ( fr ) ; "<AssertPlaceHolder>" ; } getEntityData ( ) { return entityData ; }
org . junit . Assert . assertEquals ( 1 , response . getEntityData ( ) . size ( ) )
testLoggerInstantiationException ( ) { final com . github . vbauer . herald . logger . impl . JavaUtilLogFactory logFactory = new com . github . vbauer . herald . logger . impl . JavaUtilLogFactory ( ) ; try { throw new com . github . vbauer . herald . exception . LoggerInstantiationException ( logFactory ) ; } catch ( final com . github . vbauer . herald . exception . LoggerInstantiationException ex ) { "<AssertPlaceHolder>" ; checkMessage ( ex ) ; } } getLoggerFactory ( ) { return loggerFactory ; }
org . junit . Assert . assertThat ( logFactory , org . hamcrest . Matchers . equalTo ( ex . getLoggerFactory ( ) ) )
testPatchFilePath ( ) { final java . lang . String patchFilePath = xenServer650Resource . getPatchFilePath ( ) ; final java . lang . String patch = "scripts/vm/hypervisor/xenserver/xenserver65/patch" ; "<AssertPlaceHolder>" ; } getPatchFilePath ( ) { return "scripts/vm/hypervisor/xenserver/xenserver60/patch" ; }
org . junit . Assert . assertEquals ( patch , patchFilePath )
getVersionWithErrorReturnsEmptyString ( ) { when ( this . client . execute ( any ( org . apache . http . client . methods . HttpUriRequest . class ) ) ) . thenThrow ( new java . io . IOException ( ) ) ; java . lang . String result = this . mocker . getComponentUnderTest ( ) . getVersion ( ) ; "<AssertPlaceHolder>" ; } getVersion ( ) { org . json . JSONObject info = getInfo ( ) ; return info == null ? "" : info . getString ( "lastModified" ) ; }
org . junit . Assert . assertEquals ( "" , result )
testConvert ( ) { java . lang . Long enrolmentId = 1L ; org . lnu . is . domain . enrolment . Enrolment enrolment = new org . lnu . is . domain . enrolment . Enrolment ( ) ; enrolment . setId ( enrolmentId ) ; java . lang . Long benefitId = 2L ; org . lnu . is . domain . benefit . Benefit benefit = new org . lnu . is . domain . benefit . Benefit ( ) ; benefit . setId ( benefitId ) ; java . lang . Long personpaperId = 3L ; org . lnu . is . domain . person . paper . PersonPaper personpaper = new org . lnu . is . domain . person . paper . PersonPaper ( ) ; personpaper . setId ( personpaperId ) ; org . lnu . is . domain . enrolment . benefit . EnrolmentBenefit source = new org . lnu . is . domain . enrolment . benefit . EnrolmentBenefit ( ) ; source . setEnrolment ( enrolment ) ; source . setBenefit ( benefit ) ; source . setPersonPaper ( personpaper ) ; org . lnu . is . resource . enrolment . benefit . EnrolmentBenefitResource expected = new org . lnu . is . resource . enrolment . benefit . EnrolmentBenefitResource ( ) ; expected . setBenefitId ( benefitId ) ; expected . setEnrolmentId ( enrolmentId ) ; expected . setPersonPaperId ( personpaperId ) ; org . lnu . is . resource . enrolment . benefit . EnrolmentBenefitResource actual = unit . convert ( source ) ; "<AssertPlaceHolder>" ; } convert ( org . lnu . is . domain . admin . unit . AdminUnit ) { return convert ( source , new org . lnu . is . resource . adminunit . AdminUnitResource ( ) ) ; }
org . junit . Assert . assertEquals ( expected , actual )
testEvalNullGlobal ( ) { final java . lang . String drl = ( ( ( ( ( ( "import<sp>" + ( org . drools . testcoverage . common . model . Cheese . class . getCanonicalName ( ) ) ) + "\n" ) + "global<sp>Boolean<sp>b\n" ) + "rule<sp>R<sp>when\n" ) + "<sp>eval(b)\n" ) + "then\n" ) + "end\n" ; final org . kie . api . KieBase kbase = org . drools . testcoverage . common . util . KieBaseUtil . getKieBaseFromKieModuleFromDrl ( "global-test" , kieBaseTestConfiguration , drl ) ; final org . kie . api . runtime . KieSession ksession = kbase . newKieSession ( ) ; try { ksession . setGlobal ( "b" , null ) ; "<AssertPlaceHolder>" ; } finally { ksession . dispose ( ) ; } } fireAllRules ( ) { return 0 ; }
org . junit . Assert . assertEquals ( 0 , ksession . fireAllRules ( ) )
testGetOutstreamIds ( ) { java . lang . String tsSource = "parser/resources/testtool2.xml" ; toolSpec = new org . apache . cxf . tools . common . toolspec . ToolSpec ( getClass ( ) . getResourceAsStream ( tsSource ) , false ) ; "<AssertPlaceHolder>" ; } getOutstreamIds ( ) { java . util . List < java . lang . String > res = new java . util . ArrayList ( ) ; org . w3c . dom . Element streams = getStreams ( ) ; if ( streams != null ) { java . util . List < org . w3c . dom . Element > elemList = org . apache . cxf . helpers . DOMUtils . findAllElementsByTagNameNS ( streams , Tool . TOOL_SPEC_PUBLIC_ID , "outstream" ) ; for ( org . w3c . dom . Element elem : elemList ) { res . add ( elem . getAttribute ( "id" ) ) ; } } return java . util . Collections . unmodifiableList ( res ) ; }
org . junit . Assert . assertTrue ( ( ( toolSpec . getOutstreamIds ( ) . size ( ) ) == 1 ) )
deveObterVersaoAplicacaoComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe310 . classes . cadastro . NFRetornoConsultaCadastroDados retornoConsultaCadastroDados = new com . fincatto . documentofiscal . nfe310 . classes . cadastro . NFRetornoConsultaCadastroDados ( ) ; final java . lang . String versaoAplicacao = "3.10" ; retornoConsultaCadastroDados . setVersaoAplicacao ( versaoAplicacao ) ; "<AssertPlaceHolder>" ; } getVersaoAplicacao ( ) { return this . versaoAplicacao ; }
org . junit . Assert . assertEquals ( versaoAplicacao , retornoConsultaCadastroDados . getVersaoAplicacao ( ) )
shouldCloseTheIterableWhenFullyCached ( ) { final uk . gov . gchq . gaffer . commonutil . iterable . CloseableIterable < java . lang . Integer > iterable = mock ( uk . gov . gchq . gaffer . commonutil . iterable . CloseableIterable . class ) ; given ( iterable . iterator ( ) ) . willReturn ( new uk . gov . gchq . gaffer . commonutil . iterable . WrappedCloseableIterator ( uk . gov . gchq . gaffer . commonutil . CachingIterableTest . SMALL_LIST . iterator ( ) ) , new uk . gov . gchq . gaffer . commonutil . iterable . WrappedCloseableIterator ( uk . gov . gchq . gaffer . commonutil . CachingIterableTest . SMALL_LIST . iterator ( ) ) ) ; final uk . gov . gchq . gaffer . commonutil . iterable . CachingIterable < java . lang . Integer > cachingIterable = new uk . gov . gchq . gaffer . commonutil . iterable . CachingIterable ( iterable , 5 ) ; "<AssertPlaceHolder>" ; verify ( iterable ) . close ( ) ; } iterator ( ) { if ( null == ( collection ) ) { if ( null == ( singleItem ) ) { return java . util . Collections . emptyIterator ( ) ; } return com . google . common . collect . Iterators . singletonIterator ( singleItem ) ; } return collection . iterator ( ) ; }
org . junit . Assert . assertEquals ( uk . gov . gchq . gaffer . commonutil . CachingIterableTest . SMALL_LIST , com . google . common . collect . Lists . newArrayList ( cachingIterable ) )
testParsingPhilosopherFeatureCollectionStream ( ) { java . net . URL docURL = org . deegree . gml . feature . GMLFeatureReaderTest . class . getResource ( "../misc/feature/Philosopher_FeatureCollection.xml" ) ; org . deegree . gml . GMLStreamReader gmlReader = org . deegree . gml . GMLInputFactory . createGMLStreamReader ( org . deegree . gml . GMLVersion . GML_31 , docURL ) ; org . deegree . gml . feature . StreamFeatureCollection fc = gmlReader . readFeatureCollectionStream ( ) ; int i = 0 ; while ( ( fc . read ( ) ) != null ) { i ++ ; } "<AssertPlaceHolder>" ; } read ( ) { return is . read ( ) ; }
org . junit . Assert . assertEquals ( 7 , i )
fallbackToGenericJpaForUnknownPersistenceProvider ( ) { javax . persistence . EntityManager em = mockProviderSpecificEntityManagerInterface ( "foo.bar.unknown.jpa.JpaEntityManager" ) ; "<AssertPlaceHolder>" ; } fromEntityManager ( javax . persistence . EntityManager ) { org . springframework . util . Assert . notNull ( em , "EntityManager<sp>must<sp>not<sp>be<sp>null!" ) ; java . lang . Class < ? > entityManagerType = em . getDelegate ( ) . getClass ( ) ; org . springframework . data . jpa . provider . PersistenceProvider cachedProvider = org . springframework . data . jpa . provider . PersistenceProvider . CACHE . get ( entityManagerType ) ; if ( cachedProvider != null ) { return cachedProvider ; } for ( org . springframework . data . jpa . provider . PersistenceProvider provider : org . springframework . data . jpa . provider . PersistenceProvider . values ( ) ) { for ( java . lang . String entityManagerClassName : provider . entityManagerClassNames ) { if ( isEntityManagerOfType ( em , entityManagerClassName ) ) { return org . springframework . data . jpa . provider . PersistenceProvider . cacheAndReturn ( entityManagerType , provider ) ; } } } return org . springframework . data . jpa . provider . PersistenceProvider . cacheAndReturn ( entityManagerType , org . springframework . data . jpa . provider . PersistenceProvider . GENERIC_JPA ) ; }
org . junit . Assert . assertThat ( fromEntityManager ( em ) , org . hamcrest . CoreMatchers . is ( org . springframework . data . jpa . provider . GENERIC_JPA ) )
shouldBeAbleToChangeTheUuidOfRelationshipNotConfigured ( ) { org . neo4j . graphdb . Node node ; org . neo4j . graphdb . Node another ; registerModuleWithLabelsAndTypes ( ) ; try ( org . neo4j . graphdb . Transaction tx = database . beginTx ( ) ) { node = database . createNode ( testLabel ) ; another = database . createNode ( testLabel ) ; node . createRelationshipTo ( another , knowsType ) ; node . createRelationshipTo ( another , ignoredType ) ; tx . success ( ) ; } try ( org . neo4j . graphdb . Transaction tx = database . beginTx ( ) ) { for ( org . neo4j . graphdb . Relationship r : database . getAllRelationships ( ) ) { if ( r . isType ( ignoredType ) ) { r . setProperty ( uuidConfiguration . getUuidProperty ( ) , "aNewUuid" ) ; } } tx . success ( ) ; } try ( org . neo4j . graphdb . Transaction tx = database . beginTx ( ) ) { for ( org . neo4j . graphdb . Relationship r : database . getAllRelationships ( ) ) { if ( r . isType ( ignoredType ) ) { "<AssertPlaceHolder>" ; } try { uuidReader . getRelationshipIdByUuid ( "aNewUuid" ) ; org . junit . Assert . fail ( ) ; } catch ( org . neo4j . graphdb . NotFoundException e ) { } } tx . success ( ) ; } } getUuidProperty ( ) { return uuidProperty ; }
org . junit . Assert . assertEquals ( "aNewUuid" , r . getProperty ( uuidConfiguration . getUuidProperty ( ) ) )
emptyObject ( ) { final javax . json . stream . JsonParser parser = javax . json . Json . createParser ( new java . io . StringReader ( "" ) ) ; "<AssertPlaceHolder>" ; parser . close ( ) ; } hasNext ( ) { if ( ( ( currentStructureElement ) != null ) || ( ( previousEvent ) == 0 ) ) { return true ; } if ( ( ( ( ( ( ( ( previousEvent ) != ( END_ARRAY ) ) && ( ( previousEvent ) != ( END_OBJECT ) ) ) && ( ( previousEvent ) != ( VALUE_STRING ) ) ) && ( ( previousEvent ) != ( VALUE_FALSE ) ) ) && ( ( previousEvent ) != ( VALUE_TRUE ) ) ) && ( ( previousEvent ) != ( VALUE_NULL ) ) ) && ( ( previousEvent ) != ( VALUE_NUMBER ) ) ) { if ( ( bufferPos ) == ( Integer . MIN_VALUE ) ) { final char c = readNextChar ( ) ; ( bufferPos ) -- ; return c != ( EOF ) ; } return true ; } if ( ( bufferPos ) < ( availableCharsInBuffer ) ) { final char c = readNextNonWhitespaceChar ( readNextChar ( ) ) ; if ( c == ( EOF ) ) { return false ; } if ( ( bufferPos ) < ( availableCharsInBuffer ) ) { throw uexc ( "EOF<sp>expected" ) ; } } return false ; }
org . junit . Assert . assertFalse ( parser . hasNext ( ) )
testMethodBinding ( ) { final codemining . java . codeutils . binding . JavaApproximateVariableBindingExtractor jabe = new codemining . java . codeutils . binding . JavaApproximateVariableBindingExtractor ( ) ; final java . util . List < codemining . languagetools . bindings . TokenNameBinding > methodVariableBindings = jabe . getNameBindings ( methodContent ) ; codemining . java . codeutils . binding . BindingTester . checkAllBindings ( methodVariableBindings ) ; "<AssertPlaceHolder>" ; } size ( ) { return this . items . size ( ) ; }
org . junit . Assert . assertEquals ( methodVariableBindings . size ( ) , 3 )
givenUsersExist_whenFindingByPage_thenUsersAreFoundByPage ( ) { com . baeldung . model . User user = new com . baeldung . model . User ( ) ; user . setName ( "Eric" ) ; user . setAge ( 45 ) ; mongoTemplate . insert ( user ) ; user = new com . baeldung . model . User ( ) ; user . setName ( "Antony" ) ; user . setAge ( 33 ) ; mongoTemplate . insert ( user ) ; user = new com . baeldung . model . User ( ) ; user . setName ( "Alice" ) ; user . setAge ( 35 ) ; mongoTemplate . insert ( user ) ; final org . springframework . data . domain . Pageable pageableRequest = org . springframework . data . domain . PageRequest . of ( 0 , 2 ) ; org . springframework . data . mongodb . core . query . Query query = new org . springframework . data . mongodb . core . query . Query ( ) ; query . with ( pageableRequest ) ; java . util . List < com . baeldung . model . User > users = mongoTemplate . find ( query , com . baeldung . model . User . class ) ; "<AssertPlaceHolder>" ; } size ( ) { return elements . size ( ) ; }
org . junit . Assert . assertThat ( users . size ( ) , org . hamcrest . CoreMatchers . is ( 2 ) )
testCopySemanticsForRules2 ( ) { java . lang . String grammar = "grammar<sp>T;\n" + ( ( ( ( "options<sp>{output=AST;}\n" + "a<sp>:<sp>type<sp>ID<sp>(\',\'<sp>ID)*<sp>\';\'<sp>-><sp>^(type<sp>ID)+<sp>;\n" ) + "a" 0 ) + "ID<sp>:<sp>\'a\'..\'z\'+<sp>;\n" ) + "WS<sp>:<sp>(\'<sp>\'|\'\\n\')<sp>{$channel=HIDDEN;}<sp>;\n" ) ; java . lang . String found = execParser ( "T.g" , grammar , "TParser" , "TLexer" , "a" , "int<sp>a,b,c;" , debug ) ; "<AssertPlaceHolder>" ; } execParser ( java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String , boolean ) { boolean compiled = rawGenerateAndBuildRecognizer ( grammarFileName , grammarStr , parserName , lexerName , debug ) ; org . junit . Assert . assertTrue ( compiled ) ; writeFile ( tmpdir , "input" , input ) ; boolean parserBuildsTrees = ( ( grammarStr . indexOf ( "output=AST" ) ) >= 0 ) || ( ( grammarStr . indexOf ( "output<sp>=<sp>AST" ) ) >= 0 ) ; boolean parserBuildsTemplate = ( ( grammarStr . indexOf ( "output=template" ) ) >= 0 ) || ( ( grammarStr . indexOf ( "output<sp>=<sp>template" ) ) >= 0 ) ; return rawExecRecognizer ( parserName , null , lexerName , startRuleName , null , parserBuildsTrees , parserBuildsTemplate , false , debug ) ; }
org . junit . Assert . assertEquals ( "a" 1 , found )
testBuildWithParametersWithOrderBy ( ) { java . lang . String abbrName = "AN" ; java . lang . String name = "fsdfds" ; org . lnu . is . domain . contact . type . ContactType context = new org . lnu . is . domain . contact . type . ContactType ( ) ; context . setAbbrName ( abbrName ) ; context . setName ( name ) ; org . lnu . is . pagination . OrderBy orderBy1 = new org . lnu . is . pagination . OrderBy ( "abbrName" , org . lnu . is . pagination . OrderByType . ASC ) ; org . lnu . is . pagination . OrderBy orderBy2 = new org . lnu . is . pagination . OrderBy ( "name" , org . lnu . is . pagination . OrderByType . DESC ) ; java . util . List < org . lnu . is . pagination . OrderBy > orders = java . util . Arrays . asList ( orderBy1 , orderBy2 ) ; java . lang . String expectedQuery = "SELECT<sp>e<sp>FROM<sp>ContactType<sp>e<sp>WHERE<sp>(<sp>e.name<sp>LIKE<sp>CONCAT('%',:name,'%')<sp>AND<sp>e.abbrName<sp>LIKE<sp>CONCAT('%',:abbrName,'%')<sp>)<sp>AND<sp>e.status=:status<sp>AND<sp>e.crtUserGroup<sp>IN<sp>(:userGroups)<sp>ORDER<sp>BY<sp>e.abbrName<sp>ASC,<sp>e.name<sp>DESC" ; org . lnu . is . pagination . MultiplePagedSearch < org . lnu . is . domain . contact . type . ContactType > pagedSearch = new org . lnu . is . pagination . MultiplePagedSearch ( ) ; pagedSearch . setEntity ( context ) ; pagedSearch . setOrders ( orders ) ; java . lang . String actualQuery = unit . build ( pagedSearch ) ; "<AssertPlaceHolder>" ; } setOrders ( java . util . List ) { this . orders = orders ; }
org . junit . Assert . assertEquals ( expectedQuery , actualQuery )
countAuditLogs_byEmptyOperationIds ( ) { givenAuditLogs ( ) ; long cnt = countAuditLogsInTx ( operatorIds , 2 , 3 ) ; "<AssertPlaceHolder>" ; } countAuditLogsInTx ( java . util . List , long , long ) { return runTX ( new java . util . concurrent . Callable < java . lang . Long > ( ) { @ org . oscm . auditlog . dao . Override public org . oscm . auditlog . dao . Long call ( ) { return dao . countAuditLogs ( operationName , startTime , endTime ) ; } } ) ; }
org . junit . Assert . assertEquals ( 2 , cnt )
testReturnArray ( ) { java . util . List < java . lang . Integer > returnValue = client . call ( "returnArray" , java . util . List . class ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertArrayEquals ( new java . lang . Integer [ ] { 1 , 2 , 3 } , returnValue . toArray ( ) )
convert_collection_of_primitives_to_array_with_java8 ( ) { java . util . List < java . lang . Double > searchEngineMarketShare = com . google . common . collect . Lists . newArrayList ( ) ; searchEngineMarketShare . add ( 67.1 ) ; searchEngineMarketShare . add ( 16.9 ) ; searchEngineMarketShare . add ( 11.8 ) ; searchEngineMarketShare . add ( 2.7 ) ; searchEngineMarketShare . add ( 1.6 ) ; double [ ] searchEngineMarketShareArray = searchEngineMarketShare . stream ( ) . mapToDouble ( Double :: doubleValue ) . toArray ( ) ; com . levelup . java . array . ConvertCollectionToArray . logger . info ( java . util . Arrays . toString ( searchEngineMarketShareArray ) ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( 5 , searchEngineMarketShareArray . length )
b ( ) { org . junit . contrib . assumes . AssumesTest . ComplexSmallEffectSmokeTest . log += "b" ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertThat ( true , org . hamcrest . CoreMatchers . is ( false ) )
testGetHeight_1 ( ) { org . jinstagram . entity . oembed . OembedInformation fixture = new org . jinstagram . entity . oembed . OembedInformation ( ) ; fixture . setVersion ( "" ) ; fixture . setTitle ( "" ) ; fixture . setProviderUrl ( "" ) ; fixture . setUrl ( "" ) ; fixture . setAuthorName ( "" ) ; fixture . setHeight ( "" ) ; fixture . setMediaId ( "" ) ; fixture . setProviderName ( "" ) ; fixture . setType ( "" ) ; fixture . setWidth ( "" ) ; fixture . setAuthorUrl ( "" ) ; java . lang . String result = fixture . getHeight ( ) ; "<AssertPlaceHolder>" ; } getHeight ( ) { return height ; }
org . junit . Assert . assertEquals ( "" , result )
testStringMatcher ( ) { java . util . List < java . lang . String > names = new java . util . ArrayList ( ) ; names . add ( "a" ) ; names . add ( "little" ) ; names . add ( "sql" ) ; names . add ( "for" ) ; names . add ( "your" ) ; names . add ( "nosql" ) ; java . lang . String name = "squeal" ; java . lang . String bestMatch = com . dremio . exec . util . ApproximateStringMatcher . getBestMatch ( names , name ) ; "<AssertPlaceHolder>" ; } getBestMatch ( java . util . List , java . lang . String ) { final java . util . List < java . lang . Integer > editDistances = new java . util . ArrayList ( ) ; for ( final java . lang . String name : namesToSearch ) { final int dist = com . dremio . exec . util . ApproximateStringMatcher . LevenshteinDistance ( nameToMatch , name ) ; editDistances . add ( dist ) ; } final int minIndex = editDistances . indexOf ( java . util . Collections . min ( editDistances ) ) ; final java . lang . String bestMatch = namesToSearch . get ( minIndex ) ; return bestMatch ; }
org . junit . Assert . assertEquals ( "sql" , bestMatch )
testLifecycleState ( ) { org . apache . bookkeeper . common . component . LifecycleComponent component1 = mock ( org . apache . bookkeeper . common . component . LifecycleComponent . class ) ; when ( component1 . lifecycleState ( ) ) . thenReturn ( Lifecycle . State . INITIALIZED ) ; org . apache . bookkeeper . common . component . LifecycleComponent component2 = mock ( org . apache . bookkeeper . common . component . LifecycleComponent . class ) ; when ( component2 . lifecycleState ( ) ) . thenReturn ( Lifecycle . State . STARTED ) ; org . apache . bookkeeper . common . component . LifecycleComponentStack stack = org . apache . bookkeeper . common . component . LifecycleComponentStack . newBuilder ( ) . withName ( "get-lifecycle-state" ) . addComponent ( component1 ) . addComponent ( component2 ) . build ( ) ; "<AssertPlaceHolder>" ; } lifecycleState ( ) { return components . get ( 0 ) . lifecycleState ( ) ; }
org . junit . Assert . assertEquals ( Lifecycle . State . INITIALIZED , stack . lifecycleState ( ) )
testBenchmarkWithWritable ( ) { int rc = org . apache . hadoop . util . ToolRunner . run ( new org . apache . hadoop . ipc . RPCCallBenchmark ( ) , new java . lang . String [ ] { "--clientThreads" , "30" , "--serverThreads" , "30" , "--time" , "5" , "--serverReaderThreads" , "4" , "--messageSize" , "1024" , "--engine" , "--engine" 0 } ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( 0 , rc )
testAddingConnectionFactories ( ) { final java . lang . String poolName = "propertyForm:resourcesTable:topActionsGroup1:enableButton" 3 + ( generateRandomString ( ) ) ; final java . lang . String description = "Test<sp>Pool<sp>-<sp>" + poolName ; org . glassfish . admingui . devtests . StandaloneTest standaloneTest = new org . glassfish . admingui . devtests . StandaloneTest ( ) ; org . glassfish . admingui . devtests . ClusterTest clusterTest = new org . glassfish . admingui . devtests . ClusterTest ( ) ; standaloneTest . deleteAllStandaloneInstances ( ) ; clusterTest . deleteAllClusters ( ) ; clickAndWait ( "treeForm:tree:resources:jmsResources:jmsConnectionFactories:jmsConnectionFactories_link" , org . glassfish . admingui . devtests . JmsResourcesTest . TRIGGER_JMS_CONNECTION_FACTORIES ) ; clickAndWait ( "propertyForm:resourcesTable:topActionsGroup1:enableButton" 2 , org . glassfish . admingui . devtests . JmsResourcesTest . TRIGGER_NEW_JMS_CONN_FACT ) ; setFieldValue ( "form:propertySheet:generalPropertySheet:jndiProp:jndiProp" , poolName ) ; selectDropdownOption ( "propertyForm:resourcesTable:topActionsGroup1:enableButton" 0 , "javax.jms.TopicConnectionFactory" ) ; setFieldValue ( "propertyForm:resourcesTable:topActionsGroup1:enableButton" 4 , description ) ; selectDropdownOption ( "form:propertySheet:poolPropertySheet:transprop:trans" , "propertyForm:resourcesTable:topActionsGroup1:enableButton" 5 ) ; clickAndWait ( "propertyForm:resourcesTable:topActionsGroup1:enableButton" 1 , org . glassfish . admingui . devtests . JmsResourcesTest . TRIGGER_JMS_CONNECTION_FACTORIES ) ; "<AssertPlaceHolder>" ; selectTableRowByValue ( "propertyForm:resourcesTable" , poolName , "colSelect" , "colName" ) ; waitForButtonEnabled ( "propertyForm:resourcesTable:topActionsGroup1:disableButton" ) ; pressButton ( "propertyForm:resourcesTable:topActionsGroup1:disableButton" ) ; waitForButtonDisabled ( "propertyForm:resourcesTable:topActionsGroup1:disableButton" ) ; selectTableRowByValue ( "propertyForm:resourcesTable" , poolName , "colSelect" , "colName" ) ; waitForButtonEnabled ( "propertyForm:resourcesTable:topActionsGroup1:enableButton" ) ; pressButton ( "propertyForm:resourcesTable:topActionsGroup1:enableButton" ) ; waitForButtonDisabled ( "propertyForm:resourcesTable:topActionsGroup1:enableButton" ) ; deleteRow ( "propertyForm:resourcesTable:topActionsGroup1:enableButton" 6 , "propertyForm:resourcesTable" , poolName , "colSelect" , "colName" ) ; } isTextPresent ( java . lang . String ) { boolean isTextPresent = false ; try { isTextPresent = super . isTextPresent ( string ) ; } catch ( java . lang . Exception e ) { sleep ( 1000 ) ; isTextPresent = super . isTextPresent ( string ) ; } return isTextPresent ; }
org . junit . Assert . assertTrue ( isTextPresent ( poolName ) )
constructor_propertyWithWhiteSpace ( ) { java . util . Map < java . lang . String , java . lang . String > props = new java . util . HashMap < java . lang . String , java . lang . String > ( ) ; props . put ( "x" , "<sp>a<sp>" ) ; com . hazelcast . simulator . common . TestCase testCase = new com . hazelcast . simulator . common . TestCase ( "id" , props ) ; "<AssertPlaceHolder>" ; } getProperty ( java . lang . String ) { return properties . get ( name ) ; }
org . junit . Assert . assertEquals ( "a" , testCase . getProperty ( "x" ) )
testPosition ( ) { it . polimi . deib . provaFinale2014 . andrea . celli_stefano1 . cereda . gameModel . players . Player p = new it . polimi . deib . provaFinale2014 . andrea . celli_stefano1 . cereda . gameModel . players . Player ( ) ; p . setID ( ) ; it . polimi . deib . provaFinale2014 . andrea . celli_stefano1 . cereda . gameModel . objectsOfGame . Road r = new it . polimi . deib . provaFinale2014 . andrea . celli_stefano1 . cereda . gameModel . objectsOfGame . Road ( 0 , null , null ) ; r . setID ( ) ; p . move ( r ) ; "<AssertPlaceHolder>" ; } getPosition ( ) { if ( usingSecond ) { return secondposition ; } return super . getPosition ( ) ; }
org . junit . Assert . assertEquals ( r , p . getPosition ( ) )
testObjectFieldPropertySupportsNull ( ) { java . lang . reflect . Field field = getClass ( ) . getDeclaredField ( "objectField" ) ; com . codiform . moo . property . Property property = com . codiform . moo . property . PropertyFactory . createProperty ( field , AccessMode . FIELD ) ; "<AssertPlaceHolder>" ; } canSupportNull ( ) { return true ; }
org . junit . Assert . assertTrue ( property . canSupportNull ( ) )
testUpdateFromRest ( ) { try ( com . syncleus . ferma . tx . Tx tx = tx ( ) ) { com . gentics . mesh . core . rest . schema . change . impl . SchemaChangeModel model = new com . gentics . mesh . core . rest . schema . change . impl . SchemaChangeModel ( UPDATEFIELD , "someField" ) ; com . gentics . mesh . core . data . schema . UpdateFieldChange change = tx . getGraph ( ) . addFramedVertex ( com . gentics . mesh . core . data . schema . impl . UpdateFieldChangeImpl . class ) ; change . updateFromRest ( model ) ; "<AssertPlaceHolder>" ; } } getFieldName ( ) { return getProperties ( ) . get ( "fieldName" ) ; }
org . junit . Assert . assertEquals ( "someField" , change . getFieldName ( ) )
geeftToekomstigeIdsPlusHuidigeVanEersteHandeling ( ) { final nl . bzk . brp . model . hisvolledig . impl . kern . PersoonHisVolledigImpl persoonHisVolledig = nl . bzk . brp . util . testpersoonbouwers . TestPersoonAntwoordPersoon . maakAntwoordPersoon ( ) ; final nl . bzk . brp . model . hisvolledig . impl . kern . PersoonAdresHisVolledigImpl adresHisVolledig = persoonHisVolledig . getAdressen ( ) . iterator ( ) . next ( ) ; final nl . bzk . brp . model . operationeel . kern . AdministratieveHandelingModel eersteHandeling = persoonHisVolledig . getPersoonAfgeleidAdministratiefHistorie ( ) . getActueleRecord ( ) . getAdministratieveHandeling ( ) ; pasAdresGroepAan ( persoonHisVolledig , adresHisVolledig , nl . bzk . brp . model . algemeen . attribuuttype . kern . DatumTijdAttribuut . over24Uur ( ) ) ; final java . util . Set < java . lang . Long > actieIdsVoor = toekomstigeActieService . geefToekomstigeActieIdsPlusHuidigeHandeling ( eersteHandeling , persoonHisVolledig ) ; "<AssertPlaceHolder>" ; } size ( ) { return elementen . size ( ) ; }
org . junit . Assert . assertEquals ( 2 , actieIdsVoor . size ( ) )
getIpRuleSet ( ) { org . apache . usergrid . chop . stack . IpRuleSet set = org . apache . usergrid . chop . api . store . amazon . AmazonIpRuleManagerTest . manager . getIpRuleSet ( org . apache . usergrid . chop . api . store . amazon . AmazonIpRuleManagerTest . ipRuleSet . getName ( ) ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ! ( obj instanceof org . apache . usergrid . chop . stack . IpRuleSet ) ) { return false ; } org . apache . usergrid . chop . stack . IpRuleSet set = ( ( org . apache . usergrid . chop . stack . IpRuleSet ) ( obj ) ) ; if ( ( ( ! ( name . equals ( set . getName ( ) ) ) ) || ( ( inboundRules . size ( ) ) != ( set . getInboundRules ( ) . size ( ) ) ) ) || ( ( outboundRules . size ( ) ) != ( outboundRules . size ( ) ) ) ) { return false ; } for ( org . apache . usergrid . chop . stack . IpRule myRule : inboundRules ) { boolean exists = false ; for ( org . apache . usergrid . chop . stack . IpRule rule : set . getInboundRules ( ) ) { if ( myRule . equals ( rule ) ) { exists = true ; break ; } } if ( ! exists ) { return false ; } } return true ; }
org . junit . Assert . assertTrue ( org . apache . usergrid . chop . api . store . amazon . AmazonIpRuleManagerTest . ipRuleSet . equals ( set ) )
testBreakAtEnd ( ) { analyser . addInputResource ( "src/test/resources/java/refactoring/BreakAtEnd.java" ) ; analyser . run ( ) ; fr . inria . diverse . torgen . inspectorguidget . analyser . Command cmd = analyser . getCommands ( ) . values ( ) . stream ( ) . flatMap ( ( c ) -> c . getCommands ( ) . stream ( ) ) . collect ( java . util . stream . Collectors . toList ( ) ) . get ( 0 ) ; "<AssertPlaceHolder>" ; } getStatements ( ) { return actionStatements ; }
org . junit . Assert . assertEquals ( 1 , cmd . getStatements ( ) . size ( ) )
noSpuriousDecodes ( ) { java . lang . String string = "http://www.foo.com?a=1&num_rooms=1&children=0&int=VA&b=2" ; "<AssertPlaceHolder>" ; } unescape ( java . lang . String ) { return org . jsoup . nodes . Entities . unescape ( string , false ) ; }
org . junit . Assert . assertEquals ( string , org . jsoup . nodes . Entities . unescape ( string ) )
testEnabledCrlFromURLRevokedCertFails ( ) { org . codice . ddf . security . handler . pki . CrlChecker crlChecker = getConfiguredCrlChecker ( "encryption-crl-none.properties" ) ; java . lang . String urlPath = java . lang . ClassLoader . getSystemResource ( "crl-revoked.pem" ) . toString ( ) ; crlChecker . setCrlLocation ( urlPath ) ; java . lang . String certificateString = getRevokedCert ( ) ; java . security . cert . X509Certificate [ ] certs = extractX509CertsFromString ( certificateString ) ; "<AssertPlaceHolder>" ; } passesCrlCheck ( java . security . cert . X509Certificate [ ] ) { if ( ( org . codice . ddf . security . handler . pki . CrlChecker . crlCache . get ( ) ) == null ) { java . lang . String errorMsg = "CRL<sp>is<sp>not<sp>set.<sp>Skipping<sp>CRL<sp>check" ; org . codice . ddf . security . handler . pki . CrlChecker . LOGGER . trace ( errorMsg ) ; return true ; } org . codice . ddf . security . handler . pki . CrlChecker . LOGGER . trace ( "Checking<sp>request<sp>certs<sp>against<sp>CRL." ) ; return passesCrl ( certs ) ; }
org . junit . Assert . assertThat ( crlChecker . passesCrlCheck ( certs ) , org . hamcrest . Matchers . equalTo ( false ) )
testRemoveGroupFromRole ( ) { java . util . List < java . lang . String > assignedGroupsList = new java . util . ArrayList ( ) ; assignedGroupsList . add ( org . jbpm . workbench . cm . client . roles . CaseRolesPresenterTest . GROUP ) ; final org . jbpm . workbench . cm . model . CaseRoleAssignmentSummary roleAssignments = org . jbpm . workbench . cm . model . CaseRoleAssignmentSummary . builder ( ) . name ( org . jbpm . workbench . cm . client . roles . CaseRolesPresenterTest . CASE_ROLE ) . groups ( assignedGroupsList ) . build ( ) ; when ( view . getFilterValue ( ) ) . thenReturn ( "All" ) ; presenter . removeGroupFromRole ( org . jbpm . workbench . cm . client . roles . CaseRolesPresenterTest . GROUP , roleAssignments ) ; verify ( caseManagementService ) . removeGroupFromRole ( anyString ( ) , anyString ( ) , eq ( org . jbpm . workbench . cm . client . roles . CaseRolesPresenterTest . CASE_ROLE ) , eq ( org . jbpm . workbench . cm . client . roles . CaseRolesPresenterTest . GROUP ) ) ; "<AssertPlaceHolder>" ; verify ( presenter ) . filterCaseRoles ( ) ; } getGroups ( ) { return actionGroupsInput . getValue ( ) ; }
org . junit . Assert . assertTrue ( roleAssignments . getGroups ( ) . isEmpty ( ) )
testAttachment ( ) { System . out . println ( "attachment" ) ; ihe . iti . xds_b . _2007 . ProvideAndRegisterDocumentSetRequestType . Document doc = null ; gov . hhs . fha . nhinc . direct . MimeMessageBuilder instance = new gov . hhs . fha . nhinc . direct . MimeMessageBuilder ( null , null , null ) ; gov . hhs . fha . nhinc . direct . MimeMessageBuilder result = instance . attachment ( doc ) ; "<AssertPlaceHolder>" ; } attachment ( ihe . iti . xds_b . _2007 . ProvideAndRegisterDocumentSetRequestType . Document ) { attachment = doc ; return this ; }
org . junit . Assert . assertTrue ( ( result instanceof gov . hhs . fha . nhinc . direct . MimeMessageBuilder ) )
testMidKeyEmpty ( ) { org . apache . hadoop . fs . Path dirName = new org . apache . hadoop . fs . Path ( org . apache . hadoop . io . TestMapFile . TEST_DIR , "testMidKeyEmpty.mapfile" ) ; org . apache . hadoop . fs . FileSystem fs = org . apache . hadoop . fs . FileSystem . getLocal ( org . apache . hadoop . io . TestMapFile . conf ) ; org . apache . hadoop . fs . Path qualifiedDirName = fs . makeQualified ( dirName ) ; org . apache . hadoop . io . MapFile . Writer writer = new org . apache . hadoop . io . MapFile . Writer ( org . apache . hadoop . io . TestMapFile . conf , fs , qualifiedDirName . toString ( ) , org . apache . hadoop . io . IntWritable . class , org . apache . hadoop . io . IntWritable . class ) ; writer . close ( ) ; org . apache . hadoop . io . MapFile . Reader reader = new org . apache . hadoop . io . MapFile . Reader ( qualifiedDirName , org . apache . hadoop . io . TestMapFile . conf ) ; try { "<AssertPlaceHolder>" ; } finally { reader . close ( ) ; } } midKey ( ) { readIndex ( ) ; if ( ( count ) == 0 ) { return null ; } return keys [ ( ( ( count ) - 1 ) / 2 ) ] ; }
org . junit . Assert . assertEquals ( null , reader . midKey ( ) )
testMergeSingle ( ) { java . util . List < com . splicemachine . orc . DiskRange > diskRanges = com . splicemachine . orc . OrcDataSourceUtils . mergeAdjacentDiskRanges ( com . google . common . collect . ImmutableList . of ( new com . splicemachine . orc . DiskRange ( 100 , 100 ) ) , new io . airlift . units . DataSize ( 0 , io . airlift . units . DataSize . Unit . BYTE ) , new io . airlift . units . DataSize ( 0 , io . airlift . units . DataSize . Unit . BYTE ) ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( diskRanges , com . google . common . collect . ImmutableList . of ( new com . splicemachine . orc . DiskRange ( 100 , 100 ) ) )