input
stringlengths
28
18.7k
output
stringlengths
39
1.69k
testSetPrimitiveType ( ) { p1 . setPrimitiveType ( "test" ) ; "<AssertPlaceHolder>" ; } getPrimitiveType ( ) { return this . primitiveType ; }
org . junit . Assert . assertEquals ( "test" , p1 . getPrimitiveType ( ) )
testEvalAddSelf ( ) { org . nd4j . autodiff . samediff . SameDiff sameDiff = org . nd4j . autodiff . samediff . SameDiff . create ( ) ; org . nd4j . linalg . api . ndarray . INDArray arr = org . nd4j . linalg . factory . Nd4j . linspace ( 1 , 4 , 4 ) ; org . nd4j . autodiff . samediff . SDVariable x = sameDiff . var ( "x" , arr ) ; org . nd4j . autodiff . samediff . SDVariable s = x . mul ( "s" , x ) ; org . nd4j . linalg . api . ndarray . INDArray assertion = arr . mul ( arr ) ; org . nd4j . linalg . api . ndarray . INDArray eval = sameDiff . exec ( org . nd4j . autodiff . samediff . Collections . singletonMap ( "x" , arr ) , org . nd4j . autodiff . samediff . Collections . singletonList ( "s" ) ) . get ( "s" ) ; "<AssertPlaceHolder>" ; } get ( org . apache . spark . api . java . JavaSparkContext ) { if ( ( ( org . datavec . spark . util . BroadcastHadoopConfigHolder . config ) != null ) && ( ( ! ( org . datavec . spark . util . BroadcastHadoopConfigHolder . config . isValid ( ) ) ) || ( ( sc . startTime ( ) ) != ( org . datavec . spark . util . BroadcastHadoopConfigHolder . sparkContextStartTime ) ) ) ) { org . datavec . spark . util . BroadcastHadoopConfigHolder . config = null ; } if ( ( org . datavec . spark . util . BroadcastHadoopConfigHolder . config ) != null ) { return org . datavec . spark . util . BroadcastHadoopConfigHolder . config ; } synchronized ( org . datavec . spark . util . BroadcastHadoopConfigHolder . class ) { if ( ( org . datavec . spark . util . BroadcastHadoopConfigHolder . config ) == null ) { org . datavec . spark . util . BroadcastHadoopConfigHolder . config = sc . broadcast ( new org . datavec . spark . util . SerializableHadoopConfig ( sc . hadoopConfiguration ( ) ) ) ; org . datavec . spark . util . BroadcastHadoopConfigHolder . sparkContextStartTime = sc . startTime ( ) ; } } return org . datavec . spark . util . BroadcastHadoopConfigHolder . config ; }
org . junit . Assert . assertEquals ( assertion , eval )
testUserExceptionSupport1 ( ) { org . openl . rules . testmethod . TestmethodTest . ITest instance = org . openl . rules . TestUtils . create ( org . openl . rules . testmethod . TestmethodTest . FILE_NAME , org . openl . rules . testmethod . TestmethodTest . ITest . class ) ; org . openl . rules . testmethod . TestUnitsResults result = instance . driverRiskTest1 ( ) ; "<AssertPlaceHolder>" ; } getNumberOfFailures ( ) { int cnt = 0 ; for ( int i = 0 ; i < ( getNumberOfTestUnits ( ) ) ; i ++ ) { if ( ( testUnits . get ( i ) . getResultStatus ( ) ) != ( TestStatus . TR_OK ) ) { ++ cnt ; } } return cnt ; }
org . junit . Assert . assertEquals ( 0 , result . getNumberOfFailures ( ) )
testValidateListBadSubscription ( ) { java . util . List < tigase . xml . Element > items = new java . util . ArrayList < tigase . xml . Element > ( ) ; tigase . xmpp . impl . Authorization result = null ; items . add ( new tigase . xml . Element ( "item" , new java . lang . String [ ] { "type" , "value" , "action" , "order" } , new java . lang . String [ ] { "subscription" , "or" , "item" 0 , "10" } ) ) ; items . add ( new tigase . xml . Element ( "item" , new java . lang . String [ ] { "action" , "order" } , new java . lang . String [ ] { "deny" , "15" } ) ) ; result = tigase . xmpp . impl . JabberIqPrivacy . validateList ( null , items ) ; "<AssertPlaceHolder>" ; } validateList ( tigase . xmpp . impl . XMPPResourceConnection , tigase . xmpp . impl . List ) { tigase . xmpp . impl . Authorization result = null ; try { tigase . xmpp . impl . HashSet < java . lang . Integer > orderSet = new tigase . xmpp . impl . HashSet < java . lang . Integer > ( ) ; tigase . xmpp . impl . HashSet < java . lang . String > groups = new tigase . xmpp . impl . HashSet < java . lang . String > ( ) ; if ( session != null ) { tigase . xmpp . impl . JID [ ] jids = tigase . xmpp . impl . JabberIqPrivacy . roster_util . getBuddies ( session ) ; if ( jids != null ) { for ( tigase . xmpp . impl . JID jid : jids ) { java . lang . String [ ] buddyGroups = tigase . xmpp . impl . JabberIqPrivacy . roster_util . getBuddyGroups ( session , jid ) ; if ( buddyGroups != null ) { for ( java . lang . String group : buddyGroups ) { groups . add ( group ) ; } } } } } for ( tigase . xml . Element item : items ) { tigase . xmpp . impl . JabberIqPrivacy . ITEM_TYPE type = tigase . xmpp . impl . JabberIqPrivacy . ITEM_TYPE . all ; if ( ( item . getAttributeStaticStr ( tigase . xmpp . impl . TYPE ) ) != null ) { type = tigase . xmpp . impl . JabberIqPrivacy . ITEM_TYPE . valueOf ( item . getAttributeStaticStr ( tigase . xmpp . impl . TYPE ) ) ; } java . lang . String value = item . getAttributeStaticStr ( tigase . xmpp . impl . VALUE ) ; switch ( type ) { case jid : tigase . xmpp . impl . JID . jidInstance ( value ) ; break ; case group : boolean matched = groups . contains ( value ) ; if ( ! matched ) { result = Authorization . ITEM_NOT_FOUND ; } break ; case subscription : tigase . xmpp . impl . JabberIqPrivacy . ITEM_SUBSCRIPTIONS . valueOf ( value ) ; break ; case all : default : break ; } if ( result != null ) { break ; } tigase . xmpp . impl . JabberIqPrivacy . ITEM_ACTION . valueOf ( item . getAttributeStaticStr ( tigase . xmpp . impl . ACTION ) ) ; java . lang . Integer order = java . lang . Integer . parseInt ( item . getAttributeStaticStr ( tigase . xmpp . impl . ORDER ) ) ; if ( ( ( order == null ) || ( order < 0 ) ) || ( ! ( orderSet . add ( order ) ) ) ) { result = Authorization . BAD_REQUEST ; } if ( result != null ) { break ; } } } catch ( java . lang . Exception ex ) { result = Authorization . BAD_REQUEST ; } return result ; }
org . junit . Assert . assertEquals ( Authorization . BAD_REQUEST , result )
shouldPrioritiseLargestFirst ( ) { final org . pitest . mutationtest . build . MutationAnalysisUnit a = unit ( 1 ) ; final org . pitest . mutationtest . build . MutationAnalysisUnit b = unit ( 2 ) ; final org . pitest . mutationtest . build . MutationAnalysisUnit c = unit ( 3 ) ; final java . util . List < org . pitest . mutationtest . build . MutationAnalysisUnit > actual = java . util . Arrays . asList ( a , b , c ) ; java . util . Collections . sort ( actual , this . testee ) ; "<AssertPlaceHolder>" ; } unit ( int ) { return new org . pitest . mutationtest . build . MutationAnalysisUnit ( ) { @ org . pitest . mutationtest . build . Override public int priority ( ) { return count ; } @ org . pitest . mutationtest . build . Override public java . lang . String toString ( ) { return "" + count ; } @ org . pitest . mutationtest . build . Override public org . pitest . mutationtest . MutationMetaData call ( ) throws org . pitest . mutationtest . build . Exception { return null ; } } ; }
org . junit . Assert . assertEquals ( java . util . Arrays . asList ( c , b , a ) , actual )
testNestedUserQueueParsing ( ) { java . lang . StringBuffer sb = new java . lang . StringBuffer ( ) ; sb . append ( "<queuePlacementPolicy>" ) ; sb . append ( "<sp><rule<sp>name='specified'<sp>/>" ) ; sb . append ( "<sp><rule<sp>name='nestedUserQueue'>" ) ; sb . append ( "<sp><rule<sp>name='primaryGroup'/>" ) ; sb . append ( "<sp></rule>" ) ; sb . append ( "<sp><rule<sp>name='default'<sp>/>" ) ; sb . append ( "</queuePlacementPolicy>" ) ; java . lang . Throwable th = null ; try { parse ( sb . toString ( ) ) ; } catch ( java . lang . Exception e ) { th = e ; } "<AssertPlaceHolder>" ; } toString ( ) { if ( ( json ) == null ) { return "Test<sp>codec<sp>" + ( id ) ; } else { return json . toString ( ) ; } }
org . junit . Assert . assertNull ( th )
tesNegativeInfinity ( ) { org . apache . commons . math3 . geometry . euclidean . twod . Vector2D c = Vector2D . NEGATIVE_INFINITY ; java . lang . String expected = "{(-Infinity);<sp>(-Infinity)}" ; java . lang . String actual = vector2DFormat . format ( c ) ; "<AssertPlaceHolder>" ; } format ( java . lang . Object [ ] ) { return format . format ( arguments ) ; }
org . junit . Assert . assertEquals ( expected , actual )
dispatchVServerManualOperation ( ) { paramHandler . setVserverType ( "VSERVER_TYPE" ) ; org . oscm . app . iaas . data . FlowState newState = null ; setParameters ( ) ; doReturn ( Boolean . FALSE ) . when ( vServerProcessor ) . checkNextStatus ( "controllerId" , "instanceId" , FlowState . FINISHED , paramHandler ) ; newState = vServerProcessor . dispatchVServerManualOperation ( "controllerId" , "instanceId" , paramHandler , "mail" ) ; "<AssertPlaceHolder>" ; } dispatchVServerManualOperation ( java . lang . String , java . lang . String , org . oscm . app . iaas . PropertyHandler , java . lang . String ) { java . lang . String subscriptionId = paramHandler . getSettings ( ) . getOriginalSubscriptionId ( ) ; java . lang . String locale = getTechnicalProviderLocale ( controllerId , paramHandler ) ; if ( Operation . VSERVER_CREATION . equals ( paramHandler . getOperation ( ) ) ) { if ( checkNextStatus ( controllerId , instanceId , FlowState . MANUAL , paramHandler ) ) { java . lang . StringBuffer eventLink = new java . lang . StringBuffer ( platformService . getEventServiceUrl ( ) ) ; eventLink . append ( "?sid=" ) . append ( java . net . URLEncoder . encode ( instanceId , "mail_VSERVER_VDISK_CREATION_manual_modification.subject" 0 ) ) ; eventLink . append ( "&cid=" ) . append ( controllerId ) ; eventLink . append ( "&command=finish" ) ; java . lang . String subject = org . oscm . app . iaas . i18n . Messages . get ( locale , "mail_VSERVER_manual_completion.subject" , instanceId , subscriptionId ) ; java . lang . String details = paramHandler . getConfigurationAsString ( ) ; java . lang . String text = org . oscm . app . iaas . i18n . Messages . get ( locale , "mail_VSERVER_manual_completion.text" , instanceId , subscriptionId , details , eventLink . toString ( ) ) ; platformService . sendMail ( java . util . Collections . singletonList ( mail ) , subject , text ) ; return org . oscm . app . iaas . data . FlowState . MANUAL ; } } else if ( Operation . VSERVER_MODIFICATION . equals ( paramHandler . getOperation ( ) ) ) { if ( checkNextStatus ( controllerId , instanceId , FlowState . FINISHED , paramHandler ) ) { java . lang . String subject = org . oscm . app . iaas . i18n . Messages . get ( locale , "mail_VSERVER_VDISK_CREATION_manual_modification.subject" 1 , instanceId , subscriptionId ) ; java . lang . String details = paramHandler . getConfigurationAsString ( ) ; java . lang . String text = org . oscm . app . iaas . i18n . Messages . get ( locale , "mail_VSERVER_manual_modification.text" , instanceId , subscriptionId , details ) ; platformService . sendMail ( java . util . Collections . singletonList ( mail ) , subject , text ) ; return org . oscm . app . iaas . data . FlowState . FINISHED ; } } else if ( Operation . VSERVER_MODIFICATION_VDISK_CREATION . equals ( paramHandler . getOperation ( ) ) ) { if ( checkNextStatus ( controllerId , instanceId , FlowState . FINISHED , paramHandler ) ) { java . lang . String subject = org . oscm . app . iaas . i18n . Messages . get ( locale , "mail_VSERVER_VDISK_CREATION_manual_modification.subject" , instanceId , subscriptionId ) ; java . lang . String details = paramHandler . getConfigurationAsString ( ) ; java . lang . String text = org . oscm . app . iaas . i18n . Messages . get ( locale , "mail_VSERVER_VDISK_CREATION_manual_modification.text" , instanceId , subscriptionId , details ) ; platformService . sendMail ( java . util . Collections . singletonList ( mail ) , subject , text ) ; return org . oscm . app . iaas . data . FlowState . FINISHED ; } } else if ( Operation . VSERVER_MODIFICATION_VDISK_DELETION . equals ( paramHandler . getOperation ( ) ) ) { if ( checkNextStatus ( controllerId , instanceId , FlowState . FINISHED , paramHandler ) ) { java . lang . String subject = org . oscm . app . iaas . i18n . Messages . get ( locale , "mail_VSERVER_VDISK_DELETION_manual_modification.subject" , instanceId , subscriptionId ) ; java . lang . String details = paramHandler . getConfigurationAsString ( ) ; java . lang . String text = org . oscm . app . iaas . i18n . Messages . get ( locale , "mail_VSERVER_VDISK_DELETION_manual_modification.text" , instanceId , subscriptionId , details ) ; platformService . sendMail ( java . util . Collections . singletonList ( mail ) , subject , text ) ; return org . oscm . app . iaas . data . FlowState . FINISHED ; } } else if ( checkNextStatus ( controllerId , instanceId , FlowState . FINISHED , paramHandler ) ) { return org . oscm . app . iaas . data . FlowState . FINISHED ; } return null ; }
org . junit . Assert . assertNull ( newState )
testGetPageConfigurationIsNullForNonExistentPage ( ) { 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 ) . setTopLevel ( true ) ; configuration . addPageConfiguration ( pageConfiguration ) ; com . eclipsesource . tabris . internal . ui . UIDescriptor uiDescriptor = configuration . getAdapter ( com . eclipsesource . tabris . internal . ui . UIDescriptor . class ) ; com . eclipsesource . tabris . internal . ui . Controller controller = new com . eclipsesource . tabris . internal . ui . Controller ( new com . eclipsesource . tabris . internal . ui . RemoteUI ( shell ) , uiDescriptor ) ; com . eclipsesource . tabris . internal . ui . UIImpl ui = new com . eclipsesource . tabris . internal . ui . UIImpl ( shell . getDisplay ( ) , controller , configuration ) ; controller . setUI ( ui ) ; controller . createRootPages ( ui ) ; controller . createGlobalActions ( ui ) ; com . eclipsesource . tabris . ui . PageConfiguration actualConfiguration = controller . getPageConfiguration ( mock ( com . eclipsesource . tabris . ui . Page . class ) ) ; "<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 . assertNull ( actualConfiguration )
whenAddValueShouldGetItFRomList ( ) { ru . szhernovoy . generic . SimpleArray < java . lang . Integer > simple = new ru . szhernovoy . generic . SimpleArray < java . lang . Integer > ( 3 ) ; simple . add ( 1 ) ; simple . add ( 2 ) ; simple . add ( 3 ) ; int result = simple . get ( 1 ) ; "<AssertPlaceHolder>" ; } get ( java . lang . String ) { java . lang . String text = null ; if ( this . cache . containsKey ( key ) ) { text = this . cache . get ( key ) . get ( ) ; if ( text == null ) { addValueInCache ( key ) ; } } else { addValueInCache ( key ) ; text = this . cache . get ( key ) . get ( ) ; } return text ; }
org . junit . Assert . assertThat ( result , org . hamcrest . core . Is . is ( 2 ) )
isNumberOfNewViolationsInExportedXmlDocumentCorrect ( ) { int numberOfNewViolationsInReport = husaccttest . validate . SACCandSRMAtest . violationReport . getNrOfNewViolations ( ) ; int numberOfNewViolationsInXML = countNumberOfViolationsInExportedXmlDocument ( husaccttest . validate . SACCandSRMAtest . violationReport . getExportDocNewViolations ( ) ) ; "<AssertPlaceHolder>" ; } getExportDocNewViolations ( ) { return exportDocNewViolations ; }
org . junit . Assert . assertTrue ( ( numberOfNewViolationsInXML == numberOfNewViolationsInReport ) )
testConvolutionMode ( ) { for ( weka . dl4j . ConvolutionMode mode : weka . dl4j . ConvolutionMode . values ( ) ) { getApiWrapper ( ) ; wrapper . setConvolutionMode ( mode ) ; "<AssertPlaceHolder>" ; } } getConvolutionMode ( ) { return weka . dl4j . ConvolutionMode . fromBackend ( backend . getConvolutionMode ( ) ) ; }
org . junit . Assert . assertEquals ( mode , wrapper . getConvolutionMode ( ) )
plControleBijhoudingsPartijGelijkNok ( ) { final nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijst dbPersoonslijst = new nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijstBuilder ( ) . build ( ) ; setup ( java . util . Collections . singletonList ( dbPersoonslijst ) , java . util . Collections . singletonList ( dbPersoonslijst ) , true , true , true , false , true , true , true , true , true , true , true , true ) ; "<AssertPlaceHolder>" ; } setup ( java . util . List , java . util . List , boolean , boolean , boolean , boolean , boolean , boolean , boolean , boolean , boolean , boolean , boolean , boolean ) { org . mockito . Mockito . when ( plZoekerObvActueelAnummer . zoek ( org . mockito . Matchers . any ( nl . bzk . migratiebrp . synchronisatie . runtime . service . synchronisatie . verwerker . context . VerwerkingsContext . class ) ) ) . thenReturn ( plZoekerObvActueelAnummerResult ) ; org . mockito . Mockito . when ( plZoekerObvActueelBsn . zoek ( org . mockito . Matchers . any ( nl . bzk . migratiebrp . synchronisatie . runtime . service . synchronisatie . verwerker . context . VerwerkingsContext . class ) ) ) . thenReturn ( plZoekerObvActueelBsnResult ) ; org . mockito . Mockito . when ( lijstControleEen . controleer ( org . mockito . Matchers . anyListOf ( nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijst . class ) ) ) . thenReturn ( lijstControleEenResult ) ; org . mockito . Mockito . when ( plControleGevondenBlokkeringssituatieIsJuist . controleer ( org . mockito . Matchers . any ( nl . bzk . migratiebrp . synchronisatie . runtime . service . synchronisatie . verwerker . context . VerwerkingsContext . class ) , org . mockito . Matchers . any ( nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijst . class ) ) ) . thenReturn ( resultControleBijhoudingssituatie ) ; org . mockito . Mockito . when ( plControleBijhoudingsPartijGelijkVerzendendeGemeente . controleer ( org . mockito . Matchers . any ( nl . bzk . migratiebrp . synchronisatie . runtime . service . synchronisatie . verwerker . context . VerwerkingsContext . class ) , org . mockito . Matchers . any ( nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijst . class ) ) ) . thenReturn ( resultControleVerzendendeGemeente ) ; org . mockito . Mockito . when ( plControleBijhoudingsPartijOngelijk . controleer ( org . mockito . Matchers . any ( nl . bzk . migratiebrp . synchronisatie . runtime . service . synchronisatie . verwerker . context . VerwerkingsContext . class ) , org . mockito . Matchers . any ( nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijst . class ) ) ) . thenReturn ( plControleBijhoudingsPartijOngelijkResult ) ; org . mockito . Mockito . when ( plControleBijhoudingsPartijOngelijkRni . controleer ( org . mockito . Matchers . any ( nl . bzk . migratiebrp . synchronisatie . runtime . service . synchronisatie . verwerker . context . VerwerkingsContext . class ) , org . mockito . Matchers . any ( nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijst . class ) ) ) . thenReturn ( true ) ; org . mockito . Mockito . when ( plControleVorigAnummerGelijk . controleer ( org . mockito . Matchers . any ( nl . bzk . migratiebrp . synchronisatie . runtime . service . synchronisatie . verwerker . context . VerwerkingsContext . class ) , org . mockito . Matchers . any ( nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijst . class ) ) ) . thenReturn ( plControleVorigAnummerGelijkResult ) ; org . mockito . Mockito . when ( plControleHistorieAnummerGelijk . controleer ( org . mockito . Matchers . any ( nl . bzk . migratiebrp . synchronisatie . runtime . service . synchronisatie . verwerker . context . VerwerkingsContext . class ) , org . mockito . Matchers . any ( nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijst . class ) ) ) . thenReturn ( plControleHistorieAnummerGelijkResult ) ; org . mockito . Mockito . when ( plControleDezelfdePersoon . controleer ( org . mockito . Matchers . any ( nl . bzk . migratiebrp . synchronisatie . runtime . service . synchronisatie . verwerker . context . VerwerkingsContext . class ) , org . mockito . Matchers . any ( nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijst . class ) ) ) . thenReturn ( plControleDezelfdePersoonResult ) ; org . mockito . Mockito . when ( plControleActueelBsnGelijk . controleer ( org . mockito . Matchers . any ( nl . bzk . migratiebrp . synchronisatie . runtime . service . synchronisatie . verwerker . context . VerwerkingsContext . class ) , org . mockito . Matchers . any ( nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijst . class ) ) ) . thenReturn ( plControleActueelBsnGelijkResult ) ; org . mockito . Mockito . when ( lijstControleGeen . controleer ( org . mockito . Matchers . anyListOf ( nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijst . class ) ) ) . thenReturn ( lijstControleGeenResult ) ; org . mockito . Mockito . when ( plControleGevondenAdressenKomenVoorInHistorieAangebodenAdressen . controleer ( org . mockito . Matchers . any ( nl . bzk . migratiebrp . synchronisatie . runtime . service . synchronisatie . verwerker . context . VerwerkingsContext . class ) , org . mockito . Matchers . any ( nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijst . class ) ) ) . thenReturn ( plControleGevondenAdressenKomenVoorInHistorieAangebodenAdressenResult ) ; org . mockito . Mockito
org . junit . Assert . assertFalse ( subject . controleer ( new nl . bzk . migratiebrp . synchronisatie . runtime . service . synchronisatie . verwerker . context . VerwerkingsContext ( null , null , null , null ) ) )
Test ( ) { subject . refreshRegister ( ) ; "<AssertPlaceHolder>" ; } geefRegister ( ) { return register ; }
org . junit . Assert . assertNotNull ( subject . geefRegister ( ) )
testTimeout ( ) { java . io . File testFile = newTestFile ( ) ; org . eclipse . tycho . locking . facade . FileLocker locker = subject . getFileLocker ( testFile ) ; long waitTime = 1000L ; org . eclipse . tycho . core . locking . LockProcess lockProcess = new org . eclipse . tycho . core . locking . LockProcess ( testFile , waitTime ) ; long start = java . lang . System . currentTimeMillis ( ) ; lockProcess . lockFileInForkedProcess ( ) ; locker . lock ( 20000L ) ; try { long duration = ( java . lang . System . currentTimeMillis ( ) ) - start ; "<AssertPlaceHolder>" ; } finally { lockProcess . cleanup ( ) ; locker . release ( ) ; } } lock ( long ) { if ( timeout < 0 ) { throw new java . lang . IllegalArgumentException ( "timeout<sp>must<sp>not<sp>be<sp>negative" ) ; } boolean success = false ; final long waitInterval = 50L ; long maxTries = ( timeout / waitInterval ) + 1 ; java . io . IOException ioException = null ; for ( long i = 0 ; i < maxTries ; i ++ ) { ioException = null ; try { success = lockFileLocation . lock ( ) ; } catch ( java . io . IOException ioe ) { ioException = ioe ; } if ( success ) { return ; } try { java . lang . Thread . sleep ( waitInterval ) ; } catch ( java . lang . InterruptedException e ) { } } java . lang . String message = ( ( ( "lock<sp>timeout:<sp>Could<sp>not<sp>acquire<sp>lock<sp>on<sp>file<sp>" + ( lockFileLocation . getURL ( ) ) ) + "<sp>for<sp>" ) + timeout ) + "<sp>msec" ; if ( ioException != null ) { throw new org . eclipse . tycho . locking . facade . LockTimeoutException ( message , ioException ) ; } else { throw new org . eclipse . tycho . locking . facade . LockTimeoutException ( message ) ; } }
org . junit . Assert . assertTrue ( ( duration >= waitTime ) )
test2 ( ) { java . io . InputStream in = new org . apache . commons . io . input . ClosedInputStream ( ) ; int b = in . read ( ) ; "<AssertPlaceHolder>" ; } read ( ) { while ( true ) { try { return buffer . take ( ) ; } catch ( java . lang . InterruptedException e ) { if ( interruptible ) throw new java . io . InterruptedIOException ( e . getMessage ( ) ) ; else java . lang . Thread . currentThread ( ) . interrupt ( ) ; } } }
org . junit . Assert . assertEquals ( ( - 1 ) , b )
testEquals ( ) { System . out . println ( "equals" ) ; int i = 0 ; for ( org . poker . api . core . Card card0 : org . poker . api . core . Deck . getAllCards ( ) ) { int j = 0 ; for ( org . poker . api . core . Card card1 : org . poker . api . core . Deck . getAllCards ( ) ) { if ( i == j ) { "<AssertPlaceHolder>" ; } j ++ ; } i ++ ; } } getAllCards ( ) { int numCards = ( Card . Suit . values ( ) . length ) * ( Card . Rank . values ( ) . length ) ; java . util . List < org . poker . api . core . Card > result = new java . util . ArrayList ( numCards ) ; for ( org . poker . api . core . Card . Suit suit : Card . Suit . values ( ) ) { for ( org . poker . api . core . Card . Rank rank : Card . Rank . values ( ) ) { result . add ( new org . poker . api . core . Card ( suit , rank ) ) ; } } return result ; }
org . junit . Assert . assertEquals ( card0 , card1 )
testNotFirstGetPublishAdditionUris ( ) { com . ewcms . core . site . model . Site site = new com . ewcms . core . site . model . Site ( ) ; com . ewcms . core . site . model . Channel channel = new com . ewcms . core . site . model . Channel ( ) ; com . ewcms . publication . freemarker . generator . ListGenerator generator = new com . ewcms . publication . freemarker . generator . ListGenerator ( new freemarker . template . Configuration ( ) , site , channel , com . ewcms . publication . uri . UriRules . newList ( ) , 1 , 200 , true ) { @ com . ewcms . publication . freemarker . generator . Override public java . lang . String getPublishUri ( ) throws com . ewcms . publication . PublishException { return "/test/0.html" ; } } ; java . lang . String [ ] additionUris = generator . getPublishAdditionUris ( ) ; "<AssertPlaceHolder>" ; } getPublishAdditionUris ( ) { java . lang . String [ ] additionUris = new java . lang . String [ 0 ] ; if ( ( createHome ) && ( ( pageNumber ) == 0 ) ) { com . ewcms . publication . freemarker . generator . ListGenerator . logger . debug ( "Start<sp>create<sp>home<sp>uri" ) ; java . lang . String uri = getPublishUri ( ) ; com . ewcms . publication . freemarker . generator . ListGenerator . logger . debug ( "List<sp>page<sp>first<sp>uri<sp>is<sp>{}" , uri ) ; java . lang . String extension = org . apache . commons . io . FilenameUtils . getExtension ( uri ) ; if ( org . apache . commons . lang . StringUtils . isNotBlank ( extension ) ) { extension = "." + extension ; } java . lang . String homeUri = ( ( org . apache . commons . io . FilenameUtils . getFullPath ( uri ) ) + ( com . ewcms . publication . freemarker . generator . ListGenerator . DEFAULT_HOME_NAME ) ) + extension ; additionUris = new java . lang . String [ ] { homeUri } ; com . ewcms . publication . freemarker . generator . ListGenerator . logger . debug ( "Home<sp>page<sp>uri<sp>is<sp>{}" , additionUris [ 0 ] ) ; } return additionUris ; }
org . junit . Assert . assertEquals ( additionUris . length , 0 )
smokeTest ( ) { com . google . firebase . database . snapshot . Node node = NodeFromJSON ( com . google . firebase . database . TestHelpers . fromSingleQuotedString ( ( "{'bar':<sp>'bar-value',<sp>'foo':<sp>{<sp>'a':<sp>{'deep-a-1':<sp>1,<sp>'deep-a-2':2},<sp>'b':<sp>'b',<sp>" + "'c':<sp>'c',<sp>'d':<sp>'d'},<sp>'quu':<sp>'quu-value'}" ) ) ) ; com . google . firebase . database . snapshot . Node update = NodeFromJSON ( com . google . firebase . database . TestHelpers . fromSingleQuotedString ( ( "{'foo':<sp>{<sp>'a':<sp>{'deep-a-2':'new-a-2',<sp>'deep-a-3':3},<sp>'b-2':<sp>'new-b',<sp>'c':<sp>" + "'new-c'<sp>}}" ) ) ) ; com . google . firebase . database . snapshot . RangeMerge merge = new com . google . firebase . database . snapshot . RangeMerge ( com . google . firebase . database . TestHelpers . path ( "foo/a/deep-a-1" ) , com . google . firebase . database . TestHelpers . path ( "foo/c" ) , update ) ; com . google . firebase . database . snapshot . Node actual = merge . applyTo ( node ) ; com . google . firebase . database . snapshot . Node expected = NodeFromJSON ( com . google . firebase . database . TestHelpers . fromSingleQuotedString ( ( "{'bar':<sp>'bar-value',<sp>'foo':<sp>{<sp>'a':<sp>{'deep-a-1':<sp>1,<sp>'deep-a-2':'new-a-2',<sp>" + ( "'deep-a-3':3},<sp>'b-2':<sp>'new-b',<sp>'c':<sp>'new-c',<sp>'d':<sp>'d'},<sp>" + "'quu':<sp>'quu-value'}" ) ) ) ) ; "<AssertPlaceHolder>" ; } fromSingleQuotedString ( java . lang . String ) { return com . google . firebase . database . TestHelpers . fromJsonString ( json . replace ( "'" , "\"" ) ) ; }
org . junit . Assert . assertEquals ( expected , actual )
testEnumString ( ) { java . lang . Class < com . j256 . ormlite . field . types . EnumStringTypeTest . LocalEnumString > clazz = com . j256 . ormlite . field . types . EnumStringTypeTest . LocalEnumString . class ; com . j256 . ormlite . dao . Dao < com . j256 . ormlite . field . types . EnumStringTypeTest . LocalEnumString , java . lang . Object > dao = createDao ( clazz , true ) ; com . j256 . ormlite . field . types . EnumStringTypeTest . OurEnum val = com . j256 . ormlite . field . types . EnumStringTypeTest . OurEnum . SECOND ; java . lang . String valStr = val . toString ( ) ; java . lang . String sqlVal = valStr ; com . j256 . ormlite . field . types . EnumStringTypeTest . LocalEnumString foo = new com . j256 . ormlite . field . types . EnumStringTypeTest . LocalEnumString ( ) ; foo . ourEnum = val ; "<AssertPlaceHolder>" ; testType ( dao , foo , clazz , val , sqlVal , sqlVal , valStr , DataType . ENUM_STRING , com . j256 . ormlite . field . types . EnumStringTypeTest . ENUM_COLUMN , false , true , true , false , false , false , true , false ) ; } create ( T ) { checkForInitialized ( ) ; if ( data == null ) { return 0 ; } if ( data instanceof com . j256 . ormlite . misc . BaseDaoEnabled ) { @ com . j256 . ormlite . dao . SuppressWarnings ( "unchecked" ) com . j256 . ormlite . misc . BaseDaoEnabled < T , ID > daoEnabled = ( ( com . j256 . ormlite . misc . BaseDaoEnabled < T , ID > ) ( data ) ) ; daoEnabled . setDao ( this ) ; } com . j256 . ormlite . support . DatabaseConnection connection = connectionSource . getReadWriteConnection ( tableInfo . getTableName ( ) ) ; try { return statementExecutor . create ( connection , data , objectCache ) ; } finally { connectionSource . releaseConnection ( connection ) ; } }
org . junit . Assert . assertEquals ( 1 , dao . create ( foo ) )
testInstantiateNewRow ( ) { System . out . println ( "instantiateNewRow" ) ; int rowType = 0 ; kg . apc . charting . AbstractGraphRow result = kg . apc . charting . AbstractGraphRow . instantiateNewRow ( rowType ) ; "<AssertPlaceHolder>" ; } println ( java . lang . String ) { kg . apc . jmeter . reporters . ConsoleStatusLogger . log . info ( msg ) ; }
org . junit . Assert . assertNotNull ( result )
test1 ( ) { com . creactiviti . piper . core . MapObject mo = new com . creactiviti . piper . core . MapObject ( java . util . Collections . singletonMap ( "hello" , "world" ) ) { } ; "<AssertPlaceHolder>" ; } getString ( java . lang . Object ) { java . lang . Object value = get ( aKey ) ; return org . apache . commons . beanutils . ConvertUtils . convert ( value ) ; }
org . junit . Assert . assertEquals ( "world" , mo . getString ( "hello" ) )
testServerWithActualServerObj ( ) { boolean status = true ; org . apache . servicecomb . loadbalance . SessionStickinessRule ss = new org . apache . servicecomb . loadbalance . SessionStickinessRule ( ) ; org . apache . servicecomb . core . Invocation invocation = mock ( org . apache . servicecomb . core . Invocation . class ) ; org . apache . servicecomb . loadbalance . ServiceCombServer server = mock ( org . apache . servicecomb . loadbalance . ServiceCombServer . class ) ; java . util . List < org . apache . servicecomb . loadbalance . ServiceCombServer > servers = new java . util . ArrayList ( ) ; servers . add ( server ) ; mockit . Deencapsulation . setField ( ss , "lastServer" , server ) ; try { ss . choose ( servers , invocation ) ; } catch ( java . lang . Exception e ) { status = false ; } "<AssertPlaceHolder>" ; } choose ( java . util . List , org . apache . servicecomb . core . Invocation ) { if ( ( lastServer ) == null ) { return chooseInitialServer ( servers , invocation ) ; } if ( isTimeOut ( ) ) { org . apache . servicecomb . loadbalance . SessionStickinessRule . LOG . warn ( "session<sp>timeout.<sp>choose<sp>another<sp>server." ) ; return chooseServerWhenTimeout ( servers , invocation ) ; } else { this . lastAccessedTime = java . lang . System . currentTimeMillis ( ) ; } if ( isErrorThresholdMet ( ) ) { org . apache . servicecomb . loadbalance . SessionStickinessRule . LOG . warn ( "reached<sp>max<sp>error.<sp>choose<sp>another<sp>server." ) ; errorThresholdMet = true ; return chooseServerErrorThresholdMet ( servers , invocation ) ; } if ( ! ( servers . contains ( lastServer ) ) ) { return chooseNextServer ( servers , invocation ) ; } return lastServer ; }
org . junit . Assert . assertTrue ( status )
testTrashParentIsNotVisible ( ) { org . junit . Assume . assumeTrue ( ( ( this ) instanceof com . liferay . trash . test . util . WhenHasParent ) ) ; org . junit . Assume . assumeTrue ( ( ( this ) instanceof com . liferay . trash . test . util . WhenIsAssetableBaseModel ) ) ; com . liferay . trash . test . util . WhenHasParent whenHasParent = ( ( com . liferay . trash . test . util . WhenHasParent ) ( this ) ) ; com . liferay . portal . kernel . service . ServiceContext serviceContext = com . liferay . portal . kernel . test . util . ServiceContextTestUtil . getServiceContext ( group . getGroupId ( ) ) ; com . liferay . portal . kernel . model . BaseModel < ? > parentBaseModel = getParentBaseModel ( group , serviceContext ) ; baseModel = addBaseModel ( parentBaseModel , serviceContext ) ; whenHasParent . moveParentBaseModelToTrash ( ( ( java . lang . Long ) ( parentBaseModel . getPrimaryKeyObj ( ) ) ) ) ; com . liferay . trash . test . util . WhenIsAssetableBaseModel whenIsAssetableModel = ( ( com . liferay . trash . test . util . WhenIsAssetableBaseModel ) ( this ) ) ; "<AssertPlaceHolder>" ; } isAssetEntryVisible ( com . liferay . portal . kernel . model . ClassedModel , long ) { com . liferay . message . boards . model . MBMessage rootMessage = com . liferay . message . boards . service . MBMessageLocalServiceUtil . getMBMessage ( ( ( com . liferay . message . boards . model . MBThread ) ( classedModel ) ) . getRootMessageId ( ) ) ; return _whenIsAssetable . isAssetEntryVisible ( rootMessage , getAssetClassPK ( rootMessage ) ) ; }
org . junit . Assert . assertFalse ( whenIsAssetableModel . isAssetEntryVisible ( baseModel , getAssetClassPK ( baseModel ) ) )
testToStringWithNull ( ) { com . eclipsesource . v8 . V8ScriptExecutionException exceptionWithNulls = new com . eclipsesource . v8 . V8ScriptExecutionException ( null , 4 , null , null , 4 , 6 , null , null ) ; "<AssertPlaceHolder>" ; } toString ( ) { return v8Object . executeStringFunction ( "toText" , null ) ; }
org . junit . Assert . assertNotNull ( exceptionWithNulls . toString ( ) )
userOriginatedUpdate_unbound_singleEventOnSetValue ( ) { com . vaadin . flow . data . binder . testcomponents . TestTextField field = new com . vaadin . flow . data . binder . testcomponents . TestTextField ( ) ; binder . forField ( field ) . bind ( Person :: getFirstName , Person :: setFirstName ) ; binder . forField ( ageField ) . withConverter ( new com . vaadin . flow . data . converter . StringToIntegerConverter ( "" ) ) . bind ( Person :: getAge , Person :: setAge ) ; binder . addValueChangeListener ( this :: statusChanged ) ; "<AssertPlaceHolder>" ; field . getElement ( ) . getNode ( ) . getFeature ( com . vaadin . flow . internal . nodefeature . ElementPropertyMap . class ) . setProperty ( "value" , "foo" , false ) ; verifyEvent ( field , true ) ; } get ( ) { return com . vaadin . flow . dom . impl . BasicTextElementStateProvider . INSTANCE ; }
org . junit . Assert . assertNull ( event . get ( ) )
testRenameInstance ( ) { org . apache . karaf . instance . core . internal . InstanceServiceImpl service = new org . apache . karaf . instance . core . internal . InstanceServiceImpl ( ) ; service . setStorageLocation ( tempFolder . newFolder ( "instances" ) ) ; org . apache . karaf . instance . core . InstanceSettings settings = new org . apache . karaf . instance . core . InstanceSettings ( 8122 , 1122 , 44444 , getName ( ) , null , null , null ) ; service . createInstance ( getName ( ) , settings , true ) ; service . renameInstance ( getName ( ) , ( ( getName ( ) ) + "b" ) , true ) ; "<AssertPlaceHolder>" ; } getName ( ) { return name ; }
org . junit . Assert . assertNotNull ( service . getInstance ( ( ( getName ( ) ) + "b" ) ) )
testFormatMessageWithPercentFormat ( ) { record . setMessage ( "%s" ) ; record . setParameters ( new java . lang . Object [ ] { "hi" } ) ; "<AssertPlaceHolder>" ; } formatMessage ( java . util . logging . LogRecord ) { java . lang . String message = super . formatMessage ( record ) ; try { final java . lang . Object [ ] parameters = record . getParameters ( ) ; if ( ( ( message == ( record . getMessage ( ) ) ) && ( parameters != null ) ) && ( ( parameters . length ) > 0 ) ) { message = java . lang . String . format ( message , parameters ) ; } } catch ( java . lang . Exception ex ) { } return message ; }
org . junit . Assert . assertEquals ( "hi" , instance . formatMessage ( record ) )
testLoadAllObjects_EmptyResultList ( ) { java . util . List < de . akquinet . jbosscc . needle . db . Address > loadAllObjects = objectUnderTest . loadAllObjects ( de . akquinet . jbosscc . needle . db . Address . class ) ; "<AssertPlaceHolder>" ; } loadAllObjects ( java . lang . Class ) { final javax . persistence . Entity entityAnnotation = clazz . getAnnotation ( javax . persistence . Entity . class ) ; if ( entityAnnotation == null ) { throw new java . lang . IllegalArgumentException ( ( "Unknown<sp>entity:<sp>" + ( clazz . getName ( ) ) ) ) ; } return executeInTransaction ( new java . lang . Runnable < java . util . List < T > > ( ) { @ de . akquinet . jbosscc . needle . db . transaction . Override @ de . akquinet . jbosscc . needle . db . transaction . SuppressWarnings ( "unchecked" ) public java . util . List < T > run ( final javax . persistence . EntityManager entityManager ) { final java . lang . String fromEntity = ( entityAnnotation . name ( ) . isEmpty ( ) ) ? clazz . getSimpleName ( ) : entityAnnotation . name ( ) ; final java . lang . String alias = fromEntity . toLowerCase ( ) ; return entityManager . createQuery ( ( ( ( ( ( "SELECT<sp>" + alias ) + "<sp>FROM<sp>" ) + fromEntity ) + "<sp>" ) + alias ) ) . getResultList ( ) ; } } ) ; }
org . junit . Assert . assertEquals ( 0 , loadAllObjects . size ( ) )
testGetCovarianceMatrix ( ) { final double [ ] mu = new double [ ] { - 1.5 , 2 } ; final double [ ] [ ] sigma = new double [ ] [ ] { new double [ ] { 2 , - 1.1 } , new double [ ] { - 1.1 , 2 } } ; final org . apache . commons . math4 . distribution . MultivariateNormalDistribution d = new org . apache . commons . math4 . distribution . MultivariateNormalDistribution ( mu , sigma ) ; final org . apache . commons . math4 . linear . RealMatrix s = d . getCovariances ( ) ; final int dim = d . getDimension ( ) ; for ( int i = 0 ; i < dim ; i ++ ) { for ( int j = 0 ; j < dim ; j ++ ) { "<AssertPlaceHolder>" ; } } } getEntry ( int , int ) { long val = ( i + j ) + 1 ; long aux = org . apache . commons . numbers . combinatorics . BinomialCoefficient . value ( ( ( n ) + i ) , ( ( ( n ) - j ) - 1 ) ) ; val = org . apache . commons . numbers . core . ArithmeticUtils . mulAndCheck ( val , aux ) ; aux = org . apache . commons . numbers . combinatorics . BinomialCoefficient . value ( ( ( n ) + j ) , ( ( ( n ) - i ) - 1 ) ) ; val = org . apache . commons . numbers . core . ArithmeticUtils . mulAndCheck ( val , aux ) ; aux = org . apache . commons . numbers . combinatorics . BinomialCoefficient . value ( ( i + j ) , i ) ; val = org . apache . commons . numbers . core . ArithmeticUtils . mulAndCheck ( val , aux ) ; val = org . apache . commons . numbers . core . ArithmeticUtils . mulAndCheck ( val , aux ) ; return ( ( i + j ) & 1 ) == 0 ? val : - val ; }
org . junit . Assert . assertEquals ( sigma [ i ] [ j ] , s . getEntry ( i , j ) , 0 )
member_equals_falseForNull ( ) { org . eclipse . rap . json . JsonObject . Member member = new org . eclipse . rap . json . JsonObject . Member ( "a" , JsonValue . TRUE ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == obj ) return true ; if ( obj == null ) return false ; if ( ( getClass ( ) ) != ( obj . getClass ( ) ) ) return false ; org . eclipse . rap . e4 . internal . RAPEventObjectSupplier . Subscriber other = ( ( org . eclipse . rap . e4 . internal . RAPEventObjectSupplier . Subscriber ) ( obj ) ) ; if ( ( requestor ) == null ) { if ( ( other . requestor ) != null ) return false ; } else if ( ! ( requestor . equals ( other . requestor ) ) ) return false ; if ( ( topic ) == null ) { if ( ( other . topic ) != null ) return false ; } else if ( ! ( topic . equals ( other . topic ) ) ) return false ; return true ; }
org . junit . Assert . assertFalse ( member . equals ( null ) )
testGetPreferences ( ) { System . out . println ( "getPreferences" ) ; mudmap2 . backend . World instance = new mudmap2 . backend . World ( ) ; "<AssertPlaceHolder>" ; } getPreferences ( ) { return preferences ; }
org . junit . Assert . assertNotNull ( instance . getPreferences ( ) )
testBuildWithIterableFields ( ) { java . lang . String expectedAwql = "SELECT<sp>Id,<sp>Name<sp>LIMIT<sp>0,100" ; com . google . api . ads . adwords . axis . utils . v201809 . ServiceQuery serviceQuery = new com . google . api . ads . adwords . axis . utils . v201809 . ServiceQuery . Builder ( ) . fields ( com . google . common . collect . Sets . newHashSet ( "Id" , "Name" ) ) . limit ( 0 , 100 ) . build ( ) ; "<AssertPlaceHolder>" ; checkUtilitiesState ( ) ; } 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 ( expectedAwql , serviceQuery . toString ( ) )
test ( ) { nl . jqno . equalsverifier . EqualsVerifier . forClass ( org . apache . metron . common . configuration . Configurations . class ) . suppress ( Warning . NONFINAL_FIELDS , Warning . NULL_FIELDS ) . usingGetClass ( ) . verify ( ) ; org . apache . metron . common . configuration . Configurations configurations = new org . apache . metron . common . configuration . Configurations ( ) ; try { configurations . updateGlobalConfig ( ( ( byte [ ] ) ( null ) ) ) ; org . junit . Assert . fail ( "Updating<sp>a<sp>config<sp>with<sp>null<sp>should<sp>throw<sp>an<sp>IllegalStateException" ) ; } catch ( java . lang . IllegalStateException e ) { } "<AssertPlaceHolder>" ; } toString ( ) { return key ; }
org . junit . Assert . assertTrue ( ( ( ( configurations . toString ( ) ) != null ) && ( ( configurations . toString ( ) . length ( ) ) > 0 ) ) )
one_$this_field_comparison_returns_true_when_expression_true ( ) { com . redhat . lightblue . query . QueryExpression q = com . redhat . lightblue . eval . EvalTestContext . queryExpressionFromJson ( "{'field':'field7.1.$this.elemf3','op':'>','rfield':'field7.0.$this.elemf3'}" ) ; com . redhat . lightblue . eval . QueryEvaluator qe = com . redhat . lightblue . eval . QueryEvaluator . getInstance ( q , md ) ; com . redhat . lightblue . eval . QueryEvaluationContext ctx = qe . evaluate ( jsonDoc ) ; "<AssertPlaceHolder>" ; } getResult ( ) { return result ; }
org . junit . Assert . assertTrue ( ctx . getResult ( ) )
testRequestHeader ( ) { org . apache . kafka . common . requests . RequestHeader header = new org . apache . kafka . common . requests . RequestHeader ( org . apache . kafka . common . protocol . ApiKeys . FIND_COORDINATOR , ( ( short ) ( 1 ) ) , "" , 10 ) ; java . nio . ByteBuffer buffer = toBuffer ( header . toStruct ( ) ) ; org . apache . kafka . common . requests . RequestHeader deserialized = org . apache . kafka . common . requests . RequestHeader . parse ( buffer ) ; "<AssertPlaceHolder>" ; } parse ( java . nio . ByteBuffer ) { try { short apiKey = buffer . getShort ( ) ; short apiVersion = buffer . getShort ( ) ; org . apache . kafka . common . protocol . types . Schema schema = org . apache . kafka . common . requests . RequestHeader . schema ( apiKey , apiVersion ) ; buffer . rewind ( ) ; return new org . apache . kafka . common . requests . RequestHeader ( schema . read ( buffer ) ) ; } catch ( org . apache . kafka . common . errors . InvalidRequestException e ) { throw e ; } catch ( java . lang . Throwable ex ) { throw new org . apache . kafka . common . errors . InvalidRequestException ( ( "Error<sp>parsing<sp>request<sp>header.<sp>Our<sp>best<sp>guess<sp>of<sp>the<sp>apiKey<sp>is:<sp>" + ( buffer . getShort ( 0 ) ) ) , ex ) ; } }
org . junit . Assert . assertEquals ( header , deserialized )
testOneClassExcluded ( ) { japicmp . cmp . JarArchiveComparatorOptions options = new japicmp . cmp . JarArchiveComparatorOptions ( ) ; options . getFilters ( ) . getExcludes ( ) . add ( new japicmp . filter . JavaDocLikeClassFilter ( "japicmp.Test" ) ) ; java . util . List < japicmp . model . JApiClass > jApiClasses = japicmp . cmp . ClassesHelper . compareClasses ( options , new japicmp . cmp . ClassesHelper . ClassesGenerator ( ) { @ japicmp . cmp . Override public java . util . List < javassist . CtClass > createOldClasses ( javassist . ClassPool classPool ) throws japicmp . cmp . Exception { javassist . CtClass ctClass = japicmp . util . CtClassBuilder . create ( ) . name ( "japicmp.Test" ) . addToClassPool ( classPool ) ; return java . util . Collections . singletonList ( ctClass ) ; } @ japicmp . cmp . Override public java . util . List < javassist . CtClass > createNewClasses ( javassist . ClassPool classPool ) throws japicmp . cmp . Exception { javassist . CtClass ctClass = japicmp . util . CtClassBuilder . create ( ) . name ( "japicmp.Test" ) . addToClassPool ( classPool ) ; return java . util . Collections . singletonList ( ctClass ) ; } } ) ; "<AssertPlaceHolder>" ; } addToClassPool ( javassist . ClassPool ) { javassist . CtClass ctClass ; if ( this . superclass . isPresent ( ) ) { ctClass = classPool . makeClass ( this . name , this . superclass . get ( ) ) ; } else { ctClass = classPool . makeClass ( this . name ) ; } ctClass . setModifiers ( this . modifier ) ; for ( java . lang . String annotation : annotations ) { javassist . bytecode . ClassFile classFile = ctClass . getClassFile ( ) ; javassist . bytecode . ConstPool constPool = classFile . getConstPool ( ) ; javassist . bytecode . AnnotationsAttribute attr = new javassist . bytecode . AnnotationsAttribute ( constPool , javassist . bytecode . AnnotationsAttribute . visibleTag ) ; javassist . bytecode . annotation . Annotation annot = new javassist . bytecode . annotation . Annotation ( annotation , constPool ) ; attr . setAnnotation ( annot ) ; ctClass . getClassFile2 ( ) . addAttribute ( attr ) ; } for ( javassist . CtClass interfaceCtClass : interfaces ) { ctClass . addInterface ( interfaceCtClass ) ; } return ctClass ; }
org . junit . Assert . assertThat ( jApiClasses . size ( ) , org . hamcrest . core . Is . is ( 0 ) )
testGetWifiConfigFullNonInfra ( ) { org . eclipse . kura . core . net . NetworkConfiguration config = new org . eclipse . kura . core . net . NetworkConfiguration ( ) ; java . lang . String netIfConfigPrefix = "prefix." ; java . util . HashMap < java . lang . String , java . lang . Object > properties = new java . util . HashMap ( ) ; properties . put ( "prefix.wifi.adhoc.ssid" , "ssid" ) ; properties . put ( "prefix.wifi.adhoc.channel" 6 , "prefix.wifi.adhoc.channel" 8 ) ; properties . put ( "prefix.wifi.adhoc.channel" 1 , "GROUP_CCMP" ) ; properties . put ( "prefix.wifi.adhoc.channel" , "1<sp>2<sp>3" ) ; properties . put ( "prefix.wifi.adhoc.passphrase" , new org . eclipse . kura . configuration . Password ( "prefix.wifi.adhoc.channel" 3 ) ) ; properties . put ( "prefix.wifi.adhoc.channel" 5 , "prefix.wifi.adhoc.channel" 2 ) ; properties . put ( "prefix.wifi.adhoc.channel" 4 , ( ( java . lang . Boolean ) ( true ) ) ) ; properties . put ( "prefix.wifi.adhoc.channel" 9 , "RADIO_MODE_80211a" ) ; properties . put ( "prefix.wifi.adhoc.channel" 0 , "CCMP" ) ; properties . put ( "prefix.wifi.adhoc.ignoreSSID" , ( ( java . lang . Boolean ) ( true ) ) ) ; org . eclipse . kura . net . wifi . WifiConfig expected = new org . eclipse . kura . net . wifi . WifiConfig ( ) ; expected . setMode ( WifiMode . ADHOC ) ; expected . setChannels ( new int [ ] { 1 , 2 , 3 } ) ; expected . setSSID ( "ssid" ) ; expected . setDriver ( "prefix.wifi.adhoc.channel" 8 ) ; expected . setSecurity ( WifiSecurity . GROUP_CCMP ) ; expected . setPasskey ( "prefix.wifi.adhoc.channel" 3 ) ; expected . setHardwareMode ( "prefix.wifi.adhoc.channel" 2 ) ; expected . setBroadcast ( true ) ; expected . setRadioMode ( WifiRadioMode . RADIO_MODE_80211a ) ; expected . setPairwiseCiphers ( WifiCiphers . CCMP ) ; expected . setIgnoreSSID ( true ) ; org . eclipse . kura . net . wifi . WifiConfig wifiConfig = ( ( org . eclipse . kura . net . wifi . WifiConfig ) ( org . eclipse . kura . core . testutil . TestUtil . invokePrivate ( config , "prefix.wifi.adhoc.channel" 7 , netIfConfigPrefix , WifiMode . ADHOC , properties ) ) ) ; "<AssertPlaceHolder>" ; } setIgnoreSSID ( boolean ) { this . m_ignoreSSID = ignoreSSID ; }
org . junit . Assert . assertEquals ( expected , wifiConfig )
testKieSession ( ) { org . kie . api . runtime . StatelessKieSession ksession = ( ( org . kie . api . runtime . StatelessKieSession ) ( org . kie . aries . blueprint . tests . KieBlueprintListenerTest . container . getComponentInstance ( "statelessWithGroupedListeners" ) ) ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertNotNull ( ksession )
testDirectoryWatcherStart ( ) { org . apache . ambari . server . view . ViewDirectoryWatcher viewDirectoryWatcher = new org . apache . ambari . server . view . ViewDirectoryWatcher ( ) ; expect ( org . apache . ambari . server . view . ViewDirectoryWatcherTest . configuration . getViewsDir ( ) ) . andReturn ( testDir ) . once ( ) ; viewDirectoryWatcher . configuration = org . apache . ambari . server . view . ViewDirectoryWatcherTest . configuration ; viewDirectoryWatcher . viewRegistry = org . apache . ambari . server . view . ViewDirectoryWatcherTest . viewRegistry ; replay ( org . apache . ambari . server . view . ViewDirectoryWatcherTest . configuration ) ; final java . util . concurrent . CountDownLatch countDownLatch = new java . util . concurrent . CountDownLatch ( 1 ) ; viewDirectoryWatcher . addHook ( new com . google . common . base . Function < java . nio . file . Path , java . lang . Boolean > ( ) { @ javax . annotation . Nullable @ org . apache . ambari . server . view . Override public org . apache . ambari . server . view . Boolean apply ( @ javax . annotation . Nullable java . nio . file . Path path ) { countDownLatch . countDown ( ) ; return true ; } } ) ; viewDirectoryWatcher . start ( ) ; countDownLatch . await ( 1 , org . apache . ambari . server . view . SECONDS ) ; "<AssertPlaceHolder>" ; verify ( org . apache . ambari . server . view . ViewDirectoryWatcherTest . configuration ) ; } isRunning ( ) { if ( ( watchTask ) != null ) return ! ( watchTask . isDone ( ) ) ; return false ; }
org . junit . Assert . assertTrue ( viewDirectoryWatcher . isRunning ( ) )
matchesMatchingRegexValuesIgnoringCase ( ) { matcher . withEntry ( "FOO1" , ".*1" ) ; matcher . withEntry ( "foo2" , ".*2" ) ; org . mockserver . matchers . MultiValueMapMatcher mapMatcher = new org . mockserver . matchers . MultiValueMapMatcher ( new org . mockserver . logging . MockServerLogger ( ) , matcher ) ; matched . withEntry ( "foo1" , "bar1" ) ; matched . withEntry ( "FOO2" , "bar2" ) ; "<AssertPlaceHolder>" ; } matches ( org . mockserver . model . HttpRequest , java . lang . String ) { boolean result = false ; if ( ( xpathExpression ) == null ) { mockServerLogger . trace ( context , ( ( ( "Attempting<sp>match<sp>against<sp>null<sp>XPath<sp>Expression<sp>for<sp>[" + matched ) + "]" ) + ( new java . lang . RuntimeException ( ( ( "Attempting<sp>match<sp>against<sp>null<sp>XPath<sp>Expression<sp>for<sp>[" + matched ) + "]" ) ) ) ) ) ; } else if ( matcher . equals ( matched ) ) { result = true ; } else if ( matched != null ) { try { result = ( ( java . lang . Boolean ) ( xpathExpression . evaluate ( stringToXmlDocumentParser . buildDocument ( matched , new org . mockserver . matchers . StringToXmlDocumentParser . ErrorLogger ( ) { @ org . mockserver . matchers . Override public void logError ( final java . lang . String matched , final java . lang . Exception exception ) { mockServerLogger . warn ( context , ( ( ( ( "SAXParseException<sp>while<sp>performing<sp>match<sp>between<sp>[" + ( matcher ) ) + "]<sp>and<sp>[" ) + matched ) + "]" ) , exception ) ; } } ) , XPathConstants . BOOLEAN ) ) ) ; } catch ( java . lang . Exception e ) { mockServerLogger . trace ( context , ( ( ( ( ( "Error<sp>while<sp>matching<sp>xpath<sp>[" + ( matcher ) ) + "]<sp>against<sp>string<sp>[" ) + matched ) + "]<sp>assuming<sp>no<sp>match<sp>-<sp>" ) + ( e . getMessage ( ) ) ) ) ; } } if ( ! result ) { mockServerLogger . trace ( "Failed<sp>to<sp>match<sp>[{}]<sp>with<sp>[{}]" , matched , matcher ) ; } return ( not ) != result ; }
org . junit . Assert . assertTrue ( mapMatcher . matches ( null , matched ) )
getAdapterJndiName ( ) { java . util . Properties props = createConnectionProperties ( jndiName ) ; java . lang . String result = org . oscm . billing . application . bean . PluginServiceFactory . getAdapterJndiName ( props ) ; "<AssertPlaceHolder>" ; } getAdapterJndiName ( java . util . Properties ) { java . lang . String adapterJndiName = ( ( java . lang . String ) ( connectionProperties . get ( org . oscm . billing . application . bean . PluginServiceFactory . JNDI_NAME ) ) ) ; if ( adapterJndiName == null ) { throw new org . oscm . internal . types . exception . BillingApplicationException ( "No<sp>Connection<sp>to<sp>Billing<sp>Adapter" , new org . oscm . internal . types . exception . BillingAdapterConnectionException ( "JndiName<sp>is<sp>missing" ) ) ; } return adapterJndiName ; }
org . junit . Assert . assertEquals ( jndiName , result )
testGetIOTA ( ) { java . lang . String actual = table . getIOTA ( ) ; java . lang . String expected = "iota" ; "<AssertPlaceHolder>" ; } getIOTA ( ) { return "iota" ; }
org . junit . Assert . assertEquals ( expected , actual )
thereAre4Literals ( ) { final org . apache . jena . rdf . model . test . StmtIterator it = org . apache . jena . rdf . model . test . TestListStatements . m . listStatements ( org . apache . jena . rdf . model . test . TestListStatements . s , org . apache . jena . rdf . model . test . TestListStatements . p , null , null ) ; "<AssertPlaceHolder>" ; } toList ( ) { return org . apache . jena . util . iterator . NiceIterator . asList ( this ) ; }
org . junit . Assert . assertTrue ( ( ( it . toList ( ) . size ( ) ) == 4 ) )
currencySymbols ( ) { org . zkoss . zss . api . model . Book book = org . zkoss . zss . Util . loadBook ( this , "book/812-indirect.xlsx" ) ; org . zkoss . zss . api . model . Sheet sheet1 = book . getSheetAt ( 0 ) ; for ( java . lang . String [ ] currency : currencys ) { org . zkoss . zss . api . Range rng = org . zkoss . zss . api . Ranges . range ( sheet1 , currency [ 0 ] ) ; java . lang . String text = rng . getCellFormatText ( ) ; "<AssertPlaceHolder>" ; } } getCellFormatText ( ) { return _range . getCellFormatText ( ) ; }
org . junit . Assert . assertEquals ( currency [ 0 ] , currency [ 1 ] , text )
testConstructor ( ) { org . freedesktop . IniStyleFile entry = new org . freedesktop . IniStyleFile ( ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertNotNull ( entry )
test_getCacheStats ( ) { com . adobe . acs . commons . httpcache . config . HttpCacheConfig config = mock ( com . adobe . acs . commons . httpcache . config . HttpCacheConfig . class ) ; com . adobe . acs . commons . httpcache . keys . CacheKey key = mock ( com . adobe . acs . commons . httpcache . keys . CacheKey . class ) ; com . adobe . acs . commons . httpcache . engine . CacheContent content = mock ( com . adobe . acs . commons . httpcache . engine . CacheContent . class ) ; java . io . InputStream inputStream = getClass ( ) . getResourceAsStream ( "cachecontent.html" ) ; when ( content . getInputDataStream ( ) ) . thenReturn ( inputStream ) ; caffeine . put ( key , content ) ; javax . management . openmbean . TabularData data = caffeine . getCacheStats ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return cache . size ( ) ; }
org . junit . Assert . assertEquals ( 12 , data . size ( ) )
testSerialization2 ( ) { org . jfree . chart . PaintMap m1 = new org . jfree . chart . PaintMap ( ) ; m1 . put ( "K1" , Color . RED ) ; m1 . put ( "K2" , new java . awt . GradientPaint ( 1.0F , 2.0F , java . awt . Color . green , 3.0F , 4.0F , java . awt . Color . YELLOW ) ) ; org . jfree . chart . PaintMap m2 = ( ( org . jfree . chart . PaintMap ) ( org . jfree . chart . TestUtils . serialised ( m1 ) ) ) ; "<AssertPlaceHolder>" ; } serialised ( java . lang . Object ) { java . lang . Object result = null ; java . io . ByteArrayOutputStream buffer = new java . io . ByteArrayOutputStream ( ) ; java . io . ObjectOutput out ; try { out = new java . io . ObjectOutputStream ( buffer ) ; out . writeObject ( original ) ; out . close ( ) ; java . io . ObjectInput in = new java . io . ObjectInputStream ( new java . io . ByteArrayInputStream ( buffer . toByteArray ( ) ) ) ; result = in . readObject ( ) ; in . close ( ) ; } catch ( java . io . IOException e ) { throw new java . lang . RuntimeException ( e ) ; } catch ( java . lang . ClassNotFoundException e ) { throw new java . lang . RuntimeException ( e ) ; } return result ; }
org . junit . Assert . assertEquals ( m1 , m2 )
testExec2 ( ) { org . wikimedia . analytics . kraken . pig . GeoIpLookupEvalFunc geo = new org . wikimedia . analytics . kraken . pig . GeoIpLookupEvalFunc ( "countryCode,<sp>continentCode,<sp>continentName" , "GeoIP" , "LOCAL" ) ; this . input . set ( 0 , "127.0.0.1" ) ; org . apache . pig . data . Tuple output = geo . exec ( this . input ) ; "<AssertPlaceHolder>" ; } exec ( org . apache . pig . data . Tuple ) { if ( ( input == null ) || ( ( input . get ( 0 ) ) == null ) ) { return null ; } java . lang . String url = ( ( java . lang . String ) ( input . get ( 0 ) ) ) ; java . lang . String referer = ( ( java . lang . String ) ( input . get ( 1 ) ) ) ; java . lang . String userAgent = ( ( input . get ( 2 ) ) != null ) ? ( ( java . lang . String ) ( input . get ( 2 ) ) ) : "-" ; java . lang . String statusCode = ( ( input . get ( 3 ) ) != null ) ? ( ( java . lang . String ) ( input . get ( 3 ) ) ) : "-" ; java . lang . String ip = ( ( input . get ( 4 ) ) != null ) ? ( ( java . lang . String ) ( input . get ( 4 ) ) ) : "-" ; java . lang . String mimeType = ( ( input . get ( 5 ) ) != null ) ? ( ( java . lang . String ) ( input . get ( 5 ) ) ) : "-" ; java . lang . String requestMethod = ( ( input . get ( 6 ) ) != null ) ? ( ( java . lang . String ) ( input . get ( 6 ) ) ) : "-" ; org . wikimedia . analytics . kraken . pageview . Pageview pageview = new org . wikimedia . analytics . kraken . pageview . Pageview ( url , referer , userAgent , statusCode , ip , mimeType , requestMethod ) ; output = tupleFactory . newTuple ( 3 ) ; output . set ( 0 , ( pageview . isPageview ( ) ? 1 : 0 ) ) ; output . set ( 1 , ( pageview . isWebstatscollectorPageview ( ) ? 1 : 0 ) ) ; output . set ( 2 , ( pageview . isWikistatsMobileReportPageview ( ) ? 1 : 0 ) ) ; return output ; }
org . junit . Assert . assertNull ( output )
createWhenWikiIdIsValidButFail ( ) { when ( wikiDescriptorManager . exists ( "wikiid1" ) ) . thenReturn ( false ) ; when ( xwiki . Param ( "xwiki.virtual.reserved_wikis" ) ) . thenReturn ( "forbidden" ) ; when ( store . isWikiNameAvailable ( eq ( "wikiid1" ) , any ( com . xpn . xwiki . XWikiContext . class ) ) ) . thenReturn ( true ) ; org . xwiki . wiki . internal . descriptor . DefaultWikiDescriptor descriptor = new org . xwiki . wiki . internal . descriptor . DefaultWikiDescriptor ( "wikiid1" , "wikialias1" ) ; when ( wikiCreator . create ( "wikiid1" , "wikialias1" ) ) . thenThrow ( new org . xwiki . wiki . manager . WikiManagerException ( "..." ) ) ; boolean exceptionCaught = false ; try { this . mocker . getComponentUnderTest ( ) . create ( "wikiid1" , "wikialias1" , true ) ; } catch ( org . xwiki . wiki . manager . WikiManagerException e ) { exceptionCaught = true ; } "<AssertPlaceHolder>" ; verify ( observationManager ) . notify ( new org . xwiki . bridge . event . WikiCreatingEvent ( "wikiid1" ) , "wikiid1" , xcontext ) ; verify ( observationManager ) . notify ( new org . xwiki . bridge . event . WikiCreateFailedEvent ( "wikiid1" ) , "wikiid1" , xcontext ) ; } create ( com . xpn . xwiki . api . Attachment , java . util . Map ) { javax . mail . internet . MimeBodyPart attachmentPart = new javax . mail . internet . MimeBodyPart ( ) ; javax . activation . DataSource source = createTemporaryAttachmentDataSource ( attachment , attachmentPart ) ; attachmentPart . setDataHandler ( new javax . activation . DataHandler ( source ) ) ; attachmentPart . setHeader ( "Content-Type" , attachment . getMimeType ( ) ) ; attachmentPart . setHeader ( "Content-ID" , ( ( "<" + ( attachment . getFilename ( ) ) ) + ">" ) ) ; attachmentPart . setFileName ( attachment . getFilename ( ) ) ; addHeaders ( attachmentPart , parameters ) ; return attachmentPart ; }
org . junit . Assert . assertTrue ( exceptionCaught )
testXmlGregorianCalendar ( ) { javax . xml . datatype . XMLGregorianCalendar xmlCalendar = mock ( javax . xml . datatype . XMLGregorianCalendar . class ) ; java . util . GregorianCalendar expected = new java . util . GregorianCalendar ( ) ; when ( xmlCalendar . toGregorianCalendar ( ) ) . thenReturn ( expected ) ; java . sql . Date date = new java . sql . Date ( expected . getTimeInMillis ( ) ) ; "<AssertPlaceHolder>" ; } convert ( java . lang . Class , java . lang . Object ) { if ( com . github . dozermapper . core . converters . Boolean . class . isAssignableFrom ( srcObj . getClass ( ) ) ) { boolean value = ( ( java . lang . Boolean ) ( srcObj ) ) ; return value ? ( ( long ) ( 1 ) ) : ( ( long ) ( 0 ) ) ; } else if ( com . github . dozermapper . core . util . MappingUtils . isEnumType ( srcObj . getClass ( ) ) ) { return ( ( java . lang . Integer ) ( ( ( java . lang . Enum ) ( srcObj ) ) . ordinal ( ) ) ) . longValue ( ) ; } else { return com . github . dozermapper . core . converters . LongConverter . commonsConverter . convert ( destClass , srcObj ) ; } }
org . junit . Assert . assertEquals ( date , converter . convert ( java . sql . Date . class , xmlCalendar ) )
threeRulesTogetherDrl ( ) { org . drools . builder . KnowledgeBuilder kbuilder = org . drools . builder . KnowledgeBuilderFactory . newKnowledgeBuilder ( ) ; kbuilder . add ( new org . drools . io . impl . ClassPathResource ( "threeRulesTogether.drl" ) , ResourceType . DRL ) ; if ( kbuilder . hasErrors ( ) ) { throw new java . lang . IllegalStateException ( ( "Knowledge<sp>Resources<sp>cannot<sp>be<sp>parsed!<sp>" + ( kbuilder . getErrors ( ) . iterator ( ) . next ( ) . getMessage ( ) ) ) ) ; } org . drools . KnowledgeBase kbase = kbuilder . newKnowledgeBase ( ) ; kbase . addKnowledgePackages ( kbuilder . getKnowledgePackages ( ) ) ; org . drools . runtime . StatefulKnowledgeSession ksession = kbase . newStatefulKnowledgeSession ( ) ; org . drools . logger . KnowledgeRuntimeLoggerFactory . newConsoleLogger ( ksession ) ; com . wordpress . salaboy . model . Person salaboy = new com . wordpress . salaboy . model . Person ( "Salaboy" , 28 ) ; com . wordpress . salaboy . model . Address address = new com . wordpress . salaboy . model . Address ( "nowhere" , "" , 1425 , "BA" ) ; salaboy . setAddress ( address ) ; ksession . insert ( salaboy ) ; ksession . insert ( address ) ; int fired = ksession . fireAllRules ( ) ; "<AssertPlaceHolder>" ; } fireAllRules ( ) { org . drools . runtime . StatefulKnowledgeSession ksession = this . getKnowledgeSession ( ) ; try { return ksession . fireAllRules ( ) ; } finally { ksession . dispose ( ) ; } }
org . junit . Assert . assertEquals ( 3 , fired )
testFloatArray ( ) { float [ ] l = new float [ ] { 1.0F , 1.234235F } ; java . lang . Object deserialize = org . mapdb . elsa . ElsaSerializerBaseTest . clone ( l ) ; "<AssertPlaceHolder>" ; } clone ( E ) { return org . mapdb . elsa . ElsaSerializerBaseTest . clonePojo ( value ) ; }
org . junit . Assert . assertTrue ( org . mapdb . elsa . Arrays . equals ( l , ( ( float [ ] ) ( deserialize ) ) ) )
testHeeftOfKrijgtNederlandseNationaliteit_bestaandePersoon_geenNationaliteiten ( ) { final nl . bzk . algemeenbrp . dal . domein . brp . entity . Persoon persoon = new nl . bzk . algemeenbrp . dal . domein . brp . entity . Persoon ( SoortPersoon . INGESCHREVENE ) ; final nl . bzk . brp . bijhouding . bericht . model . ElementBuilder builder = new nl . bzk . brp . bijhouding . bericht . model . ElementBuilder ( ) ; final int peilDatum = 20160101 ; final nl . bzk . brp . bijhouding . bericht . model . NationaliteitElement nationaliteitElement = builder . maakNationaliteitElement ( "nat" , "0039" , null ) ; final nl . bzk . brp . bijhouding . bericht . model . BijhoudingPersoon bijhoudingPersoon = new nl . bzk . brp . bijhouding . bericht . model . BijhoudingPersoon ( persoon ) ; final nl . bzk . brp . bijhouding . bericht . model . ElementBuilder . PersoonParameters persoonParams = new nl . bzk . brp . bijhouding . bericht . model . ElementBuilder . PersoonParameters ( ) ; final nl . bzk . brp . bijhouding . bericht . model . PersoonElement persoonElement = builder . maakPersoonGegevensElement ( "persoon" , null , null , persoonParams ) ; bijhoudingPersoon . registreerPersoonElement ( persoonElement ) ; "<AssertPlaceHolder>" ; } heeftNederlandseNationaliteitOfIndicatieBehandeldAlsNederlander ( java . lang . Integer ) { final boolean heeftNederlandseNationaliteit = getNationaliteitHelper ( ) . heeftNederlandseNationaliteit ( peilDatum ) ; final boolean eersteInschrijvingEnNietBeeindigeNLnationaliteit = ( isEersteInschrijving ) && heeftNederlandseNationaliteit ; return eersteInschrijvingEnNietBeeindigeNLnationaliteit || ( ( ! ( isEersteInschrijving ) ) && ( heeftNederlandseNationaliteit || ( heeftBehandeldAlsNederlanderIndicatieOpDatum ( peilDatum ) ) ) ) ; }
org . junit . Assert . assertFalse ( bijhoudingPersoon . heeftNederlandseNationaliteitOfIndicatieBehandeldAlsNederlander ( peilDatum ) )
testBuildAndSerializePackagesInTwoSteps2 ( ) { org . drools . core . impl . InternalKnowledgeBase kbase = org . drools . core . impl . KnowledgeBaseFactory . newKnowledgeBase ( ) ; for ( java . lang . String fileName : SerializedPackageMergeTwoSteps1Test . BINPKG ) { java . util . Collection < org . kie . api . definition . KiePackage > kpkgs = null ; byte [ ] data = null ; try { data = java . nio . file . Files . readAllBytes ( java . nio . file . Paths . get ( fileName ) ) ; } catch ( org . drools . compiler . integrationtests . java . nio ex ) { return ; } kpkgs = _deserializeFromBytes ( data ) ; if ( kpkgs != null ) kbase . addPackages ( kpkgs ) ; } java . util . Collection < org . kie . api . definition . KiePackage > knowledgePackagesCombined = kbase . getKiePackages ( ) ; java . io . ByteArrayOutputStream baos = new java . io . ByteArrayOutputStream ( ) ; java . io . ObjectOutputStream out = new org . drools . core . common . DroolsObjectOutputStream ( baos ) ; out . writeObject ( knowledgePackagesCombined ) ; out . flush ( ) ; out . close ( ) ; java . io . ObjectInputStream in = new org . drools . core . common . DroolsObjectInputStream ( new java . io . ByteArrayInputStream ( baos . toByteArray ( ) ) ) ; java . util . Collection < org . kie . api . definition . KiePackage > deserializedPackages = ( ( java . util . Collection < org . kie . api . definition . KiePackage > ) ( in . readObject ( ) ) ) ; org . drools . core . impl . InternalKnowledgeBase kbase2 = org . drools . core . impl . KnowledgeBaseFactory . newKnowledgeBase ( ) ; kbase2 . addPackages ( deserializedPackages ) ; org . kie . api . runtime . KieSession ksession = kbase2 . newKieSession ( ) ; try { java . util . List < java . lang . String > list = new java . util . ArrayList < java . lang . String > ( ) ; ksession . setGlobal ( "list" , list ) ; ksession . insert ( new org . drools . compiler . integrationtests . org . drools . compiler . Person ( "John" ) ) ; ksession . fireAllRules ( ) ; "<AssertPlaceHolder>" ; } finally { ksession . dispose ( ) ; } } size ( ) { return rulesFired . size ( ) ; }
org . junit . Assert . assertEquals ( 2 , list . size ( ) )
isDefaultValidMultipleDefaultAdapters ( ) { creatBillingAdapter ( BillingAdapterIdentifier . NATIVE_BILLING . toString ( ) , true ) ; creatBillingAdapter ( org . oscm . billingadapterservice . bean . BillingAdapterDAOIT . BILLING_ID , true ) ; boolean isValid = isDefaultAdapterValid ( ) . booleanValue ( ) ; "<AssertPlaceHolder>" ; } isDefaultAdapterValid ( ) { return runTX ( new java . util . concurrent . Callable < java . lang . Boolean > ( ) { @ org . oscm . billingadapterservice . bean . Override public org . oscm . billingadapterservice . bean . Boolean call ( ) throws org . oscm . billingadapterservice . bean . Exception { return new java . lang . Boolean ( billAdapterDAO . isDefaultValid ( ) ) ; } } ) ; }
org . junit . Assert . assertFalse ( isValid )
resourceAdapter_lastModified ( ) { org . springframework . core . io . com . alibaba . citrus . service . resource . Resource resource = createMock ( org . springframework . core . io . Resource . class ) ; expect ( resource . lastModified ( ) ) . andReturn ( 123L ) ; replay ( resource ) ; com . alibaba . citrus . service . resource . support . ResourceAdapter adapter = new com . alibaba . citrus . service . resource . support . ResourceAdapter ( "/test" , resource ) ; "<AssertPlaceHolder>" ; } lastModified ( ) { return 0 ; }
org . junit . Assert . assertEquals ( 123L , adapter . lastModified ( ) )
testAddFormulasCollection ( ) { final org . prop4j . explain . solvers . SatProblem instance = getInstance ( ) ; final java . util . Collection < org . prop4j . Node > in = java . util . Arrays . < org . prop4j . Node > asList ( new org . prop4j . Literal ( "A" , false ) , new org . prop4j . Or ( "A" , "B" ) ) ; instance . addFormulas ( in ) ; final java . util . List < org . prop4j . Node > expected = new java . util . LinkedList ( ) ; expected . add ( new org . prop4j . Or ( new org . prop4j . Literal ( "A" , false ) ) ) ; expected . add ( new org . prop4j . Or ( "A" , "B" ) ) ; final java . util . List < org . prop4j . Node > actual = instance . getClauses ( ) ; "<AssertPlaceHolder>" ; } getClauses ( ) { return clauses ; }
org . junit . Assert . assertEquals ( expected , actual )
ztxFileReadUnitTest ( ) { final com . jitlogic . zorka . core . test . spy . List < java . lang . String [ ] > rslt = new com . jitlogic . zorka . core . test . spy . ArrayList < java . lang . String [ ] > ( ) ; com . jitlogic . zorka . core . spy . tuner . AbstractZtxReader er = new com . jitlogic . zorka . core . spy . tuner . AbstractZtxReader ( ) { @ com . jitlogic . zorka . core . test . spy . Override public void add ( java . lang . String p , java . lang . String c , java . lang . String m , java . lang . String s ) { rslt . add ( new java . lang . String [ ] { p , c , m , s } ) ; } } ; er . read ( this . getClass ( ) . getResourceAsStream ( "/tuner/test.ztx" ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return sequence . size ( ) ; }
org . junit . Assert . assertEquals ( 6 , rslt . size ( ) )
given_a_new_order_when_transactional_save_and_flush_then_the_id_generated ( ) { org . aggregateframework . sample . complexmodel . command . domain . entity . BookingOrder bookingOrder = buildOrder ( ) ; orderRepository . save ( bookingOrder ) ; orderRepository . flush ( ) ; "<AssertPlaceHolder>" ; } getId ( ) { return id ; }
org . junit . Assert . assertTrue ( ( ( bookingOrder . getId ( ) ) != null ) )
fromVmNameNullParameter ( ) { com . navercorp . pinpoint . common . util . JvmType actualType = com . navercorp . pinpoint . common . util . JvmType . fromVendor ( null ) ; "<AssertPlaceHolder>" ; } fromVendor ( java . lang . String ) { if ( vendorName == null ) { return com . navercorp . pinpoint . common . util . JvmType . UNKNOWN ; } final java . lang . String vendorNameTrimmed = vendorName . trim ( ) ; for ( com . navercorp . pinpoint . common . util . JvmType jvmType : com . navercorp . pinpoint . common . util . JvmType . JVM_TYPE ) { if ( jvmType . toString ( ) . equalsIgnoreCase ( vendorNameTrimmed ) ) { return jvmType ; } } return com . navercorp . pinpoint . common . util . JvmType . UNKNOWN ; }
org . junit . Assert . assertSame ( JvmType . UNKNOWN , actualType )
testRemoveBoolean ( ) { java . lang . Boolean [ ] inputArray1 = new java . lang . Boolean [ ] { true , false , true } ; java . lang . Boolean [ ] outputArray = org . openl . rules . helpers . RulesUtilsTest . instance . testBooleanRemove ( inputArray1 , 1 ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertTrue ( org . openl . rules . helpers . Arrays . equals ( new java . lang . Boolean [ ] { true , true } , outputArray ) )
shouldFailCleanSessionsByEmptyUsername ( ) { final org . kaazing . gateway . management . jmx . JmxManagementServiceHandler handler = context . mock ( org . kaazing . gateway . management . jmx . JmxManagementServiceHandler . class ) ; final org . kaazing . gateway . management . service . ServiceManagementBean serviceManagementBean = context . mock ( org . kaazing . gateway . management . service . ServiceManagementBean . class ) ; final org . kaazing . gateway . management . jmx . SessionMXBean sessionBean1 = context . mock ( org . kaazing . gateway . management . jmx . SessionMXBean . class , "sessionBean1" ) ; final org . kaazing . gateway . management . jmx . SessionMXBean sessionBean4 = context . mock ( org . kaazing . gateway . management . jmx . SessionMXBean . class , "sessionBean2" ) ; final javax . management . ObjectName objectName = context . mock ( javax . management . ObjectName . class ) ; final java . util . Map < java . lang . Long , java . util . Map < java . lang . String , java . lang . String > > sessionPrincipalMap = new java . util . HashMap ( ) ; final java . util . Map < java . lang . String , java . lang . String > s1Principals = new java . util . HashMap ( ) ; final java . util . Map < java . lang . String , java . lang . String > s2Principals = new java . util . HashMap ( ) ; final java . util . Map < java . lang . String , java . lang . String > s3Principals = new java . util . HashMap ( ) ; final java . util . Map < java . lang . String , java . lang . String > s4Principals = new java . util . HashMap ( ) ; final java . util . Map < java . lang . Long , java . util . Map < java . lang . String , java . lang . String > > activeSessionPrincipalMap = new java . util . HashMap ( ) ; context . checking ( new org . jmock . Expectations ( ) { { never ( serviceManagementBean ) . getLoggedInSessions ( ) ; will ( returnValue ( sessionPrincipalMap ) ) ; never ( handler ) . getSessionMXBean ( 1 ) ; will ( returnValue ( sessionBean1 ) ) ; never ( handler ) . getSessionMXBean ( 4 ) ; will ( returnValue ( sessionBean4 ) ) ; never ( sessionBean1 ) . close ( ) ; never ( serviceManagementBean ) . removeSessionManagementBean ( 1 ) ; never ( sessionBean4 ) . close ( ) ; never ( serviceManagementBean ) . removeSessionManagementBean ( 4 ) ; } } ) ; s1Principals . put ( "joe" , org . kaazing . gateway . management . jmx . ServiceMXBeanTest . UserPrincipal . class . getName ( ) ) ; s1Principals . put ( "SALES" , org . kaazing . gateway . management . jmx . ServiceMXBeanTest . RolePrincipal . class . getName ( ) ) ; s2Principals . put ( "jane" , org . kaazing . gateway . management . jmx . ServiceMXBeanTest . UserPrincipal . class . getName ( ) ) ; s2Principals . put ( "SALES" , org . kaazing . gateway . management . jmx . ServiceMXBeanTest . RolePrincipal . class . getName ( ) ) ; s3Principals . put ( "jane" , org . kaazing . gateway . management . jmx . ServiceMXBeanTest . UserPrincipal . class . getName ( ) ) ; s3Principals . put ( "joe" , org . kaazing . gateway . management . jmx . ServiceMXBeanTest . AnotherUserPrincipal . class . getName ( ) ) ; s4Principals . put ( "joe" , org . kaazing . gateway . management . jmx . ServiceMXBeanTest . UserPrincipal . class . getName ( ) ) ; s4Principals . put ( "MARKETING" , org . kaazing . gateway . management . jmx . ServiceMXBeanTest . RolePrincipal . class . getName ( ) ) ; sessionPrincipalMap . put ( 1L , s1Principals ) ; sessionPrincipalMap . put ( 2L , s2Principals ) ; sessionPrincipalMap . put ( 3L , s3Principals ) ; sessionPrincipalMap . put ( 4L , s4Principals ) ; activeSessionPrincipalMap . putAll ( sessionPrincipalMap ) ; final org . kaazing . gateway . management . jmx . ServiceMXBean jmxServiceBean = new org . kaazing . gateway . management . jmx . ServiceMXBeanImpl ( handler , objectName , serviceManagementBean ) ; jmxServiceBean . closeSessions ( "" , org . kaazing . gateway . management . jmx . ServiceMXBeanTest . UserPrincipal . class . getName ( ) ) ; "<AssertPlaceHolder>" ; } size ( ) { int size ; do { final long currentHead = head ; final long currentTail = tail ; size = ( ( int ) ( currentTail - currentHead ) ) ; } while ( size > ( capacity ) ) ; return size ; }
org . junit . Assert . assertEquals ( 4 , activeSessionPrincipalMap . size ( ) )
toMapForStringValue ( ) { value = new org . objectstyle . wolips . ruleeditor . model . LhsValue ( "edit" ) ; "<AssertPlaceHolder>" ; } toMap ( ) { org . objectstyle . wolips . eomodeler . core . model . EOModelMap relationshipMap = myRelationshipMap . cloneModelMap ( ) ; if ( ( myDestination ) != null ) { relationshipMap . setString ( "destination" , myDestination . getName ( ) , true ) ; } else { relationshipMap . remove ( "destination" ) ; } relationshipMap . setString ( "definition" , getDefinition ( ) , true ) ; relationshipMap . remove ( "dataPath" ) ; relationshipMap . setBoolean ( "isToMany" 1 , myMandatory , EOModelMap . YNOptionalDefaultNo ) ; relationshipMap . setBoolean ( "isToMany" , myToMany , EOModelMap . YN ) ; if ( ( ! ( isFlattened ( ) ) ) && ( ( myJoinSemantic ) != null ) ) { relationshipMap . setString ( "joinSemantic" , myJoinSemantic . getID ( ) , true ) ; } else if ( ( isFlattened ( ) ) && ( ( myRelationshipMap . get ( "joinSemantic" ) ) != null ) ) { relationshipMap . setString ( "joinSemantic" , ( ( java . lang . String ) ( myRelationshipMap . get ( "joinSemantic" ) ) ) , true ) ; } else { relationshipMap . remove ( "joinSemantic" ) ; } relationshipMap . setString ( "name" , myName , true ) ; if ( ( ( myDeleteRule ) != null ) && ( ( myDeleteRule ) != ( EODeleteRule . NULLIFY ) ) ) { relationshipMap . setString ( "isToMany" 0 , myDeleteRule . getID ( ) , true ) ; } else { relationshipMap . remove ( "isToMany" 0 ) ; } relationshipMap . setBoolean ( "ownsDestination" , myOwnsDestination , EOModelMap . YNOptionalDefaultNo ) ; relationshipMap . setBoolean ( "propagatesPrimaryKey" , myPropagatesPrimaryKey , EOModelMap . YNOptionalDefaultNo ) ; relationshipMap . setInteger ( "numberOfToManyFaultsToBatchFetch" , myNumberOfToManyFaultsToBatchFetch ) ; java . util . Set < java . util . Map > joins = new org . objectstyle . wolips . eomodeler . core . model . PropertyListSet < java . util . Map > ( ) ; for ( org . objectstyle . wolips . eomodeler . core . model . EOJoin join : myJoins ) { org . objectstyle . wolips . eomodeler . core . model . EOModelMap joinMap = join . toMap ( ) ; joins . add ( joinMap ) ; } relationshipMap . setSet ( "joins" , joins , true ) ; writeUserInfo ( relationshipMap ) ; if ( isFlattened ( ) ) { if ( ! ( org . objectstyle . wolips . baseforplugins . util . ComparisonUtils . deepEquals ( relationshipMap , myRelationshipMap ) ) ) { relationshipMap . remove ( "joinSemantic" ) ; } } return relationshipMap ; }
org . junit . Assert . assertThat ( ( ( java . lang . String ) ( value . toMap ( ) ) ) , org . hamcrest . CoreMatchers . is ( "edit" ) )
testTransposeOp ( ) { org . nd4j . linalg . api . ndarray . INDArray arr = org . nd4j . linalg . factory . Nd4j . linspace ( 1 , 15 , 15 ) . reshape ( 5 , 3 ) ; org . nd4j . linalg . api . ndarray . INDArray out = org . nd4j . linalg . factory . Nd4j . create ( org . nd4j . linalg . factory . Nd4j . defaultFloatingPointType ( ) , new long [ ] { 3 , 5 } , 'c' ) ; org . nd4j . autodiff . validation . OpTestCase op = new org . nd4j . autodiff . validation . OpTestCase ( new org . nd4j . autodiff . opvalidation . Transpose ( arr , out ) ) ; org . nd4j . linalg . api . ndarray . INDArray exp = arr . transpose ( ) ; op . expectedOutput ( 0 , exp . dup ( 'c' ) ) ; java . lang . String err = org . nd4j . autodiff . validation . OpValidation . validate ( op ) ; "<AssertPlaceHolder>" ; } validate ( org . nd4j . autodiff . validation . TestCase ) { return org . nd4j . autodiff . validation . OpValidation . validate ( testCase , false ) ; }
org . junit . Assert . assertNull ( err )
testMapRemoveNonExisting ( ) { org . apache . jackrabbit . oak . segment . RecordId blockId = writer . writeBlock ( bytes , 0 , bytes . length ) ; java . util . Map < java . lang . String , org . apache . jackrabbit . oak . segment . RecordId > changes = newHashMap ( ) ; changes . put ( "one" , null ) ; org . apache . jackrabbit . oak . segment . MapRecord zero = new org . apache . jackrabbit . oak . segment . MapRecord ( store . fileStore ( ) . getReader ( ) , writer . writeMap ( null , changes ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return size ; }
org . junit . Assert . assertEquals ( 0 , zero . size ( ) )
testConvert ( ) { java . lang . String name = "AddressN" ; java . lang . String abbrName = "AN" ; org . lnu . is . domain . address . type . AddressType expected = new org . lnu . is . domain . address . type . AddressType ( ) ; expected . setName ( name ) ; expected . setAbbrName ( abbrName ) ; org . lnu . is . resource . address . type . AddressTypeResource source = new org . lnu . is . resource . address . type . AddressTypeResource ( ) ; source . setName ( name ) ; source . setAbbrName ( abbrName ) ; org . lnu . is . domain . address . type . AddressType 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 )
testCommonByteStride ( ) { de . javagl . jgltf . model . impl . DefaultAccessorModel accessorModel0 = new de . javagl . jgltf . model . impl . DefaultAccessorModel ( de . javagl . jgltf . model . GltfConstants . GL_FLOAT , 0 , de . javagl . jgltf . model . ElementType . VEC3 ) ; accessorModel0 . setByteStride ( ( 3 * ( Float . BYTES ) ) ) ; de . javagl . jgltf . model . impl . DefaultAccessorModel accessorModel1 = new de . javagl . jgltf . model . impl . DefaultAccessorModel ( de . javagl . jgltf . model . GltfConstants . GL_FLOAT , 0 , de . javagl . jgltf . model . ElementType . VEC2 ) ; accessorModel1 . setByteStride ( ( 2 * ( Float . BYTES ) ) ) ; de . javagl . jgltf . model . impl . DefaultAccessorModel accessorModel2 = new de . javagl . jgltf . model . impl . DefaultAccessorModel ( de . javagl . jgltf . model . GltfConstants . GL_FLOAT , 0 , de . javagl . jgltf . model . ElementType . VEC3 ) ; accessorModel2 . setByteStride ( ( 3 * ( Float . BYTES ) ) ) ; java . util . List < de . javagl . jgltf . model . AccessorModel > accessorModels = java . util . Arrays . asList ( accessorModel0 , accessorModel1 , accessorModel2 ) ; int expectedCommonByteStride = 12 ; int actualCommonByteStride = de . javagl . jgltf . model . impl . creation . AccessorModels . computeCommonByteStride ( accessorModels ) ; "<AssertPlaceHolder>" ; } computeCommonByteStride ( java . lang . Iterable ) { int commonByteStride = 1 ; for ( de . javagl . jgltf . model . AccessorModel accessorModel : accessorModels ) { int elementSize = accessorModel . getElementSizeInBytes ( ) ; commonByteStride = java . lang . Math . max ( commonByteStride , elementSize ) ; } return commonByteStride ; }
org . junit . Assert . assertEquals ( expectedCommonByteStride , actualCommonByteStride )
testConsoleCommunicationSettingTimeout ( ) { long timeout = 3000 ; net . grinder . common . processidentity . AgentIdentity agentIdentity = getAgentIdentity ( allAvailableAgents , 0 ) ; net . grinder . console . model . ConsoleCommunicationSetting consoleCommunicationSetting = net . grinder . console . model . ConsoleCommunicationSetting . asDefault ( ) ; consoleCommunicationSetting . setInactiveClientTimeOut ( timeout ) ; final net . grinder . SingleConsole console1 = new net . grinder . SingleConsole ( "" , getFreePort ( ) , consoleCommunicationSetting , net . grinder . util . ConsolePropertiesFactory . createEmptyConsoleProperties ( ) ) ; console1 . setReportPath ( new java . io . File ( "./tmp/console-home" ) ) ; console1 . start ( ) ; console1 . startSampling ( ) ; net . grinder . common . GrinderProperties grinderProperties = new net . grinder . common . GrinderProperties ( ) ; grinderProperties . setInt ( GrinderProperties . CONSOLE_PORT , console1 . getConsolePort ( ) ) ; agentControllerServerDaemon . startAgent ( grinderProperties , agentIdentity ) ; waitAndAssertUntilAgentAttachedTo ( console1 , 1 , 3 ) ; java . net . URL scriptUrl = this . getClass ( ) . getResource ( "/long-time-prepare-test.properties" ) ; java . io . File scriptFile = new java . io . File ( scriptUrl . getFile ( ) ) ; net . grinder . common . GrinderProperties properties = new net . grinder . common . GrinderProperties ( scriptFile ) ; properties . setAssociatedFile ( new java . io . File ( "long-time-prepare-test.properties" ) ) ; final org . apache . commons . lang . mutable . MutableBoolean timeouted = new org . apache . commons . lang . mutable . MutableBoolean ( false ) ; console1 . addListener ( new net . grinder . SingleConsole . ConsoleShutdownListener ( ) { @ net . grinder . Override public void readyToStop ( net . grinder . StopReason stopReason ) { System . out . println ( ( "The<sp>stop<sp>signal<sp>is<sp>recieved<sp>" + stopReason ) ) ; if ( stopReason . getDisplay ( ) . equals ( "Script<sp>error" ) ) { timeouted . setValue ( true ) ; } } } ) ; console1 . startTest ( properties ) ; for ( int i = 0 ; i < 20 ; i ++ ) { if ( timeouted . isTrue ( ) ) { break ; } try { java . lang . Thread . sleep ( 1000 ) ; } catch ( java . lang . InterruptedException ignored ) { } } "<AssertPlaceHolder>" ; agentControllerServerDaemon . stopAgent ( agentIdentity ) ; waitAndAssertUntilAgentAttachedTo ( console1 , 0 , 10 ) ; } sleep ( long ) { try { java . lang . Thread . sleep ( milliseconds ) ; } catch ( java . lang . InterruptedException e ) { org . ngrinder . AbstractNGrinderTransactionalTest . LOG . error ( "error:" , e ) ; } }
org . junit . Assert . assertTrue ( timeouted . isTrue ( ) )
putAndGetUseInAir ( ) { com . appleframework . data . hbase . myrecord . MyRecordV2 myRecordV2 = new com . appleframework . data . hbase . myrecord . MyRecordV2 ( ) ; myRecordV2 . setId ( 0 ) ; myRecordV2 . setAge ( 100L ) ; myRecordV2 . setDate ( new java . util . Date ( ) ) ; myRecordV2 . setGender ( Gender . FEMALE ) ; myRecordV2 . setName ( "allen" ) ; simpleHbaseClient . putObject ( myRecordV2 . rowKey ( ) , myRecordV2 ) ; com . appleframework . data . hbase . myrecord . MyRecordV2 result = simpleHbaseClient . findObject ( myRecordV2 . rowKey ( ) , com . appleframework . data . hbase . myrecord . MyRecordV2 . class ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == obj ) { return true ; } if ( obj instanceof com . appleframework . security . core . auth . SimpleGrantedAuthority ) { return role . equals ( ( ( com . appleframework . security . core . auth . SimpleGrantedAuthority ) ( obj ) ) . role ) ; } return false ; }
org . junit . Assert . assertTrue ( myRecordV2 . equals ( result ) )
testBericht ( ) { final nl . bzk . brp . domain . berichtmodel . BasisBerichtGegevens basisBerichtGegevens = nl . bzk . brp . domain . berichtmodel . BasisBerichtGegevens . builder ( ) . build ( ) ; final nl . bzk . brp . domain . berichtmodel . Bericht bericht = new nl . bzk . brp . domain . berichtmodel . Bericht ( basisBerichtGegevens ) ; "<AssertPlaceHolder>" ; } getBasisBerichtGegevens ( ) { return basisBerichtGegevens ; }
org . junit . Assert . assertEquals ( basisBerichtGegevens , bericht . getBasisBerichtGegevens ( ) )
testKeySet ( ) { state . put ( net . sf . rails . game . state . HashMultimapStateTest . ITEM_A_ID , itemA ) ; state . put ( net . sf . rails . game . state . HashMultimapStateTest . ITEM_C_ID , itemB ) ; "<AssertPlaceHolder>" . containsOnly ( net . sf . rails . game . state . HashMultimapStateTest . ITEM_A_ID , net . sf . rails . game . state . HashMultimapStateTest . ITEM_C_ID ) ; } keySet ( ) { return com . google . common . collect . ImmutableSortedSet . copyOf ( map . keySet ( ) ) ; }
org . junit . Assert . assertThat ( state . keySet ( ) )
testFormatDateStringBuilderDefaultPattern ( ) { final org . apache . logging . log4j . core . pattern . DatePatternConverter converter = org . apache . logging . log4j . core . pattern . DatePatternConverter . newInstance ( null ) ; final java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; converter . format ( date ( 2001 , 1 , 1 ) , sb ) ; final java . lang . String expected = "2001-02-01<sp>14:15:16,123" ; "<AssertPlaceHolder>" ; } toString ( ) { return this . internal ; }
org . junit . Assert . assertEquals ( expected , sb . toString ( ) )
encounterNoteNullTest ( ) { org . marc . everest . rmim . uv . cdar2 . pocd_mt000040uv . EntryRelationship entryRelationship = org . oscarehr . e2e . model . export . body . EncountersModelTest . nullEncountersModel . getEncounterNote ( ) ; "<AssertPlaceHolder>" ; } getEncounterNote ( ) { return encounterNote ; }
org . junit . Assert . assertNull ( entryRelationship )
shouldValidateWhetherOperationIsSupported ( ) { final java . util . Set < java . lang . Class > supportedOperations = service . getOperations ( ) ; for ( final java . lang . Class < ? extends uk . gov . gchq . gaffer . operation . Operation > operationClass : supportedOperations ) { "<AssertPlaceHolder>" ; } } isOperationSupported ( java . lang . Class ) { return graphFactory . getGraph ( ) . isSupported ( operation ) ; }
org . junit . Assert . assertTrue ( service . isOperationSupported ( operationClass ) )
testWithProxyGroupsAndUsersWithSpaces ( ) { org . apache . hadoop . conf . Configuration conf = new org . apache . hadoop . conf . Configuration ( ) ; conf . set ( org . apache . hadoop . security . authorize . DefaultImpersonationProvider . getTestProvider ( ) . getProxySuperuserUserConfKey ( org . apache . hadoop . security . authorize . TestProxyUsers . REAL_USER_NAME ) , org . apache . hadoop . util . StringUtils . join ( "," , java . util . Arrays . asList ( ( ( org . apache . hadoop . security . authorize . TestProxyUsers . PROXY_USER_NAME ) + "<sp>" ) , org . apache . hadoop . security . authorize . TestProxyUsers . AUTHORIZED_PROXY_USER_NAME , "ONEMORE" ) ) ) ; conf . set ( org . apache . hadoop . security . authorize . DefaultImpersonationProvider . getTestProvider ( ) . getProxySuperuserGroupConfKey ( org . apache . hadoop . security . authorize . TestProxyUsers . REAL_USER_NAME ) , org . apache . hadoop . util . StringUtils . join ( "," , java . util . Arrays . asList ( org . apache . hadoop . security . authorize . TestProxyUsers . GROUP_NAMES ) ) ) ; conf . set ( org . apache . hadoop . security . authorize . DefaultImpersonationProvider . getTestProvider ( ) . getProxySuperuserIpConfKey ( org . apache . hadoop . security . authorize . TestProxyUsers . REAL_USER_NAME ) , org . apache . hadoop . security . authorize . TestProxyUsers . PROXY_IP ) ; org . apache . hadoop . security . authorize . ProxyUsers . refreshSuperUserGroupsConfiguration ( conf ) ; java . util . Collection < java . lang . String > groupsToBeProxied = org . apache . hadoop . security . authorize . ProxyUsers . getDefaultImpersonationProvider ( ) . getProxyGroups ( ) . get ( org . apache . hadoop . security . authorize . DefaultImpersonationProvider . getTestProvider ( ) . getProxySuperuserGroupConfKey ( org . apache . hadoop . security . authorize . TestProxyUsers . REAL_USER_NAME ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return loggers . size ( ) ; }
org . junit . Assert . assertEquals ( org . apache . hadoop . security . authorize . TestProxyUsers . GROUP_NAMES . length , groupsToBeProxied . size ( ) )
shouldNotResolveElExpressionInMap ( ) { java . util . Map < java . lang . String , java . lang . Object > map = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; map . put ( "m1" , "#{expression}" ) ; this . modelBuilder . add ( map , false ) ; "<AssertPlaceHolder>" ; } getModel ( ) { return this . model ; }
org . junit . Assert . assertThat ( this . modelBuilder . getModel ( ) . get ( "m1" ) , org . hamcrest . Matchers . is ( org . hamcrest . Matchers . equalTo ( ( ( java . lang . Object ) ( "#{expression}" ) ) ) ) )
testGridFsVerify ( ) { final java . lang . String name = ( com . allanbank . mongodb . acceptance . BasicAcceptanceTestCases . GRIDFS_COLLECTION_ROOT_NAME ) + "verify" ; shardCollection ( ( name + ( com . allanbank . mongodb . gridfs . GridFs . FILES_SUFFIX ) ) ) ; shardCollection ( ( name + ( com . allanbank . mongodb . gridfs . GridFs . CHUNKS_SUFFIX ) ) , com . allanbank . mongodb . builder . Index . asc ( GridFs . FILES_ID_FIELD ) ) ; myDb . setDurability ( Durability . ACK ) ; final long seed = java . lang . System . currentTimeMillis ( ) ; final byte [ ] buffer = new byte [ 313 ] ; final int blocks = 10000 ; java . io . File inFile = null ; java . io . InputStream in = null ; java . io . OutputStream out = null ; try { inFile = java . io . File . createTempFile ( "infile" , ".dat" ) ; final java . util . Random random = new java . util . Random ( seed ) ; out = new java . io . FileOutputStream ( inFile ) ; for ( int i = 0 ; i < blocks ; ++ i ) { random . nextBytes ( buffer ) ; out . write ( buffer ) ; } com . allanbank . mongodb . util . IOUtils . close ( out ) ; out = null ; final com . allanbank . mongodb . gridfs . GridFs gridfs = new com . allanbank . mongodb . gridfs . GridFs ( myDb , name ) ; gridfs . createIndexes ( ) ; in = new java . io . FileInputStream ( inFile ) ; gridfs . unlink ( "foo" ) ; final com . allanbank . mongodb . bson . element . ObjectId id = gridfs . write ( "foo" , in ) ; com . allanbank . mongodb . util . IOUtils . close ( in ) ; in = null ; "<AssertPlaceHolder>" ; } catch ( final java . io . IOException ioe ) { fatal ( ioe ) ; } finally { com . allanbank . mongodb . util . IOUtils . close ( in ) ; com . allanbank . mongodb . util . IOUtils . close ( out ) ; if ( inFile != null ) { inFile . delete ( ) ; } } } validate ( com . allanbank . mongodb . bson . element . ObjectId ) { final com . allanbank . mongodb . bson . Document fileDoc = myFilesCollection . findOne ( where ( com . allanbank . mongodb . gridfs . GridFs . ID_FIELD ) . equals ( id ) ) ; if ( fileDoc == null ) { throw new java . io . FileNotFoundException ( id . toString ( ) ) ; } return doValidate ( fileDoc ) ; }
org . junit . Assert . assertThat ( gridfs . validate ( id ) , org . hamcrest . Matchers . is ( true ) )
testShowFiredRulesDontShowIfThereIsNoRules ( ) { final org . drools . workbench . models . testscenarios . shared . ExecutionTrace executionTrace = new org . drools . workbench . models . testscenarios . shared . ExecutionTrace ( ) ; executionTrace . setRulesFired ( null ) ; auditPage . showFiredRules ( executionTrace ) ; verify ( auditPageView ) . showFiredRules ( listArgumentCaptor . capture ( ) ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return this . value ; }
org . junit . Assert . assertTrue ( listArgumentCaptor . getValue ( ) . isEmpty ( ) )
testParserType ( ) { for ( org . sagebionetworks . table . cluster . MySqlColumnType type : org . sagebionetworks . table . cluster . MySqlColumnType . values ( ) ) { java . lang . String typeString = ( type . name ( ) . toLowerCase ( ) ) + "(1)" ; org . sagebionetworks . table . cluster . MySqlColumnType lookup = org . sagebionetworks . table . cluster . MySqlColumnType . parserType ( typeString ) ; "<AssertPlaceHolder>" ; } } parserType ( java . lang . String ) { java . lang . String [ ] split = typeString . split ( "\\(" ) ; return org . sagebionetworks . table . cluster . MySqlColumnType . valueOf ( split [ 0 ] . toUpperCase ( ) ) ; }
org . junit . Assert . assertEquals ( type , lookup )
testSchema ( ) { com . orientechnologies . orient . client . remote . message . OrientDB orientDB = new com . orientechnologies . orient . client . remote . message . OrientDB ( "embedded:" , com . orientechnologies . orient . client . remote . message . OrientDBConfig . defaultConfig ( ) ) ; orientDB . create ( "test" , ODatabaseType . MEMORY ) ; com . orientechnologies . orient . client . remote . message . ODatabaseSession session = orientDB . open ( "test" , "admin" , "admin" ) ; com . orientechnologies . orient . core . record . impl . ODocument schema = ( ( com . orientechnologies . orient . client . remote . message . ODatabaseDocumentInternal ) ( session ) ) . getSharedContext ( ) . getSchema ( ) . toStream ( ) ; session . close ( ) ; orientDB . close ( ) ; com . orientechnologies . orient . client . remote . message . MockChannel channel = new com . orientechnologies . orient . client . remote . message . MockChannel ( ) ; com . orientechnologies . orient . client . remote . message . OPushSchemaRequest request = new com . orientechnologies . orient . client . remote . message . OPushSchemaRequest ( schema ) ; request . write ( channel ) ; channel . close ( ) ; com . orientechnologies . orient . client . remote . message . OPushSchemaRequest readRequest = new com . orientechnologies . orient . client . remote . message . OPushSchemaRequest ( ) ; readRequest . read ( channel ) ; "<AssertPlaceHolder>" ; } getSchema ( ) { return schema ; }
org . junit . Assert . assertNotNull ( readRequest . getSchema ( ) )
deveObterAnoComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe310 . classes . evento . inutilizacao . NFRetornoEventoInutilizacaoDados dados = new com . fincatto . documentofiscal . nfe310 . classes . evento . inutilizacao . NFRetornoEventoInutilizacaoDados ( ) ; final int ano = 2015 ; dados . setAno ( ano ) ; "<AssertPlaceHolder>" ; } getAno ( ) { return this . ano ; }
org . junit . Assert . assertEquals ( ano , dados . getAno ( ) , 0 )
deveGerarXMLDeAcordoComOPadraoEstabelecido ( ) { final com . fincatto . documentofiscal . nfe400 . classes . nota . NFNotaInfoItemImpostoICMS51 icms51 = new com . fincatto . documentofiscal . nfe400 . classes . nota . NFNotaInfoItemImpostoICMS51 ( ) ; icms51 . setModalidadeBCICMS ( NFNotaInfoItemModalidadeBCICMS . VALOR_OPERACAO ) ; icms51 . setOrigem ( NFOrigem . NACIONAL ) ; icms51 . setPercentualICMS ( new java . math . BigDecimal ( "99.99" ) ) ; icms51 . setPercentualReducaoBC ( new java . math . BigDecimal ( "99.99" ) ) ; icms51 . setSituacaoTributaria ( NFNotaInfoImpostoTributacaoICMS . ISENTA ) ; icms51 . setValorBCICMS ( new java . math . BigDecimal ( "999999999999.99" ) ) ; icms51 . setValorICMS ( new java . math . BigDecimal ( "999999999999.99" ) ) ; icms51 . setPercentualDiferimento ( new java . math . BigDecimal ( "99.9999" ) ) ; icms51 . setValorICMSDiferimento ( new java . math . BigDecimal ( "999999999999.99" ) ) ; icms51 . setValorICMSOperacao ( new java . math . BigDecimal ( "999999999999.99" ) ) ; icms51 . setValorBCFundoCombatePobreza ( new java . math . BigDecimal ( "999999999999.99" ) ) ; icms51 . setPercentualFundoCombatePobreza ( new java . math . BigDecimal ( "99.99" ) ) ; icms51 . setValorFundoCombatePobreza ( new java . math . BigDecimal ( "999999999999.99" ) ) ; final java . lang . String xmlEsperado = "<NFNotaInfoItemImpostoICMS51><orig>0</orig><CST>40</CST><modBC>3</modBC><pRedBC>99.99</pRedBC><vBC>999999999999.99</vBC><pICMS>99.99</pICMS><vICMSOp>999999999999.99</vICMSOp><pDif>99.9999</pDif><vICMSDif>999999999999.99</vICMSDif><vICMS>999999999999.99</vICMS><vBCFCP>999999999999.99</vBCFCP><pFCP>99.99</pFCP><vFCP>999999999999.99</vFCP></NFNotaInfoItemImpostoICMS51>" ; "<AssertPlaceHolder>" ; } toString ( ) { return this . getDescricao ( ) ; }
org . junit . Assert . assertEquals ( xmlEsperado , icms51 . toString ( ) )
testParallelScan ( ) { final com . allanbank . mongodb . client . ClusterStats mockStats = createMock ( com . allanbank . mongodb . client . ClusterStats . class ) ; final com . allanbank . mongodb . bson . builder . DocumentBuilder commandDoc = com . allanbank . mongodb . bson . builder . BuilderFactory . start ( ) ; commandDoc . add ( "parallelCollectionScan" , "test" ) ; commandDoc . add ( "numCursors" , 2 ) ; final com . allanbank . mongodb . bson . builder . DocumentBuilder replyDoc = com . allanbank . mongodb . bson . builder . BuilderFactory . start ( ) ; replyDoc . add ( "ok" , 1 ) ; replyDoc . pushArray ( "cursors" ) . push ( ) . push ( "cursor" ) . add ( "id" , 1234 ) . pushArray ( "firstBatch" ) ; final com . allanbank . mongodb . builder . ParallelScan . Builder scan = com . allanbank . mongodb . builder . ParallelScan . builder ( ) . requestedIteratorCount ( 2 ) . readPreference ( ReadPreference . PREFER_SECONDARY ) ; final com . allanbank . mongodb . client . message . ParallelScanCommand commandMsg = new com . allanbank . mongodb . client . message . ParallelScanCommand ( scan . build ( ) , "test" , "test" , commandDoc . build ( ) , com . allanbank . mongodb . ReadPreference . PREFER_SECONDARY ) ; expect ( myMockClient . getClusterType ( ) ) . andReturn ( ClusterType . REPLICA_SET ) ; expect ( myMockDatabase . getName ( ) ) . andReturn ( "test" ) ; myMockClient . send ( eq ( commandMsg ) , com . allanbank . mongodb . AnswerCallback . callback ( reply ( replyDoc . build ( ) ) ) ) ; expectLastCall ( ) ; replay ( mockStats ) ; final java . util . Collection < com . allanbank . mongodb . MongoIterator < com . allanbank . mongodb . bson . Document > > result = myTestInstance . parallelScan ( scan ) ; "<AssertPlaceHolder>" ; verify ( mockStats ) ; } size ( ) { int size = ( HEADER_SIZE ) + 10 ; size += com . allanbank . mongodb . bson . io . StringEncoder . utf8Size ( myDatabaseName ) ; size += com . allanbank . mongodb . bson . io . StringEncoder . utf8Size ( myCollectionName ) ; size += myQuery . size ( ) ; return size ; }
org . junit . Assert . assertThat ( result . size ( ) , org . hamcrest . Matchers . is ( 1 ) )
registerAgentFailTest ( ) { com . navercorp . pinpoint . rpc . server . EventHandlerTest . ThrowExceptionEventHandler eventHandler = new com . navercorp . pinpoint . rpc . server . EventHandlerTest . ThrowExceptionEventHandler ( ) ; com . navercorp . pinpoint . rpc . server . PinpointServerAcceptor serverAcceptor = new com . navercorp . pinpoint . rpc . server . PinpointServerAcceptor ( ) ; serverAcceptor . addStateChangeEventHandler ( eventHandler ) ; serverAcceptor . setMessageListenerFactory ( testServerMessageListenerFactory ) ; serverAcceptor . bind ( "127.0.0.1" , com . navercorp . pinpoint . rpc . server . EventHandlerTest . bindPort ) ; com . navercorp . pinpoint . test . client . TestRawSocket testRawSocket = new com . navercorp . pinpoint . test . client . TestRawSocket ( ) ; try { testRawSocket . connect ( com . navercorp . pinpoint . rpc . server . EventHandlerTest . bindPort ) ; sendAndReceiveSimplePacket ( testRawSocket ) ; "<AssertPlaceHolder>" ; } finally { testRawSocket . close ( ) ; com . navercorp . pinpoint . rpc . util . PinpointRPCTestUtils . close ( serverAcceptor ) ; } } getErrorCount ( ) { return errorCount ; }
org . junit . Assert . assertTrue ( ( ( eventHandler . getErrorCount ( ) ) > 0 ) )
testSpdyGoAwayFrame ( ) { short type = 7 ; byte flags = 0 ; int length = 8 ; int lastGoodStreamId = ( io . netty . handler . codec . spdy . SpdyFrameDecoderTest . RANDOM . nextInt ( ) ) & 2147483647 ; int statusCode = ( io . netty . handler . codec . spdy . SpdyFrameDecoderTest . RANDOM . nextInt ( ) ) | 1 ; io . netty . buffer . ByteBuf buf = io . netty . buffer . Unpooled . buffer ( ( ( io . netty . handler . codec . spdy . SpdyCodecUtil . SPDY_HEADER_SIZE ) + length ) ) ; io . netty . handler . codec . spdy . SpdyFrameDecoderTest . encodeControlFrameHeader ( buf , type , flags , length ) ; buf . writeInt ( lastGoodStreamId ) ; buf . writeInt ( statusCode ) ; decoder . decode ( buf ) ; verify ( delegate ) . readGoAwayFrame ( lastGoodStreamId , statusCode ) ; "<AssertPlaceHolder>" ; buf . release ( ) ; } isReadable ( ) { return ( writerIndex ) > ( readerIndex ) ; }
org . junit . Assert . assertFalse ( buf . isReadable ( ) )
insertVisit ( ) { org . springframework . samples . petclinic . model . Pet pet7 = this . clinicService . findPetById ( 7 ) ; int found = pet7 . getVisits ( ) . size ( ) ; org . springframework . samples . petclinic . model . Visit visit = new org . springframework . samples . petclinic . model . Visit ( ) ; pet7 . addVisit ( visit ) ; visit . setDescription ( "test" ) ; this . clinicService . saveVisit ( visit ) ; this . clinicService . savePet ( pet7 ) ; pet7 = this . clinicService . findPetById ( 7 ) ; "<AssertPlaceHolder>" ; } getVisits ( ) { java . util . List < org . springframework . samples . petclinic . model . Visit > sortedVisits = new java . util . ArrayList < org . springframework . samples . petclinic . model . Visit > ( getVisitsInternal ( ) ) ; org . springframework . beans . support . PropertyComparator . sort ( sortedVisits , new org . springframework . beans . support . MutableSortDefinition ( "date" , false , false ) ) ; return java . util . Collections . unmodifiableList ( sortedVisits ) ; }
org . junit . Assert . assertEquals ( ( found + 1 ) , pet7 . getVisits ( ) . size ( ) )
testGetReviewersBlank ( ) { dialog . setText ( "<sp>" ) ; "<AssertPlaceHolder>" ; } getReviewers ( ) { java . lang . String [ ] reviewers = reviewersEditor . getText ( ) . split ( "," ) ; java . util . List < java . lang . String > result = new java . util . ArrayList < java . lang . String > ( reviewers . length ) ; for ( int i = 0 ; i < ( reviewers . length ) ; i ++ ) { reviewers [ i ] = reviewers [ i ] . trim ( ) ; if ( ( reviewers [ i ] . length ( ) ) > 0 ) { result . add ( reviewers [ i ] ) ; } } return result ; }
org . junit . Assert . assertEquals ( java . util . Collections . emptyList ( ) , dialog . getReviewers ( ) )
testCreateClassPathResourceThatDoNotExist ( ) { final org . constretto . model . ClassPathResource classPathResource = new org . constretto . model . ClassPathResource ( org . constretto . model . ClassPathResourceTest . NON_EXISITING_CLASSPATH_RESOURCE ) ; "<AssertPlaceHolder>" ; } exists ( ) { java . io . InputStream is = getInputStream ( ) ; boolean result = is != null ; try { if ( is != null ) { is . close ( ) ; } } catch ( java . lang . Exception e ) { } return result ; }
org . junit . Assert . assertFalse ( classPathResource . exists ( ) )
getMethodNameGetsTheMethodName ( ) { java . lang . String methodNameStr = "abcdefg" ; byte [ ] data = new byte [ 1 ] ; com . microsoft . azure . sdk . iot . device . MessageType messageType = com . microsoft . azure . sdk . iot . device . MessageType . DEVICE_TWIN ; com . microsoft . azure . sdk . iot . device . transport . IotHubTransportMessage iotHubTransportMessage = new com . microsoft . azure . sdk . iot . device . transport . IotHubTransportMessage ( data , messageType ) ; iotHubTransportMessage . setMethodName ( methodNameStr ) ; java . lang . String methodName = iotHubTransportMessage . getMethodName ( ) ; "<AssertPlaceHolder>" ; } getMethodName ( ) { return java . lang . Thread . currentThread ( ) . getStackTrace ( ) [ com . microsoft . azure . sdk . iot . device . CustomLogger . CALLING_METHOD_NAME_DEPTH ] . getMethodName ( ) ; }
org . junit . Assert . assertEquals ( methodNameStr , methodName )
testVisitDateValue ( ) { es . ieci . tecdoc . fwktd . sql . node . expression . DateValue value = new es . ieci . tecdoc . fwktd . sql . node . expression . DateValue ( "2008-01-01" ) ; expressionRenderer . visit ( value ) ; "<AssertPlaceHolder>" ; } getSqlString ( ) { return sqlString ; }
org . junit . Assert . assertNotNull ( value . getSqlString ( ) )
deassignUserFromSubscription_Empty ( ) { org . oscm . domobjects . Subscription sub = givenSubscription ( ) ; deassignUserFromSubscription ( sub , new java . util . ArrayList < org . oscm . domobjects . UsageLicense > ( ) ) ; java . util . List < org . oscm . auditlog . model . AuditLogEntry > logEntries = org . oscm . auditlog . AuditLogData . get ( ) ; "<AssertPlaceHolder>" ; } get ( ) { return org . oscm . auditlog . AuditLogData . auditLogData . get ( ) ; }
org . junit . Assert . assertNull ( logEntries )
setKeyboardShortcut ( ) { java . lang . Object acceleratorKey = exportTAAction . getValue ( Action . ACCELERATOR_KEY ) ; pipe . actions . file . KeyStroke stroke = pipe . actions . file . KeyStroke . getKeyStroke ( "meta<sp>E" ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( stroke , acceleratorKey )
testGetParametersWithDefaultEntity ( ) { org . lnu . is . domain . enrolment . subject . EnrolmentSubject entity = new org . lnu . is . domain . enrolment . subject . EnrolmentSubject ( ) ; java . util . Map < java . lang . String , java . lang . Object > expected = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; expected . put ( "status" , RowStatus . ACTIVE ) ; expected . put ( "userGroups" , groups ) ; java . util . Map < java . lang . String , java . lang . Object > actual = unit . getParameters ( entity ) ; "<AssertPlaceHolder>" ; } getParameters ( org . springframework . web . context . request . NativeWebRequest ) { java . util . Map < java . lang . String , java . lang . Object > resultMap = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; java . util . Map < java . lang . String , java . lang . String > pathVariables = ( ( java . util . Map < java . lang . String , java . lang . String > ) ( webRequest . getAttribute ( HandlerMapping . URI_TEMPLATE_VARIABLES_ATTRIBUTE , RequestAttributes . SCOPE_REQUEST ) ) ) ; java . util . Map < java . lang . String , java . lang . Object > requestParams = getRequestParameterMap ( webRequest ) ; for ( Map . Entry < java . lang . String , java . lang . Object > entry : requestParams . entrySet ( ) ) { resultMap . put ( entry . getKey ( ) , entry . getValue ( ) ) ; } resultMap . putAll ( pathVariables ) ; return resultMap ; }
org . junit . Assert . assertEquals ( expected , actual )
testEqualsWithFullRegions ( ) { edu . illinois . library . cantaloupe . resource . iiif . v1 . Region region1 = new edu . illinois . library . cantaloupe . resource . iiif . v1 . Region ( ) ; region1 . setFull ( true ) ; edu . illinois . library . cantaloupe . resource . iiif . v1 . Region region2 = new edu . illinois . library . cantaloupe . resource . iiif . v1 . Region ( ) ; region2 . setFull ( true ) ; "<AssertPlaceHolder>" ; } setFull ( boolean ) { this . isFull = isFull ; }
org . junit . Assert . assertEquals ( region1 , region2 )
savePerson ( ) { com . example . model . Person person = new com . example . model . Person ( ) ; person . setName ( "" ) ; person . setAge ( 18 ) ; int result = personService . savePserson ( person ) ; "<AssertPlaceHolder>" ; } setAge ( java . lang . Integer ) { this . age = age ; }
org . junit . Assert . assertEquals ( 2 , result )
testQuarterDate ( ) { java . lang . String sqlText = ( "select<sp>d,<sp>QUARTER(d)<sp>as<sp>\"QUARTER\"<sp>from<sp>" + ( com . splicemachine . derby . utils . SpliceDateFunctionsIT . tableWatcherI ) ) + "<sp>order<sp>by<sp>d" ; try ( com . splicemachine . derby . utils . ResultSet rs = methodWatcher . executeQuery ( sqlText ) ) { java . lang . String expected = "D<sp>|<sp>QUARTER<sp>|\n" + ( ( ( ( ( ( "----------------------\n" + "2009-01-02<sp>|<sp>1<sp>|\n" ) + "----------------------\n" 0 ) + "2009-09-02<sp>|<sp>3<sp>|\n" ) + "2012-12-31<sp>|<sp>4<sp>|\n" ) + "2012-12-31<sp>|<sp>4<sp>|\n" ) + "2013-12-31<sp>|<sp>4<sp>|" ) ; "<AssertPlaceHolder>" ; } } toStringUnsorted ( com . splicemachine . homeless . ResultSet ) { return com . splicemachine . homeless . TestUtils . FormattedResult . ResultFactory . convert ( "" , rs , false ) . toString ( ) . trim ( ) ; }
org . junit . Assert . assertEquals ( ( ( "\n" + sqlText ) + "\n" ) , expected , TestUtils . FormattedResult . ResultFactory . toStringUnsorted ( rs ) )
testTopN4 ( ) { java . lang . String sqlText = "select<sp>count(*)<sp>from<sp>(select<sp>top<sp>2<sp>*<sp>from<sp>foo<sp>union<sp>all<sp>select<sp>*<sp>from<sp>foo2)dt" ; java . lang . String expected = "1<sp>|\n" + ( "----\n" + "<sp>2<sp>|" ) ; java . sql . ResultSet rs = methodWatcher . executeQuery ( sqlText ) ; "<AssertPlaceHolder>" ; rs . close ( ) ; } toStringUnsorted ( com . splicemachine . homeless . ResultSet ) { return com . splicemachine . homeless . TestUtils . FormattedResult . ResultFactory . convert ( "" , rs , false ) . toString ( ) . trim ( ) ; }
org . junit . Assert . assertEquals ( ( ( "\n" + sqlText ) + "\n" ) , expected , TestUtils . FormattedResult . ResultFactory . toStringUnsorted ( rs ) )
testApplicationName ( ) { java . lang . String expected = "The<sp>Greatest<sp>Sample<sp>Ever" ; com . codesolid . properties . TestBean test = ( ( com . codesolid . properties . TestBean ) ( ac . getBean ( "testBean" ) ) ) ; java . lang . String actual = test . getApplicationName ( ) ; "<AssertPlaceHolder>" ; } getApplicationName ( ) { return applicationName ; }
org . junit . Assert . assertEquals ( actual , expected )
testGetHistoryDirWithFolder ( ) { java . lang . String folderName = "FolderName" ; final java . io . File destDir = unpackResourceZip . getResource ( ( ( "config-history/jobs/" + folderName ) + "/jobs/Test1" ) ) ; org . apache . commons . io . FileUtils . copyDirectory ( unpackResourceZip . getResource ( "config-history/jobs/Test1" ) , destDir ) ; final java . io . File configFile = unpackResourceZip . getResource ( ( ( "jobs/" + folderName ) + "/jobs/Test1/config.xml" ) ) ; java . io . File result = sutWithUserAndNoDuplicateHistory . getHistoryDir ( configFile ) ; "<AssertPlaceHolder>" ; } getHistoryDir ( java . io . File ) { final java . lang . String configRootDir = configFile . getParent ( ) ; final java . lang . String jenkinsRootDir = jenkinsHome . getPath ( ) ; if ( ! ( configRootDir . startsWith ( jenkinsRootDir ) ) ) { throw new java . lang . IllegalArgumentException ( ( "Trying<sp>to<sp>get<sp>history<sp>dir<sp>for<sp>object<sp>outside<sp>of<sp>Jenkins:<sp>" + configFile ) ) ; } java . lang . String underRootDir = null ; if ( configRootDir . equals ( jenkinsRootDir ) ) { final java . lang . String fileName = configFile . getName ( ) ; underRootDir = fileName . substring ( 0 , fileName . lastIndexOf ( '.' ) ) ; } final java . io . File historyDir ; if ( underRootDir == null ) { final java . lang . String remainingPath = configRootDir . substring ( ( ( ( jenkinsRootDir . length ( ) ) + ( JobConfigHistoryConsts . JOBS_HISTORY_DIR . length ( ) ) ) + 1 ) ) ; historyDir = new java . io . File ( getJobHistoryRootDir ( ) , remainingPath ) ; } else { historyDir = new java . io . File ( historyRootDir , underRootDir ) ; } return historyDir ; }
org . junit . Assert . assertEquals ( destDir , result )