input
stringlengths 28
18.7k
| output
stringlengths 39
1.69k
|
|---|---|
testGeospatialPredicateNullOperation ( ) { java . lang . String methodName = "testGeospatialPredicateNullOperation" ; ddf . catalog . pubsub . PredicateTest . LOGGER . debug ( "***************<sp>START:<sp>{}<sp>*****************" , methodName ) ; java . lang . String geometryWkt = "POLYGON<sp>((40<sp>34,<sp>40<sp>33,<sp>44.5<sp>33,<sp>44.5<sp>34,<sp>40<sp>34))" ; java . lang . String operation = "overlaps" ; double distance = 1.0E-7 ; ddf . catalog . pubsub . predicate . GeospatialPredicate predicate = new ddf . catalog . pubsub . predicate . GeospatialPredicate ( geometryWkt , operation , distance ) ; ddf . catalog . data . impl . MetacardImpl metacard = new ddf . catalog . data . impl . MetacardImpl ( ) ; metacard . setLocation ( "POINT<sp>(41<sp>34)" ) ; metacard . setMetadata ( ddf . catalog . pubsub . TestDataLibrary . getCatAndDogEntry ( ) ) ; java . util . HashMap < java . lang . String , java . lang . Object > properties = new java . util . HashMap ( ) ; properties . put ( PubSubConstants . HEADER_CONTENT_TYPE_KEY , "type1,version1" ) ; properties . put ( PubSubConstants . HEADER_OPERATION_KEY , null ) ; properties . put ( PubSubConstants . HEADER_ENTRY_KEY , metacard ) ; java . util . Map < java . lang . String , java . lang . Object > contextualMap = constructContextualMap ( metacard ) ; properties . put ( PubSubConstants . HEADER_CONTEXTUAL_KEY , contextualMap ) ; org . osgi . service . event . Event testEvent = new org . osgi . service . event . Event ( "topic" , properties ) ; "<AssertPlaceHolder>" ; ddf . catalog . pubsub . PredicateTest . LOGGER . debug ( "***************<sp>END:<sp>{}<sp>*****************" , methodName ) ; } matches ( org . osgi . service . event . Event ) { ddf . catalog . pubsub . predicate . ContentTypePredicate . LOGGER . debug ( "ENTERING:<sp>matches" ) ; boolean status = false ; java . util . Map < java . lang . String , java . lang . Object > contextualMap = ( ( java . util . Map < java . lang . String , java . lang . Object > ) ( properties . getProperty ( PubSubConstants . HEADER_CONTEXTUAL_KEY ) ) ) ; java . lang . String operation = ( ( java . lang . String ) ( properties . getProperty ( PubSubConstants . HEADER_OPERATION_KEY ) ) ) ; ddf . catalog . pubsub . predicate . ContentTypePredicate . LOGGER . debug ( "operation<sp>=<sp>{}" , operation ) ; if ( contextualMap != null ) { java . lang . String metadata = ( ( java . lang . String ) ( contextualMap . get ( "METADATA" ) ) ) ; if ( ( PubSubConstants . DELETE . equals ( operation ) ) && ( PubSubConstants . METADATA_DELETED . equals ( metadata ) ) ) { ddf . catalog . pubsub . predicate . ContentTypePredicate . LOGGER . debug ( "Detected<sp>a<sp>DELETE<sp>operation<sp>where<sp>metadata<sp>is<sp>just<sp>the<sp>word<sp>'deleted',<sp>so<sp>send<sp>event<sp>on<sp>to<sp>subscriber" ) ; ddf . catalog . pubsub . predicate . ContentTypePredicate . LOGGER . debug ( "EXITING:<sp>matches" ) ; return true ; } } java . lang . Object inputContentType = properties . getProperty ( PubSubConstants . HEADER_CONTENT_TYPE_KEY ) ; ddf . catalog . pubsub . predicate . ContentTypePredicate . LOGGER . debug ( "input<sp>obtained<sp>from<sp>event<sp>properties:<sp>" , inputContentType ) ; if ( inputContentType != null ) { ddf . catalog . pubsub . criteria . contenttype . ContentTypeEvaluationCriteriaImpl ctec = new ddf . catalog . pubsub . criteria . contenttype . ContentTypeEvaluationCriteriaImpl ( this , inputContentType . toString ( ) ) ; status = ddf . catalog . pubsub . criteria . contenttype . ContentTypeEvaluator . evaluate ( ctec ) ; } ddf . catalog . pubsub . predicate . ContentTypePredicate . LOGGER . debug ( "EXITING:<sp>matches" ) ; return status ; }
|
org . junit . Assert . assertTrue ( predicate . matches ( testEvent ) )
|
testInnerClass ( javax . enterprise . inject . Instance ) { org . jboss . weld . tests . smoke . Crasher crasher = instance . get ( ) ; "<AssertPlaceHolder>" ; } get ( ) { if ( ( ctx ) == null ) { ctx = new org . jboss . weld . module . web . el . ELCreationalContext < java . lang . Object > ( null ) ; } return ctx ; }
|
org . junit . Assert . assertNotNull ( crasher )
|
testFindKeyWithSpace ( ) { final ch . cyberduck . core . Path container = new ch . cyberduck . core . Path ( "test-us-east-1-cyberduck" , java . util . EnumSet . of ( Path . Type . directory , Path . Type . volume ) ) ; final ch . cyberduck . core . Path test = new ch . cyberduck . core . Path ( container , "t<sp>f" , java . util . EnumSet . of ( Path . Type . file ) ) ; final java . util . List < org . jets3t . service . model . MultipartUpload > list = new ch . cyberduck . core . s3 . S3DefaultMultipartService ( session ) . find ( test ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return ( size ( ) ) == 0 ; }
|
org . junit . Assert . assertTrue ( list . isEmpty ( ) )
|
testName ( ) { com . avanza . astrix . context . AstrixConfigurer astrixConfigurer = new com . avanza . astrix . context . AstrixConfigurer ( ) ; astrixConfigurer . set ( AstrixSettings . SERVICE_REGISTRY_URI , tutorial . p3 . LunchServicePuTest . serviceRegistry . getServiceUri ( ) ) ; astrixConfigurer . set ( AstrixSettings . BEAN_BIND_ATTEMPT_INTERVAL , 100 ) ; astrixConfigurer . setBasePackage ( "tutorial.p3" ) ; astrix = astrixConfigurer . configure ( ) ; tutorial . p3 . api . LunchService lunchService = astrix . waitForBean ( tutorial . p3 . api . LunchService . class , 10000 ) ; lunchService . addLunchRestaurant ( "FEI" ) ; "<AssertPlaceHolder>" ; } getAllRestaurants ( ) { return AllLunchRestaurants . ALL_RESTAURANTS ; }
|
org . junit . Assert . assertEquals ( "FEI" , lunchService . getAllRestaurants ( ) . get ( 0 ) )
|
testSerde ( ) { java . util . List < io . cdap . cdap . api . dataset . table . TableSplit > splits = java . util . Arrays . asList ( new io . cdap . cdap . api . dataset . table . TableSplit ( io . cdap . cdap . api . common . Bytes . toBytes ( "0" ) , io . cdap . cdap . api . common . Bytes . toBytes ( "1" ) ) , new io . cdap . cdap . api . dataset . table . TableSplit ( io . cdap . cdap . api . common . Bytes . toBytes ( "1" ) , io . cdap . cdap . api . common . Bytes . toBytes ( "2" ) ) ) ; java . util . List < io . cdap . cdap . api . data . batch . Split > decoded = io . cdap . cdap . api . data . batch . Splits . decode ( io . cdap . cdap . api . data . batch . Splits . encode ( splits ) , new java . util . ArrayList < io . cdap . cdap . api . data . batch . Split > ( ) , getClass ( ) . getClassLoader ( ) ) ; "<AssertPlaceHolder>" ; } getClassLoader ( ) { return classLoader ; }
|
org . junit . Assert . assertEquals ( splits , decoded )
|
testFromGraph ( ) { int numNodes = 20 ; int numIterations = 20 ; for ( int i = 0 ; i < numIterations ; i ++ ) { edu . cmu . tetrad . test . Graph dag = edu . cmu . tetrad . test . GraphUtils . randomDag ( numNodes , 0 , numNodes , 10 , 10 , 10 , false ) ; edu . cmu . tetrad . search . Fges fges = new edu . cmu . tetrad . search . Fges ( new edu . cmu . tetrad . test . GraphScore ( dag ) ) ; fges . setFaithfulnessAssumed ( true ) ; edu . cmu . tetrad . test . Graph pattern1 = fges . search ( ) ; edu . cmu . tetrad . test . Graph pattern2 = new edu . cmu . tetrad . search . Pc ( new edu . cmu . tetrad . test . IndTestDSep ( dag ) ) . search ( ) ; "<AssertPlaceHolder>" ; } } search ( ) { edu . cmu . tetrad . search . Graph graph = getResultGraph ( ) ; this . logger . log ( "graph" , ( "\nReturning<sp>this<sp>graph:<sp>" + graph ) ) ; return graph ; }
|
org . junit . Assert . assertEquals ( pattern2 , pattern1 )
|
testSchemasPassedThrough ( ) { java . util . List < org . apache . beam . sdk . transforms . ParDoSchemaTest . InferredPojo > pojoList = org . apache . beam . vendor . guava . v20_0 . com . google . common . collect . Lists . newArrayList ( new org . apache . beam . sdk . transforms . ParDoSchemaTest . InferredPojo ( "a" , 1 ) , new org . apache . beam . sdk . transforms . ParDoSchemaTest . InferredPojo ( "b" , 2 ) , new org . apache . beam . sdk . transforms . ParDoSchemaTest . InferredPojo ( "c" , 3 ) ) ; org . apache . beam . sdk . values . PCollection < org . apache . beam . sdk . transforms . ParDoSchemaTest . InferredPojo > out = pipeline . apply ( org . apache . beam . sdk . transforms . Create . of ( pojoList ) ) . apply ( org . apache . beam . sdk . transforms . Filter . by ( ( e ) -> true ) ) ; "<AssertPlaceHolder>" ; pipeline . run ( ) ; } hasSchema ( ) { return ( ( coderOrFailure . coder ) != null ) && ( ( coderOrFailure . coder ) instanceof org . apache . beam . sdk . schemas . SchemaCoder ) ; }
|
org . junit . Assert . assertTrue ( out . hasSchema ( ) )
|
countPreviousContinuedBackslash_A$String$int$int_StringIsEmpty ( ) { java . lang . String str = "" ; int currentNotBackslashCharIndex = 0 ; int count = 0 ; int actual = org . junithelper . core . filter . impl . TrimInsideOfStringFilter . countPreviousContinuedBackslash ( str , currentNotBackslashCharIndex , count ) ; int expected = 0 ; "<AssertPlaceHolder>" ; } countPreviousContinuedBackslash ( java . lang . String , int , int ) { org . junithelper . core . util . Assertion . on ( "currentNotBackslashCharIndex" ) . mustBeGreaterThanOrEqual ( currentNotBackslashCharIndex , 0 ) ; org . junithelper . core . util . Assertion . on ( "count" ) . mustBeGreaterThanOrEqual ( count , 0 ) ; java . lang . Character previous = null ; if ( currentNotBackslashCharIndex > 0 ) { int previousIndex = currentNotBackslashCharIndex - 1 ; previous = str . charAt ( previousIndex ) ; if ( previous == '\\' ) { return org . junithelper . core . filter . impl . TrimInsideOfStringFilter . countPreviousContinuedBackslash ( str , previousIndex , ( count + 1 ) ) ; } else { return count ; } } return count ; }
|
org . junit . Assert . assertThat ( actual , is ( equalTo ( expected ) ) )
|
testRewriteConfidentialNoParams ( ) { System . out . println ( "running<sp>testRewriteConfidentialNoParams()" ) ; LOGGER . info ( org . owasp . security . logging . log4j . Log4JMarkerConverter . convertMarker ( SecurityMarkers . CONFIDENTIAL ) , ( "ssn=" + ( org . owasp . security . logging . log4j . mask . MaskingRewritePolicyTest . SSN ) ) ) ; org . apache . logging . log4j . core . LogEvent failEvent = appender . getEvents ( ) . get ( 0 ) ; org . apache . logging . log4j . message . Message message = failEvent . getMessage ( ) ; System . out . println ( ( "Formatted<sp>message:<sp>" + ( message . getFormattedMessage ( ) ) ) ) ; "<AssertPlaceHolder>" ; } contains ( org . slf4j . Marker ) { for ( org . slf4j . Marker ref : references ) { if ( ref . contains ( other ) ) { return true ; } } return false ; }
|
org . junit . Assert . assertTrue ( message . getFormattedMessage ( ) . contains ( ( "ssn=" + ( org . owasp . security . logging . log4j . mask . MaskingRewritePolicyTest . SSN ) ) ) )
|
testGetParentLogger ( ) { io . sniffy . sql . Driver driver = io . sniffy . sql . DriverManager . getDriver ( "sniffy:jdbc:h2:mem:" ) ; try { driver . getParentLogger ( ) ; org . junit . Assert . fail ( ) ; } catch ( io . sniffy . sql . SQLFeatureNotSupportedException e ) { "<AssertPlaceHolder>" ; } } getParentLogger ( ) { return dataSource . getParentLogger ( ) ; }
|
org . junit . Assert . assertNotNull ( e )
|
shouldReturnDefaultVersionIfNoGeoVersion ( ) { com . emc . storageos . db . client . DbClient dbClientMock = org . easymock . EasyMock . createMock ( com . emc . storageos . db . client . DbClient . class ) ; org . easymock . EasyMock . expect ( dbClientMock . queryByType ( com . emc . storageos . db . client . model . VdcVersion . class , true ) ) . andReturn ( new java . util . ArrayList < java . net . URI > ( ) ) ; org . easymock . EasyMock . expect ( dbClientMock . queryObject ( com . emc . storageos . db . client . model . VdcVersion . class , new java . util . ArrayList < java . net . URI > ( ) ) ) . andReturn ( new java . util . ArrayList < com . emc . storageos . db . client . model . VdcVersion > ( ) ) ; org . easymock . EasyMock . expect ( dbClientMock . queryByType ( com . emc . storageos . db . client . model . VirtualDataCenter . class , true ) ) . andReturn ( new java . util . ArrayList < java . net . URI > ( ) ) ; org . easymock . EasyMock . replay ( dbClientMock ) ; com . emc . storageos . db . common . VdcUtil . setDbClient ( dbClientMock ) ; java . lang . String minialVdcVersion = com . emc . storageos . db . common . VdcUtil . getMinimalVdcVersion ( ) ; java . lang . String expectedVdcVersion = DbConfigConstants . DEFAULT_VDC_DB_VERSION ; "<AssertPlaceHolder>" ; } getMinimalVdcVersion ( ) { java . util . List < java . net . URI > vdcIds = com . emc . storageos . db . common . VdcUtil . getVdcIds ( ) ; java . util . List < java . net . URI > geoVerIds = com . emc . storageos . db . common . VdcUtil . dbClient . queryByType ( com . emc . storageos . db . client . model . VdcVersion . class , true ) ; java . util . List < com . emc . storageos . db . client . model . VdcVersion > geoVersions = com . emc . storageos . db . common . VdcUtil . dbClient . queryObject ( com . emc . storageos . db . client . model . VdcVersion . class , geoVerIds ) ; if ( ! ( com . emc . storageos . db . common . VdcUtil . hasAnyGeoVersion ( geoVersions ) ) ) { com . emc . storageos . db . common . VdcUtil . log . info ( "GeoVersion<sp>doesn't<sp>exist,<sp>return<sp>default<sp>version" ) ; return DbConfigConstants . DEFAULT_VDC_DB_VERSION ; } if ( com . emc . storageos . db . common . VdcUtil . missVersionFor ( vdcIds , geoVersions ) ) { com . emc . storageos . db . common . VdcUtil . log . info ( "GeoVersion<sp>not<sp>exist<sp>for<sp>vdcs,<sp>return<sp>default<sp>version" ) ; return DbConfigConstants . DEFAULT_VDC_DB_VERSION ; } java . lang . String minimalVersion = null ; for ( com . emc . storageos . db . client . model . VdcVersion geoVersion : geoVersions ) { if ( ( minimalVersion == null ) || ( ( com . emc . storageos . db . common . VdcUtil . VdcVersionComparator . compare ( minimalVersion , geoVersion . getVersion ( ) ) ) > 0 ) ) { minimalVersion = geoVersion . getVersion ( ) ; } } com . emc . storageos . db . common . VdcUtil . log . info ( "minimal<sp>Geo<sp>version<sp>{}" , minimalVersion ) ; return minimalVersion ; }
|
org . junit . Assert . assertEquals ( expectedVdcVersion , minialVdcVersion )
|
usesCustomComparisonFormatter ( ) { java . lang . String control = "<a><b></b><c/></a>" ; java . lang . String test = "<a><b></b><c/><d/></a>" ; org . xmlunit . diff . Diff myDiff = org . xmlunit . builder . DiffBuilder . compare ( control ) . withTest ( test ) . withComparisonController ( ComparisonControllers . StopWhenDifferent ) . withComparisonFormatter ( new org . xmlunit . builder . DiffBuilderTest . DummyFormatter ( ) ) . build ( ) ; "<AssertPlaceHolder>" ; } toString ( ) { java . lang . StringBuffer buf = new java . lang . StringBuffer ( getClass ( ) . getName ( ) ) ; appendMessage ( buf ) ; return buf . toString ( ) ; }
|
org . junit . Assert . assertEquals ( "foo" , myDiff . toString ( ) )
|
testConfig1Predicates ( ) { com . google . common . base . Predicate < de . unima . dws . dbpediagraph . loader . Triple > loadingTypes = de . unima . dws . dbpediagraph . loader . TriplePredicate . fromConfig ( de . unima . dws . dbpediagraph . loader . TestTriplePredicate . config1 ) ; "<AssertPlaceHolder>" ; } fromConfig ( org . apache . commons . configuration . Configuration ) { java . util . List < de . unima . dws . dbpediagraph . loader . TriplePredicate > loadingTypes = de . unima . dws . dbpediagraph . util . EnumUtils . enumsfromConfig ( de . unima . dws . dbpediagraph . loader . TriplePredicate . class , config , de . unima . dws . dbpediagraph . loader . TriplePredicate . CONFIG_TRIPLE_PREDICATE ) ; if ( ( loadingTypes == null ) || ( loadingTypes . isEmpty ( ) ) ) return de . unima . dws . dbpediagraph . loader . TriplePredicate . ALL ; return com . google . common . base . Predicates . and ( loadingTypes ) ; }
|
org . junit . Assert . assertNotNull ( loadingTypes )
|
testThrowOnPartialStrategyWithOneTable ( ) { createOneTable ( "SUS1" ) ; setStrategy ( org . apache . cayenne . access . dbsync . ThrowOnPartialSchemaStrategy . class ) ; java . lang . String template = "SELECT<sp>#result('ARTIST_ID'<sp>'int')<sp>FROM<sp>ARTIST<sp>ORDER<sp>BY<sp>ARTIST_ID" ; org . apache . cayenne . query . SQLTemplate query = new org . apache . cayenne . query . SQLTemplate ( java . lang . Object . class , template ) ; org . apache . cayenne . access . MockOperationObserver observer = new org . apache . cayenne . access . MockOperationObserver ( ) ; try { node . performQueries ( java . util . Collections . singletonList ( query ) , observer ) ; "<AssertPlaceHolder>" ; org . junit . Assert . fail ( "Must<sp>have<sp>thrown<sp>on<sp>partial<sp>schema" ) ; } catch ( org . apache . cayenne . CayenneRuntimeException e ) { } } existingTables ( ) { java . util . Collection < java . lang . String > present = new java . util . ArrayList < java . lang . String > ( ) ; for ( java . util . Map . Entry < java . lang . String , java . lang . Boolean > e : tablesMap ( ) . entrySet ( ) ) { if ( e . getValue ( ) ) { present . add ( e . getKey ( ) ) ; } } return present ; }
|
org . junit . Assert . assertEquals ( 1 , existingTables ( ) . size ( ) )
|
countShouldReturnZeroIfUnknownSku ( ) { createConsumer ( owner ) ; java . util . List < java . lang . String > skus = new java . util . ArrayList ( ) ; skus . add ( "unknown-sku" ) ; int count = consumerCurator . countConsumers ( owner . getKey ( ) , typeLabels , skus , subscriptionIds , contracts ) ; "<AssertPlaceHolder>" ; } getKey ( ) { return key ; }
|
org . junit . Assert . assertEquals ( 0 , count )
|
testUpdateRetry ( ) { org . slc . sli . common . util . tenantdb . TenantContext . setTenantId ( "SLIUnitTest" ) ; repository . deleteAll ( "student" , null ) ; com . mongodb . DBObject indexKeys = new com . mongodb . BasicDBObject ( "body.cityOfBirth" , 1 ) ; mongoTemplate . getCollection ( "student" ) . ensureIndex ( indexKeys ) ; repository . create ( "student" , buildTestStudentEntity ( ) ) ; org . slc . sli . domain . Entity entity = repository . findOne ( "student" , new org . slc . sli . domain . NeutralQuery ( ) ) ; org . slc . sli . dal . repository . Map < java . lang . String , java . lang . Object > studentBody = entity . getBody ( ) ; studentBody . put ( "cityOfBirth" , "ABC" ) ; org . slc . sli . domain . Entity studentEntity = new org . slc . sli . domain . MongoEntity ( "student" , entity . getEntityId ( ) , studentBody , entity . getMetaData ( ) ) ; repository . updateWithRetries ( "student" , studentEntity , 5 ) ; org . slc . sli . domain . NeutralQuery neutralQuery = new org . slc . sli . domain . NeutralQuery ( ) ; neutralQuery . addCriteria ( new org . slc . sli . domain . NeutralCriteria ( "cityOfBirth=ABC" ) ) ; "<AssertPlaceHolder>" ; repository . deleteAll ( "student" , null ) ; mongoTemplate . getCollection ( "student" ) . dropIndex ( indexKeys ) ; } count ( java . lang . String , org . slc . sli . domain . NeutralQuery ) { return 0 ; }
|
org . junit . Assert . assertEquals ( 1 , repository . count ( "student" , neutralQuery ) )
|
test1 ( ) { java . util . List < io . djigger . aggregation . Thread > threads = threads ( new java . lang . Object [ ] [ ] { new java . lang . Object [ ] { "m1" , "m2" } , new java . lang . Object [ ] { "m1" , "m3" } , new java . lang . Object [ ] { "m1" , "m2" } , new java . lang . Object [ ] { "m1" , "m3" } } ) ; final java . util . List < io . djigger . monitoring . java . instrumentation . InstrumentationEvent > events = new java . util . ArrayList ( ) ; io . djigger . samplig . PseudoInstrumentationEventsGenerator a = new io . djigger . samplig . PseudoInstrumentationEventsGenerator ( new io . djigger . samplig . PseudoInstrumentationEventsGenerator . Listener ( ) { @ io . djigger . sampling . Override public void onPseudoInstrumentationEvent ( io . djigger . ui . model . PseudoInstrumentationEvent event ) { events . add ( event ) ; System . out . println ( event ) ; } } ) ; a . generateApproximatedEvents ( threads ) ; "<AssertPlaceHolder>" ; } generateApproximatedEvents ( io . djigger . samplig . List ) { for ( io . djigger . aggregation . Thread thread : threads ) { io . djigger . samplig . List < io . djigger . ui . model . NodeID > previousPath = null ; io . djigger . monitoring . java . model . ThreadInfo previousThreadInfo = null ; for ( io . djigger . aggregation . Thread . RealNodePathWrapper realNodePath : thread . getRealNodePathSequence ( ) ) { io . djigger . samplig . List < io . djigger . ui . model . NodeID > currentPath = realNodePath . getPath ( ) . getFullPath ( ) ; io . djigger . monitoring . java . model . ThreadInfo threadInfo = realNodePath . getThreadInfo ( ) ; for ( int level = 0 ; level < ( java . lang . Math . max ( currentPath . size ( ) , ( previousPath != null ? previousPath . size ( ) : 0 ) ) ) ; level ++ ) { io . djigger . ui . model . NodeID currentNodeID = ( ( currentPath . size ( ) ) > level ) ? currentPath . get ( level ) : null ; io . djigger . ui . model . NodeID previousNodeID = ( ( previousPath != null ) && ( ( previousPath . size ( ) ) > level ) ) ? previousPath . get ( level ) : null ; if ( currentNodeID != null ) { if ( ! ( currentNodeID . equals ( previousNodeID ) ) ) { if ( previousPath != null ) { leaveBranch ( previousThreadInfo , previousPath , level ) ; } enterBranch ( threadInfo , currentPath , level ) ; break ; } } else { if ( previousPath != null ) { leaveBranch ( previousThreadInfo , previousPath , level ) ; break ; } } } previousPath = currentPath ; previousThreadInfo = threadInfo ; } leaveBranch ( previousThreadInfo ) ; } }
|
org . junit . Assert . assertEquals ( 5 , events . size ( ) )
|
testCheckArtifactFailOnNoFile ( ) { org . sonatype . aether . impl . UpdateCheck < org . sonatype . aether . artifact . Artifact , org . sonatype . aether . transfer . ArtifactTransferException > check = newArtifactCheck ( ) ; check . setItem ( artifact . setFile ( null ) ) ; check . setFile ( null ) ; manager . checkArtifact ( session , check ) ; "<AssertPlaceHolder>" ; } getException ( ) { return event . getException ( ) ; }
|
org . junit . Assert . assertNotNull ( check . getException ( ) )
|
testName_Gets_Value_From_Element ( ) { mmarquee . automation . AutomationElement element = org . mockito . Mockito . mock ( mmarquee . automation . AutomationElement . class ) ; mmarquee . automation . pattern . Toggle pattern = org . mockito . Mockito . mock ( mmarquee . automation . pattern . Toggle . class ) ; when ( pattern . isAvailable ( ) ) . thenReturn ( true ) ; when ( element . getName ( ) ) . thenReturn ( "NAME" ) ; mmarquee . automation . uiautomation . IUIAutomation mocked_automation = org . mockito . Mockito . mock ( mmarquee . automation . uiautomation . IUIAutomation . class ) ; mmarquee . automation . UIAutomation instance = new mmarquee . automation . UIAutomation ( mocked_automation ) ; mmarquee . automation . controls . AutomationCheckBox checkbox = new mmarquee . automation . controls . AutomationCheckBox ( new mmarquee . automation . controls . ElementBuilder ( element ) . addPattern ( pattern ) . automation ( instance ) ) ; java . lang . String name = checkbox . getName ( ) ; "<AssertPlaceHolder>" ; } getName ( ) { return this . name ; }
|
org . junit . Assert . assertTrue ( name . equals ( "NAME" ) )
|
testDoubleLevelTree ( ) { org . antlr . runtime . tree . TreeWizard wiz = new org . antlr . runtime . tree . TreeWizard ( org . antlr . test . TestTreeWizard . adaptor , org . antlr . test . TestTreeWizard . tokens ) ; org . antlr . runtime . tree . CommonTree t = ( ( org . antlr . runtime . tree . CommonTree ) ( wiz . create ( "(A<sp>(B<sp>C)<sp>(B<sp>D)<sp>E)" ) ) ) ; java . lang . String found = t . toStringTree ( ) ; java . lang . String expecting = "(A<sp>(B<sp>C)<sp>(B<sp>D)<sp>E)" ; "<AssertPlaceHolder>" ; } toStringTree ( ) { if ( ( ( children ) == null ) || ( children . isEmpty ( ) ) ) { return this . toString ( ) ; } java . lang . StringBuilder buf = new java . lang . StringBuilder ( ) ; if ( ! ( isNil ( ) ) ) { buf . append ( "(" ) ; buf . append ( this . toString ( ) ) ; buf . append ( '<sp>' ) ; } for ( int i = 0 ; ( ( children ) != null ) && ( i < ( children . size ( ) ) ) ; i ++ ) { org . antlr . runtime . tree . Tree t = ( ( org . antlr . runtime . tree . Tree ) ( children . get ( i ) ) ) ; if ( i > 0 ) { buf . append ( '<sp>' ) ; } buf . append ( t . toStringTree ( ) ) ; } if ( ! ( isNil ( ) ) ) { buf . append ( ")" ) ; } return buf . toString ( ) ; }
|
org . junit . Assert . assertEquals ( expecting , found )
|
testNull ( ) { "<AssertPlaceHolder>" ; } buildInterfaceSpecifier ( java . lang . Object ) { if ( input == null ) { return AllInterfacesInterfaceSpecifier . INSTANCE ; } checkArgument ( ( input instanceof java . lang . String ) , ( ( org . batfish . specifier . FlexibleInterfaceSpecifierFactory . NAME ) + "<sp>requires<sp>String<sp>input" ) ) ; java . lang . String str = ( ( java . lang . String ) ( input ) ) . trim ( ) ; java . util . regex . Matcher matcher = org . batfish . specifier . FlexibleInterfaceSpecifierFactory . CONNECTED_TO_PATTERN . matcher ( str ) ; if ( matcher . find ( ) ) { java . lang . String ipWildcard = matcher . group ( 1 ) . trim ( ) ; return new org . batfish . specifier . InterfaceWithConnectedIpsSpecifier . Factory ( ) . buildInterfaceSpecifier ( ipWildcard ) ; } matcher = org . batfish . specifier . FlexibleInterfaceSpecifierFactory . REF_PATTERN . matcher ( str ) ; if ( matcher . find ( ) ) { java . lang . String refInput = matcher . group ( 1 ) . trim ( ) ; java . lang . String [ ] words = refInput . split ( "," ) ; checkArgument ( ( ( words . length ) == 2 ) , "ref.interfaceGroup()<sp>needs<sp>interface<sp>group<sp>and<sp>reference<sp>book<sp>names<sp>separated<sp>by<sp>','" ) ; return new org . batfish . specifier . ReferenceInterfaceGroupInterfaceSpecifier ( words [ 0 ] , words [ 1 ] ) ; } matcher = org . batfish . specifier . FlexibleInterfaceSpecifierFactory . TYPE_PATTERN . matcher ( str ) ; if ( matcher . find ( ) ) { java . util . regex . Pattern typeRegex = java . util . regex . Pattern . compile ( matcher . group ( 1 ) . trim ( ) , Pattern . CASE_INSENSITIVE ) ; return new org . batfish . specifier . TypesInterfaceSpecifier ( typeRegex ) ; } matcher = org . batfish . specifier . FlexibleInterfaceSpecifierFactory . VRF_PATTERN . matcher ( str ) ; if ( matcher . find ( ) ) { java . lang . String [ ] words = matcher . group ( 1 ) . trim ( ) . split ( "," ) ; checkArgument ( ( ( words . length ) == 1 ) , ( ( "Parameter(s)<sp>to<sp>vrf()<sp>should<sp>be<sp>a<sp>regex<sp>over<sp>the<sp>vrf<sp>names.<sp>Got<sp>(" + ( matcher . group ( 1 ) ) ) + ")" ) ) ; return new org . batfish . specifier . VrfNameRegexInterfaceSpecifier ( java . util . regex . Pattern . compile ( words [ 0 ] . trim ( ) , Pattern . CASE_INSENSITIVE ) ) ; } matcher = org . batfish . specifier . FlexibleInterfaceSpecifierFactory . ZONE_PATTERN . matcher ( str ) ; if ( matcher . find ( ) ) { java . lang . String [ ] words = matcher . group ( 1 ) . trim ( ) . split ( "," ) ; checkArgument ( ( ( words . length ) == 1 ) , ( ( "Parameter(s)<sp>to<sp>zone()<sp>should<sp>be<sp>a<sp>regex<sp>over<sp>the<sp>zone<sp>names.<sp>Got<sp>(" + ( matcher . group ( 1 ) ) ) + ")" ) ) ; return new org . batfish . specifier . ZoneNameRegexInterfaceSpecifier ( java . util . regex . Pattern . compile ( words [ 0 ] . trim ( ) , Pattern . CASE_INSENSITIVE ) ) ; } return new org . batfish . specifier . NameRegexInterfaceSpecifier ( java . util . regex . Pattern . compile ( str , Pattern . CASE_INSENSITIVE ) ) ; }
|
org . junit . Assert . assertThat ( new org . batfish . specifier . FlexibleInterfaceSpecifierFactory ( ) . buildInterfaceSpecifier ( null ) , org . hamcrest . Matchers . equalTo ( AllInterfacesInterfaceSpecifier . INSTANCE ) )
|
testWriteReadFields ( ) { for ( org . apache . accumulo . core . data . Column c : org . apache . accumulo . core . data . ColumnTest . col ) { java . io . ByteArrayOutputStream baos = new java . io . ByteArrayOutputStream ( ) ; c . write ( new java . io . DataOutputStream ( baos ) ) ; org . apache . accumulo . core . data . Column other = new org . apache . accumulo . core . data . Column ( ) ; other . readFields ( new java . io . DataInputStream ( new java . io . ByteArrayInputStream ( baos . toByteArray ( ) ) ) ) ; "<AssertPlaceHolder>" ; } } readFields ( java . io . DataInput ) { long iterSize = dataInput . readInt ( ) ; if ( iterSize > 0 ) iterators = new java . util . LinkedHashMap ( ) ; for ( int i = 0 ; i < iterSize ; i ++ ) { org . apache . accumulo . core . client . IteratorSetting newIter = new org . apache . accumulo . core . client . IteratorSetting ( dataInput ) ; iterators . put ( newIter . getName ( ) , newIter ) ; } long rangeSize = dataInput . readInt ( ) ; if ( rangeSize > 0 ) ranges = new java . util . ArrayList ( ) ; for ( int i = 0 ; i < rangeSize ; i ++ ) { org . apache . accumulo . core . data . Range range = new org . apache . accumulo . core . data . Range ( ) ; range . readFields ( dataInput ) ; ranges . add ( range ) ; } long columnSize = dataInput . readInt ( ) ; if ( columnSize > 0 ) columns = new java . util . HashSet ( ) ; for ( int i = 0 ; i < columnSize ; i ++ ) { long numPairs = dataInput . readInt ( ) ; org . apache . hadoop . io . Text colFam = new org . apache . hadoop . io . Text ( ) ; colFam . readFields ( dataInput ) ; if ( numPairs == 1 ) { columns . add ( new org . apache . accumulo . core . client . IteratorSetting . Column ( colFam , null ) ) ; } else if ( numPairs == 2 ) { org . apache . hadoop . io . Text colQual = new org . apache . hadoop . io . Text ( ) ; colQual . readFields ( dataInput ) ; columns . add ( new org . apache . accumulo . core . client . IteratorSetting . Column ( colFam , colQual ) ) ; } } autoAdjustRanges = dataInput . readBoolean ( ) ; useLocalIterators = dataInput . readBoolean ( ) ; useIsolatedScanners = dataInput . readBoolean ( ) ; offlineScan = dataInput . readBoolean ( ) ; if ( dataInput . readBoolean ( ) ) { samplerConfig = new org . apache . accumulo . core . sample . impl . SamplerConfigurationImpl ( dataInput ) . toSamplerConfiguration ( ) ; } executionHints = new java . util . HashMap ( ) ; int numHints = dataInput . readInt ( ) ; for ( int i = 0 ; i < numHints ; i ++ ) { java . lang . String k = dataInput . readUTF ( ) ; java . lang . String v = dataInput . readUTF ( ) ; executionHints . put ( k , v ) ; } }
|
org . junit . Assert . assertEquals ( c , other )
|
canConvertAccountActivity ( ) { converter = new edu . zipcloud . cloudstreetmarket . core . converters . IdentifiableToIdConverter ( edu . zipcloud . cloudstreetmarket . core . converters . AccountActivity . class ) ; "<AssertPlaceHolder>" ; } canConvert ( java . lang . Class ) { return type . isAssignableFrom ( this . type ) ; }
|
org . junit . Assert . assertTrue ( converter . canConvert ( edu . zipcloud . cloudstreetmarket . core . converters . AccountActivity . class ) )
|
testExtract_fieldNotInXml ( ) { java . util . Map < java . lang . String , java . lang . String > ret = xmlFieldExtractor . extract ( new java . io . ByteArrayInputStream ( com . google . api . ads . common . lib . utils . XmlFieldExtractorTest . REPORT_DOWNLOAD_ERROR . getBytes ( com . google . api . ads . common . lib . utils . UTF_8 ) ) , new java . lang . String [ ] { "foo" } ) ; "<AssertPlaceHolder>" ; } get ( com . google . api . ads . adwords . axis . v201809 . cm . Selector ) { if ( ( super . cachedEndpoint ) == null ) { throw new org . apache . axis . NoEndPointException ( ) ; } org . apache . axis . client . Call _call = createCall ( ) ; _call . setOperation ( com . google . api . ads . adwords . axis . v201809 . billing . BudgetOrderServiceSoapBindingStub . _operations [ 0 ] ) ; _call . setUseSOAPAction ( true ) ; _call . setSOAPActionURI ( "" ) ; _call . setEncodingStyle ( null ) ; _call . setProperty ( com . google . api . ads . adwords . axis . v201809 . billing . org . apache . axis . client . Call , Boolean . FALSE ) ; _call . setProperty ( org . apache . axis . AxisEngine . PROP_DOMULTIREFS , Boolean . FALSE ) ; _call . setSOAPVersion ( org . apache . axis . soap . SOAPConstants . SOAP11_CONSTANTS ) ; _call . setOperationName ( new javax . xml . namespace . QName ( "https://adwords.google.com/api/adwords/billing/v201809" , "get" ) ) ; setRequestHeaders ( _call ) ; setAttachments ( _call ) ; try { java . lang . Object _resp = _call . invoke ( new java . lang . Object [ ] { serviceSelector } ) ; if ( _resp instanceof java . rmi . RemoteException ) { throw ( ( java . rmi . RemoteException ) ( _resp ) ) ; } else { extractAttachments ( _call ) ; try { return ( ( com . google . api . ads . adwords . axis . v201809 . billing . com . google . api . ads . adwords . axis . v201809 . billing . BudgetOrderPage ) ( _resp ) ) ; } catch ( com . google . api . ads . adwords . axis . v201809 . billing . java _exception ) { return ( ( com . google . api . ads . adwords . axis . v201809 . billing . com . google . api . ads . adwords . axis . v201809 . billing . BudgetOrderPage ) ( org . apache . axis . utils . JavaUtils . convert ( _resp , com . google . api . ads . adwords . axis . v201809 . billing . BudgetOrderPage . class ) ) ) ; } } } catch ( com . google . api . ads . adwords . axis . v201809 . billing . org . apache . axis axisFaultException ) { if ( ( axisFaultException . detail ) != null ) { if ( ( axisFaultException . detail ) instanceof java . rmi . RemoteException ) { throw ( ( java . rmi . RemoteException ) ( axisFaultException . detail ) ) ; } if ( ( axisFaultException . detail ) instanceof com . google . api . ads . adwords . axis . v201809 . cm . ApiException ) { throw ( ( com . google . api . ads . adwords . axis . v201809 . cm . ApiException ) ( axisFaultException . detail ) ) ; } } throw axisFaultException ; } }
|
org . junit . Assert . assertNull ( ret . get ( "foo" ) )
|
testAge ( ) { treeMap . merge ( otherKeyTreeMap ) ; "<AssertPlaceHolder>" ; } allPersons ( org . drools . verifier . core . maps . KeyTreeMap ) { final org . drools . verifier . core . index . matchers . Matcher age = new org . drools . verifier . core . index . matchers . Matcher ( org . drools . verifier . core . maps . KeyDefinition . newKeyDefinition ( ) . withId ( "age" ) . build ( ) ) ; final org . drools . verifier . core . maps . MultiMap < org . drools . verifier . core . index . keys . Value , org . drools . verifier . core . maps . KeyTreeMapMergeTest . Person , java . util . List < org . drools . verifier . core . maps . KeyTreeMapMergeTest . Person > > personChangeHandledMultiMap = personKeyTreeMap . get ( age . getKeyDefinition ( ) ) ; if ( personChangeHandledMultiMap != null ) { return personChangeHandledMultiMap . allValues ( ) ; } else { return java . util . Collections . emptyList ( ) ; } }
|
org . junit . Assert . assertEquals ( 2 , allPersons ( treeMap ) . size ( ) )
|
testRemoteAsyncInvocationByValue ( ) { org . jboss . as . test . integration . ejb . remote . async . StatelessRemoteBean . reset ( ) ; java . lang . String [ ] array = new java . lang . String [ ] { "hello" } ; org . jboss . as . test . integration . ejb . remote . async . RemoteInterface remote = lookup ( org . jboss . as . test . integration . ejb . remote . async . StatelessRemoteBean . class . getSimpleName ( ) , org . jboss . as . test . integration . ejb . remote . async . RemoteInterface . class ) ; remote . modifyArray ( array ) ; StatelessRemoteBean . startLatch . countDown ( ) ; if ( ! ( StatelessRemoteBean . doneLatch . await ( 5 , TimeUnit . SECONDS ) ) ) { throw new java . lang . RuntimeException ( "Invocation<sp>was<sp>not<sp>asynchronous" ) ; } "<AssertPlaceHolder>" ; } await ( long , java . util . concurrent . TimeUnit ) { latch . await ( timeout , timeUnit ) ; }
|
org . junit . Assert . assertEquals ( "hello" , array [ 0 ] )
|
getSignaturesTest02 ( ) { java . lang . String inPdf = ( com . itextpdf . signatures . SignatureUtilTest . sourceFolder ) + "simpleDocument.pdf" ; com . itextpdf . kernel . pdf . PdfDocument pdfDocument = new com . itextpdf . kernel . pdf . PdfDocument ( new com . itextpdf . kernel . pdf . PdfReader ( inPdf ) ) ; com . itextpdf . signatures . SignatureUtil signatureUtil = new com . itextpdf . signatures . SignatureUtil ( pdfDocument ) ; java . util . List < java . lang . String > signatureNames = signatureUtil . getSignatureNames ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return segments . size ( ) ; }
|
org . junit . Assert . assertEquals ( 0 , signatureNames . size ( ) )
|
testEquals2 ( ) { final ro . isdc . wro . cache . CacheKey key1 = new ro . isdc . wro . cache . CacheKey ( "g1" , ro . isdc . wro . model . resource . ResourceType . JS , false ) ; final ro . isdc . wro . cache . CacheKey key2 = new ro . isdc . wro . cache . CacheKey ( "g1" , ro . isdc . wro . model . resource . ResourceType . JS , true ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { return org . apache . commons . lang3 . builder . EqualsBuilder . reflectionEquals ( this , obj , true ) ; }
|
org . junit . Assert . assertFalse ( key1 . equals ( key2 ) )
|
testValue ( ) { net . ontopia . topicmaps . rest . model . Occurrence occurrence = get ( "2" , net . ontopia . topicmaps . rest . model . Occurrence . class ) ; occurrence . setValue ( "Another<sp>value" ) ; net . ontopia . topicmaps . rest . model . Occurrence changed = post ( "2" , occurrence , net . ontopia . topicmaps . rest . model . Occurrence . class ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return field . stringValue ( ) ; }
|
org . junit . Assert . assertEquals ( "Another<sp>value" , changed . getValue ( ) )
|
testJackson ( ) { org . batfish . datamodel . FlowDiff fd = new org . batfish . datamodel . FlowDiff ( org . batfish . datamodel . Flow . PROP_DST_IP , "old" , "new" ) ; "<AssertPlaceHolder>" ; } clone ( java . lang . Object , java . lang . Class ) { return org . batfish . common . util . BatfishObjectMapper . MAPPER . readValue ( org . batfish . common . util . BatfishObjectMapper . WRITER . writeValueAsBytes ( o ) , clazz ) ; }
|
org . junit . Assert . assertEquals ( org . batfish . common . util . BatfishObjectMapper . clone ( fd , org . batfish . datamodel . FlowDiff . class ) , fd )
|
testSecToken ( ) { org . apache . shiro . subject . SimplePrincipalCollection principals = new org . apache . shiro . subject . SimplePrincipalCollection ( ) ; org . apache . cxf . ws . security . tokenstore . SecurityToken secToken = new org . apache . cxf . ws . security . tokenstore . SecurityToken ( ) ; principals . add ( secToken , ddf . security . service . impl . SecurityManagerImplTest . REALM_NAME ) ; org . apache . shiro . realm . Realm realm = mock ( org . apache . shiro . realm . Realm . class ) ; when ( realm . getName ( ) ) . thenReturn ( ddf . security . service . impl . SecurityManagerImplTest . REALM_NAME ) ; ddf . security . service . impl . SecurityManagerImpl manager = new ddf . security . service . impl . SecurityManagerImpl ( ) ; manager . setRealms ( java . util . Arrays . asList ( new org . apache . shiro . realm . Realm [ ] { realm } ) ) ; ddf . security . Subject subject = manager . getSubject ( secToken ) ; "<AssertPlaceHolder>" ; } getSubject ( java . lang . String ) { ddf . security . Subject subject = org . codice . ddf . security . interceptor . GuestInterceptor . CACHED_GUEST_SUBJECT . getIfPresent ( ipAddress ) ; if ( security . tokenAboutToExpire ( subject ) ) { subject = security . getGuestSubject ( ipAddress ) ; org . codice . ddf . security . interceptor . GuestInterceptor . CACHED_GUEST_SUBJECT . put ( ipAddress , subject ) ; } else { org . codice . ddf . security . interceptor . GuestInterceptor . LOGGER . debug ( "Using<sp>cached<sp>Guest<sp>user<sp>token<sp>for<sp>{}" , ipAddress ) ; } return subject ; }
|
org . junit . Assert . assertNotNull ( subject )
|
testSetInboundPassthruMode ( ) { gov . hhs . fha . nhinc . configuration . jmx . PassthruMXBeanRegistry registry = gov . hhs . fha . nhinc . configuration . jmx . PassthruMXBeanRegistry . getInstance ( ) ; gov . hhs . fha . nhinc . configuration . IConfiguration . serviceEnum serviceName = gov . hhs . fha . nhinc . configuration . IConfiguration . serviceEnum . AdminDistribution ; gov . hhs . fha . nhinc . configuration . IConfiguration . directionEnum direction = gov . hhs . fha . nhinc . configuration . IConfiguration . directionEnum . Inbound ; boolean status = true ; gov . hhs . fha . nhinc . admindistribution . configuration . jmx . AdminDistribution10WebServices adminDist10 = mock ( gov . hhs . fha . nhinc . admindistribution . configuration . jmx . AdminDistribution10WebServices . class ) ; when ( adminDist10 . getServiceName ( ) ) . thenReturn ( serviceEnum . AdminDistribution ) ; when ( adminDist10 . isInboundPassthru ( ) ) . thenReturn ( status ) ; registry . registerWebServiceMXBean ( adminDist10 ) ; boolean passthru = registry . isPassthru ( serviceName , direction ) ; "<AssertPlaceHolder>" ; } isPassthru ( gov . hhs . fha . nhinc . configuration . IConfiguration . serviceEnum , gov . hhs . fha . nhinc . configuration . IConfiguration . directionEnum ) { boolean passthruMode = false ; for ( gov . hhs . fha . nhinc . configuration . jmx . WebServicesMXBean b : registeredBeans ) { if ( ( ( gov . hhs . fha . nhinc . configuration . jmx . PassthruMXBeanRegistry . isInbound ( direction ) ) && ( b . getServiceName ( ) . equals ( serviceName ) ) ) && ( b . isInboundPassthru ( ) ) ) { passthruMode = true ; } if ( ( ( gov . hhs . fha . nhinc . configuration . jmx . PassthruMXBeanRegistry . isOutbound ( direction ) ) && ( b . getServiceName ( ) . equals ( serviceName ) ) ) && ( b . isOutboundPassthru ( ) ) ) { passthruMode = true ; } } return passthruMode ; }
|
org . junit . Assert . assertEquals ( true , passthru )
|
get ( ) { com . cloudhopper . commons . util . ByteBuffer buffer = new com . cloudhopper . commons . util . ByteBuffer ( 5 ) ; buffer . add ( ( ( byte ) ( 0 ) ) ) ; byte b = buffer . get ( 0 ) ; "<AssertPlaceHolder>" ; } get ( K ) { return this . futures . get ( key ) ; }
|
org . junit . Assert . assertEquals ( ( ( byte ) ( 0 ) ) , b )
|
givenMoveToSecondPosition_whenGetProperty1_thenReturnExpectedResult ( ) { beanCursor . moveToFirst ( ) ; beanCursor . moveToNext ( ) ; java . lang . String property1 = beanCursor . getString ( property1ColumnIndex ( ) ) ; "<AssertPlaceHolder>" ; } expectedProperty1OfBean2 ( ) { org . robobinding . itempresentationmodel . BeanCursorTest . Bean bean2 = beans . get ( 1 ) ; return bean2 . getProperty1 ( ) ; }
|
org . junit . Assert . assertEquals ( expectedProperty1OfBean2 ( ) , property1 )
|
tuple_array_2 ( ) { org . apache . jena . atlas . lib . tuple . Tuple < java . lang . Integer > tuple1 = org . apache . jena . atlas . lib . tuple . TupleFactory . tuple ( 9 , 8 , 7 ) ; java . lang . Integer [ ] array = new java . lang . Integer [ 2 ] ; tuple1 . copyInto ( array , 0 , 2 ) ; java . lang . Integer [ ] array1 = new java . lang . Integer [ ] { 9 , 8 } ; "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertArrayEquals ( array1 , array )
|
test3 ( ) { this . sentenceSegmentFile ( "src/test/resources/data/sentence/test3.txt" ) ; org . cleartk . token . type . Sentence sentence = org . apache . uima . fit . util . JCasUtil . selectByIndex ( jCas , org . cleartk . token . type . Sentence . class , 0 ) ; "<AssertPlaceHolder>" ; } getCoveredText ( ) { throw new java . lang . UnsupportedOperationException ( ) ; }
|
org . junit . Assert . assertEquals ( "test" , sentence . getCoveredText ( ) )
|
testNull ( ) { com . arjuna . ats . internal . jta . recovery . arjunacore . XARecoveryModule xarm = new com . arjuna . ats . internal . jta . recovery . arjunacore . XARecoveryModule ( ) ; xarm . periodicWorkFirstPass ( ) ; xarm . periodicWorkSecondPass ( ) ; "<AssertPlaceHolder>" ; } id ( ) { return participantId ; }
|
org . junit . Assert . assertNotNull ( xarm . id ( ) )
|
test ( ) { java . lang . String dataEspecifica = "2013-02-02" ; java . lang . String sql1 = ( ( ( ( ( "SELECT<sp>tra.tra_id,<sp>etb.etb_nome,<sp>cli.cli_nome,<sp>tra.tra_total,<sp>tra.tra_data_hora<sp>" + ( ( ( "FROM<sp>transacao<sp>tra<sp>" + "JOIN<sp>cliente<sp>cli<sp>ON<sp>(tra.cli_id<sp>=<sp>cli.cli_id)<sp>" ) + "JOIN<sp>estabelecimento<sp>etb<sp>ON<sp>(tra.etb_id<sp>=<sp>etb.etb_id)<sp>" ) + "SELECT<sp>tra.tra_id,<sp>etb.etb_nome,<sp>cli.cli_nome,<sp>tra.tra_total,<sp>tra.tra_data_hora<sp>" 0 ) ) + dataEspecifica ) + "%')<sp>" ) + "ORDER<sp>BY<sp>tra.tra_data_hora<sp>ASC<sp>" ) + "LIMIT<sp>" ) + ( HiveJdbcTest . LIMIT ) ; br . ita . bdic3 . testes . us62 . HiveJdbcTest hiveTest = new br . ita . bdic3 . testes . us62 . HiveJdbcTest ( ) ; java . sql . Connection con = hiveTest . getConnection ( ) ; java . sql . ResultSet rs = hiveTest . execQuery ( con , sql1 ) ; int cont1 = 0 ; try { while ( rs . next ( ) ) { cont1 ++ ; } "<AssertPlaceHolder>" ; } catch ( java . sql . SQLException e ) { org . junit . Assert . fail ( ( ( ( ( "Falha<sp>ao<sp>iterar<sp>no<sp>ResultSet!<sp>Iteracao:<sp>" + cont1 ) + "\n<sp>Query:<sp>" ) + sql1 ) + ( e . toString ( ) ) ) ) ; } } execQuery ( java . sql . Connection , java . lang . String ) { java . sql . Statement stmt = null ; try { stmt = con . createStatement ( ) ; stmt . setFetchSize ( br . ita . bdic3 . testes . us62 . HiveJdbcTest . LIMIT ) ; } catch ( java . sql . SQLException e ) { org . junit . Assert . fail ( ( "Falha<sp>ao<sp>criar<sp>objeto<sp>Statement!<sp>\n" + ( e . toString ( ) ) ) ) ; } try { stmt . executeQuery ( ( "use<sp>" + ( br . ita . bdic3 . testes . us62 . HiveJdbcTest . defaultDatabase ) ) ) ; } catch ( java . sql . SQLException e ) { org . junit . Assert . fail ( ( ( "Falha<sp>ao<sp>definir<sp>Default<sp>Database:<sp>" + ( br . ita . bdic3 . testes . us62 . HiveJdbcTest . defaultDatabase ) ) + ( e . toString ( ) ) ) ) ; } java . sql . ResultSet rs = null ; try { rs = stmt . executeQuery ( query ) ; } catch ( java . sql . SQLException e ) { org . junit . Assert . fail ( ( ( "Falha<sp>ao<sp>executar<sp>query<sp>e<sp>criar<sp>objeto<sp>ResultSet!<sp>\n" + query ) + ( e . toString ( ) ) ) ) ; } return rs ; }
|
org . junit . Assert . assertTrue ( ( cont1 == 10 ) )
|
testBasicHash ( ) { final java . lang . Integer i = java . lang . Integer . valueOf ( 1234 ) ; final int h1 = org . apache . hc . core5 . util . LangUtils . hashCode ( LangUtils . HASH_SEED , i . hashCode ( ) ) ; final int h2 = org . apache . hc . core5 . util . LangUtils . hashCode ( LangUtils . HASH_SEED , i ) ; "<AssertPlaceHolder>" ; } hashCode ( int , int ) { return ( seed * ( org . apache . hc . core5 . util . LangUtils . HASH_OFFSET ) ) + hashcode ; }
|
org . junit . Assert . assertTrue ( ( h1 == h2 ) )
|
shouldScheduleToNow ( ) { testRule . deploy ( PROCESS ) ; runtimeService . startProcessInstanceByKey ( PROCESS_KEY ) ; java . lang . String processInstanceId = runtimeService . createProcessInstanceQuery ( ) . activityIdIn ( "userTask" ) . singleResult ( ) . getId ( ) ; org . camunda . bpm . engine . impl . util . ClockUtil . setCurrentTime ( END_DATE ) ; for ( int i = 0 ; i < 5 ; i ++ ) { taskService . createAttachment ( null , null , processInstanceId , null , null , "http://camunda.com" ) ; } java . lang . String taskId = taskService . createTaskQuery ( ) . singleResult ( ) . getId ( ) ; taskService . complete ( taskId ) ; engineConfiguration . setHistoryCleanupBatchSize ( 5 ) ; engineConfiguration . initHistoryCleanup ( ) ; java . util . Date removalTime = org . apache . commons . lang3 . time . DateUtils . addDays ( END_DATE , 5 ) ; org . camunda . bpm . engine . impl . util . ClockUtil . setCurrentTime ( org . apache . commons . lang3 . time . DateUtils . addDays ( END_DATE , 5 ) ) ; runHistoryCleanup ( ) ; org . camunda . bpm . engine . runtime . Job job = historyService . findHistoryCleanupJobs ( ) . get ( 0 ) ; "<AssertPlaceHolder>" ; } getDuedate ( ) { return duedate ; }
|
org . junit . Assert . assertThat ( job . getDuedate ( ) , org . hamcrest . core . Is . is ( removalTime ) )
|
getCurrentStatusExceptionTest ( ) { con = new com . cloud . hypervisor . ovm3 . objects . ConnectionTest ( ) ; hypervisor . setConnection ( con ) ; "<AssertPlaceHolder>" ; } getCurrentStatus ( long ) { try { com . cloud . hypervisor . ovm3 . objects . Common test = new com . cloud . hypervisor . ovm3 . objects . Common ( c ) ; java . lang . String ping = "put" ; java . lang . String pong = test . echo ( ping ) ; if ( pong . contains ( ping ) ) { hypervisorsupport . syncState ( ) ; com . cloud . hypervisor . ovm3 . objects . CloudstackPlugin cSp = new com . cloud . hypervisor . ovm3 . objects . CloudstackPlugin ( c ) ; if ( ( ! ( cSp . dom0CheckStorageHealthCheck ( configuration . getAgentScriptsDir ( ) , configuration . getAgentCheckStorageScript ( ) , configuration . getCsHostGuid ( ) , configuration . getAgentStorageCheckTimeout ( ) , configuration . getAgentStorageCheckInterval ( ) ) ) ) && ( ! ( cSp . dom0CheckStorageHealthCheck ( ) ) ) ) { com . cloud . hypervisor . ovm3 . resources . Ovm3HypervisorResource . LOGGER . error ( ( "Storage<sp>health<sp>check<sp>not<sp>running<sp>on<sp>" + ( configuration . getAgentHostname ( ) ) ) ) ; } else if ( cSp . dom0CheckStorageHealthCheck ( ) ) { com . cloud . hypervisor . ovm3 . resources . Ovm3HypervisorResource . LOGGER . error ( ( "Storage<sp>health<sp>check<sp>started<sp>on<sp>" + ( configuration . getAgentHostname ( ) ) ) ) ; } else { com . cloud . hypervisor . ovm3 . resources . Ovm3HypervisorResource . LOGGER . debug ( ( "Storage<sp>health<sp>check<sp>running<sp>on<sp>" + ( configuration . getAgentHostname ( ) ) ) ) ; } return new com . cloud . agent . api . PingRoutingCommand ( getType ( ) , id , hypervisorsupport . hostVmStateReport ( ) ) ; } else { com . cloud . hypervisor . ovm3 . resources . Ovm3HypervisorResource . LOGGER . debug ( ( ( ( "Agent<sp>did<sp>not<sp>respond<sp>correctly:<sp>" + ping ) + "<sp>but<sp>got<sp>" ) + pong ) ) ; } } catch ( com . cloud . hypervisor . ovm3 . objects . Ovm3ResourceException | java . lang . NullPointerException e ) { com . cloud . hypervisor . ovm3 . resources . Ovm3HypervisorResource . LOGGER . debug ( "Check<sp>agent<sp>status<sp>failed" , e ) ; return null ; } return null ; }
|
org . junit . Assert . assertNull ( hypervisor . getCurrentStatus ( 1L ) )
|
testStationVarLevels ( ) { java . lang . String file = ( ucar . unidata . util . test . TestDir . cdmLocalTestDataDir ) + "point/stationData2Levels.ncml" ; java . util . Formatter buf = new java . util . Formatter ( ) ; try ( ucar . nc2 . ft . point . FeatureDatasetPoint pods = ( ( ucar . nc2 . ft . point . FeatureDatasetPoint ) ( ucar . nc2 . ft . point . FeatureDatasetFactoryManager . open ( ucar . nc2 . constants . FeatureType . STATION , file , null , buf ) ) ) ) { "<AssertPlaceHolder>" ; java . util . List < ucar . nc2 . ft . point . DsgFeatureCollection > collectionList = pods . getPointFeatureCollectionList ( ) ; assert ( collectionList . size ( ) ) == 1 : "Can't<sp>handle<sp>point<sp>data<sp>with<sp>multiple<sp>collections" ; ucar . nc2 . ft . point . DsgFeatureCollection fc = collectionList . get ( 0 ) ; assert fc instanceof ucar . nc2 . ft . point . StationTimeSeriesFeatureCollection ; ucar . nc2 . ft . point . StationTimeSeriesFeatureCollection sc = ( ( ucar . nc2 . ft . point . StationTimeSeriesFeatureCollection ) ( fc ) ) ; java . util . List < ucar . nc2 . ft . point . StationFeature > stations = sc . getStationFeatures ( ) ; for ( ucar . nc2 . ft . point . StationFeature s : stations ) { ucar . ma2 . StructureData sdata = s . getFeatureData ( ) ; ucar . ma2 . StructureMembers . Member m = sdata . findMember ( "stnInfo" ) ; assert m != null : "missing<sp>stnInfo" ; assert ( m . getDataType ( ) ) == ( ucar . ma2 . DataType . STRING ) : "stnInfo<sp>not<sp>a<sp>string" ; System . out . printf ( "stnInfo=%s%n" , sdata . getScalarString ( m ) ) ; } ucar . nc2 . ft . point . PointFeatureCollectionIterator iter = sc . getPointFeatureCollectionIterator ( ) ; while ( iter . hasNext ( ) ) { ucar . nc2 . ft . point . PointFeatureCollection pfc = iter . next ( ) ; assert pfc instanceof ucar . nc2 . ft . point . StationTimeSeriesFeatureImpl : pfc . getClass ( ) . getName ( ) ; ucar . nc2 . ft . point . StationTimeSeriesFeature s = ( ( ucar . nc2 . ft . point . StationTimeSeriesFeature ) ( pfc ) ) ; ucar . ma2 . StructureData sdata = s . getFeatureData ( ) ; ucar . ma2 . StructureMembers . Member m = sdata . findMember ( "stnInfo" ) ; assert m != null : "missing<sp>stnInfo" ; assert ( m . getDataType ( ) ) == ( ucar . ma2 . DataType . STRING ) : "stnInfo<sp>not<sp>a<sp>string" ; System . out . printf ( "stnInfo=%s%n" , sdata . getScalarString ( m ) ) ; } ucar . nc2 . ft . point . PointFeatureCollection pfc = sc . flatten ( null , ( ( ucar . nc2 . time . CalendarDateRange ) ( null ) ) , null ) ; ucar . nc2 . ft . point . PointFeatureIterator iter2 = pfc . getPointFeatureIterator ( ) ; while ( iter2 . hasNext ( ) ) { ucar . nc2 . ft . point . PointFeature pf = iter2 . next ( ) ; assert pf instanceof ucar . nc2 . ft . point . StationPointFeature ; ucar . nc2 . ft . point . StationPointFeature s = ( ( ucar . nc2 . ft . point . StationPointFeature ) ( pf ) ) ; ucar . ma2 . StructureData sdata = s . getFeatureData ( ) ; ucar . ma2 . StructureMembers . Member m = sdata . findMember ( "stnInfo" ) ; assert m == null : "stnInfo<sp>in<sp>leaf" ; ucar . ma2 . StructureData sdata2 = s . getDataAll ( ) ; m = sdata2 . findMember ( "stnInfo" ) ; assert m != null : "missing<sp>stnInfo" ; assert ( m . getDataType ( ) ) == ( ucar . ma2 . DataType . STRING ) : "stnInfo<sp>not<sp>a<sp>string" ; System . out . printf ( "stnInfo=%s%n" , sdata2 . getScalarString ( m ) ) ; } } } open ( ucar . nc2 . constants . FeatureType , java . lang . String , ucar . nc2 . util . CancelTask , java . util . Formatter ) { if ( location . startsWith ( DataFactory . SCHEME ) ) { thredds . client . catalog . tools . DataFactory . Result result = new thredds . client . catalog . tools . DataFactory ( ) . openFeatureDataset ( wantFeatureType , location , task ) ; errlog . format ( "%s" , result . errLog ) ; if ( ! ( ucar . nc2 . ft . FeatureDatasetFactoryManager . featureTypeOk ( wantFeatureType , result . featureType ) ) ) { errlog . format ( "wanted<sp>%s<sp>but<sp>dataset<sp>is<sp>of<sp>type<sp>%s%n" , wantFeatureType , result . featureType ) ; result . close ( ) ; return null ; } return result . featureDataset ; } else if ( location . startsWith ( CdmrFeatureDataset . SCHEME ) ) { ucar . nc2 . util . Optional < ucar . nc2 . ft . FeatureDataset > opt = ucar . nc2 . ft . remote . CdmrFeatureDataset . factory ( wantFeatureType , location ) ; if ( opt . isPresent ( ) ) return opt . get ( ) ; errlog . format ( "%s" , opt . getErrorMessage ( ) ) ; return null ; } else if ( location . startsWith ( ucar . nc2 . ft . point . collection . CompositeDatasetFactory . SCHEME ) ) { java . lang . String spec = location . substring ( CompositeDatasetFactory . SCHEME . length ( ) ) ; thredds . inventory . MFileCollectionManager dcm = thredds . inventory . MFileCollectionManager . open ( spec , spec , null , errlog ) ; return ucar . nc2 . ft .
|
org . junit . Assert . assertNotNull ( pods )
|
testGetNewestVersion ( ) { org . hive2hive . core . network . NetworkManager nodeA = org . hive2hive . core . utils . NetworkTestUtil . getRandomNode ( org . hive2hive . core . network . data . futures . FutureGetTest . network ) ; org . hive2hive . core . network . NetworkManager nodeB = org . hive2hive . core . utils . NetworkTestUtil . getRandomNode ( org . hive2hive . core . network . data . futures . FutureGetTest . network ) ; java . lang . String locationKey = nodeA . getNodeId ( ) ; java . lang . String contentKey = randomString ( ) ; org . hive2hive . core . H2HTestData data = new org . hive2hive . core . H2HTestData ( "" ) ; java . util . List < java . lang . String > content = new java . util . ArrayList < java . lang . String > ( ) ; int numberOfContent = 3 ; for ( int i = 0 ; i < numberOfContent ; i ++ ) { data . setTestString ( randomString ( ) ) ; content . add ( data . getTestString ( ) ) ; data . generateVersionKey ( ) ; org . hive2hive . core . network . data . parameters . Parameters parameters = new org . hive2hive . core . network . data . parameters . Parameters ( ) . setLocationKey ( locationKey ) . setContentKey ( contentKey ) . setVersionKey ( data . getVersionKey ( ) ) . setBasedOnKey ( data . getBasedOnKey ( ) ) . setNetworkContent ( data ) ; nodeA . getDataManager ( ) . put ( parameters ) ; } org . hive2hive . core . network . data . parameters . Parameters parameters = new org . hive2hive . core . network . data . parameters . Parameters ( ) . setLocationKey ( locationKey ) . setContentKey ( contentKey ) ; "<AssertPlaceHolder>" ; } get ( org . hive2hive . core . network . data . parameters . IParameters ) { net . tomp2p . dht . FutureGet futureGet = getUnblocked ( parameters ) ; org . hive2hive . core . network . data . futures . FutureGetListener listener = new org . hive2hive . core . network . data . futures . FutureGetListener ( parameters , serializer ) ; futureGet . addListener ( listener ) ; return listener . awaitAndGet ( ) ; }
|
org . junit . Assert . assertEquals ( content . get ( ( numberOfContent - 1 ) ) , ( ( org . hive2hive . core . H2HTestData ) ( nodeB . getDataManager ( ) . get ( parameters ) ) ) . getTestString ( ) )
|
itShouldReturnMonth ( ) { java . lang . String dateInString = "1986-04-08" ; java . util . Date date = new java . text . SimpleDateFormat ( "yyyy-MM-dd" ) . parse ( dateInString ) ; java . lang . Integer month = hydrograph . engine . transformation . standardfunctions . DateFunctions . getMonth ( date ) ; "<AssertPlaceHolder>" ; } getMonth ( java . util . Date ) { java . lang . String month = new java . text . SimpleDateFormat ( "MM" ) . format ( date ) ; return java . lang . Integer . parseInt ( month ) ; }
|
org . junit . Assert . assertEquals ( month , new java . lang . Integer ( 4 ) )
|
testCreate ( ) { org . apache . eagle . metadata . model . SiteEntity siteEntity = new org . apache . eagle . metadata . model . SiteEntity ( ) ; siteEntity . setSiteId ( "testsiteid" ) ; siteEntity . setSiteName ( "testsitename" ) ; siteEntity . setDescription ( "testdesc" ) ; org . apache . eagle . metadata . model . SiteEntity resultEntity = siteEntityService . create ( siteEntity ) ; "<AssertPlaceHolder>" ; } create ( com . sun . jersey . api . model . AbstractMethod ) { return java . util . Arrays . asList ( new com . sun . jersey . spi . container . ResourceFilter ( ) { @ org . apache . eagle . server . security . Override public com . sun . jersey . spi . container . ContainerRequestFilter getRequestFilter ( ) { return new org . apache . eagle . server . security . BasicAuthRequestFilter ( authenticator , abstractMethod ) ; } @ org . apache . eagle . server . security . Override public com . sun . jersey . spi . container . ContainerResponseFilter getResponseFilter ( ) { return null ; } } ) ; }
|
org . junit . Assert . assertNotNull ( resultEntity )
|
testGetAccessor ( ) { gov . hhs . fha . nhinc . properties . HibernateAccessor hibernateAccessor = gov . hhs . fha . nhinc . properties . HibernateAccessor . getInstance ( ) ; "<AssertPlaceHolder>" ; } getInstance ( ) { return gov . hhs . fha . nhinc . properties . HibernateAccessor . SingletonHolder . INSTANCE ; }
|
org . junit . Assert . assertNotNull ( hibernateAccessor )
|
isAllowedToWriteReturnsFalseIfTheRolesAreEmpty ( ) { nl . knaw . huygens . timbuctoo . security . dto . VreAuthorization instance = nl . knaw . huygens . timbuctoo . security . dto . VreAuthorization . create ( "" , "" ) ; boolean allowedToWrite = instance . isAllowedToWrite ( ) ; "<AssertPlaceHolder>" ; } create ( java . lang . String , java . lang . String ) { return nl . knaw . huygens . timbuctoo . v5 . security . dto . User . create ( displayname , persistentId , java . util . UUID . randomUUID ( ) . toString ( ) ) ; }
|
org . junit . Assert . assertThat ( allowedToWrite , org . hamcrest . core . Is . is ( false ) )
|
testGettingSimpleValue ( ) { org . eclipse . reddeer . junit . test . util . ReflectionUtilTest . A a = new org . eclipse . reddeer . junit . test . util . ReflectionUtilTest . A ( ) ; a . setName ( "aaa" ) ; "<AssertPlaceHolder>" ; } getValue ( java . lang . Object , java . lang . String ) { if ( obj == null ) { throw new java . lang . IllegalArgumentException ( "Object<sp>cannot<sp>be<sp>null" ) ; } if ( ( propertySyntax == null ) || ( ( propertySyntax . length ( ) ) == 0 ) ) { throw new java . lang . IllegalArgumentException ( "Property<sp>syntax<sp>cannot<sp>be<sp>null<sp>or<sp>empty" ) ; } java . lang . Object result = obj ; java . lang . String [ ] properties = propertySyntax . split ( "\\." ) ; java . util . List < java . lang . String > propertyPath = new java . util . ArrayList ( ) ; for ( java . lang . String property : properties ) { if ( result == null ) { throw new org . eclipse . reddeer . junit . requirement . RequirementException ( ( ( ( ( "Cannot<sp>access<sp>" + propertySyntax ) + "<sp>since<sp>" ) + ( java . lang . String . join ( "." , propertyPath ) ) ) + "<sp>was<sp>resolved<sp>as<sp>null" ) ) ; } java . lang . String methodName = ( "get" + ( property . substring ( 0 , 1 ) . toUpperCase ( ) ) ) + ( property . substring ( 1 ) ) ; try { java . lang . reflect . Method method = result . getClass ( ) . getMethod ( methodName ) ; result = method . invoke ( result ) ; } catch ( java . lang . NoSuchMethodException | java . lang . reflect . InvocationTargetException | java . lang . IllegalArgumentException | java . lang . IllegalAccessException e ) { throw new org . eclipse . reddeer . junit . requirement . RequirementException ( ( ( ( "Cannot<sp>access<sp>" + property ) + "<sp>in<sp>" ) + ( result . getClass ( ) . getCanonicalName ( ) ) ) , e ) ; } propertyPath . add ( property ) ; } return result ; }
|
org . junit . Assert . assertEquals ( "aaa" , getValue ( a , "name" ) )
|
testBackgroundTransparency_inheritForce ( ) { org . eclipse . swt . internal . widgets . IControlAdapter adapter = org . eclipse . swt . internal . widgets . ControlUtil . getControlAdapter ( dateTime ) ; shell . setBackgroundMode ( SWT . INHERIT_FORCE ) ; "<AssertPlaceHolder>" ; } getBackgroundTransparency ( ) { return backgroundTransparency ; }
|
org . junit . Assert . assertTrue ( adapter . getBackgroundTransparency ( ) )
|
testPutAlreadyExists ( ) { backend . put ( "random<sp>key" , "random<sp>value" ) ; kvStore . put ( "random<sp>key" , "another<sp>random<sp>value" ) ; "<AssertPlaceHolder>" ; } get ( com . dremio . service . job . proto . JobId ) { try { return jobResults . get ( jobId ) ; } catch ( java . util . concurrent . ExecutionException ex ) { throw com . google . common . base . Throwables . propagate ( ex . getCause ( ) ) ; } }
|
org . junit . Assert . assertEquals ( "another<sp>random<sp>value" , backend . get ( "random<sp>key" ) )
|
smokeTest ( ) { when ( someService . thatDoesThings ( ) ) . thenReturn ( com . spotify . apollo . test . helper . ServiceHelperTest . TEST_THING ) ; java . lang . String response = doGet ( ) ; "<AssertPlaceHolder>" ; } doGet ( ) { return doGet ( "/" ) ; }
|
org . junit . Assert . assertThat ( response , org . hamcrest . Matchers . is ( com . spotify . apollo . test . helper . ServiceHelperTest . TEST_THING ) )
|
getNullCatalogUserDetails ( ) { org . springframework . security . core . context . SecurityContextHolder . getContext ( ) . setAuthentication ( authentication ) ; when ( authentication . getPrincipal ( ) ) . thenReturn ( new org . springframework . security . core . userdetails . UserDetails ( ) { private static final long serialVersionUID = 1L ; @ org . sentilo . web . catalog . test . security . service . Override public boolean isEnabled ( ) { return true ; } @ org . sentilo . web . catalog . test . security . service . Override public boolean isCredentialsNonExpired ( ) { return true ; } @ org . sentilo . web . catalog . test . security . service . Override public boolean isAccountNonLocked ( ) { return true ; } @ org . sentilo . web . catalog . test . security . service . Override public boolean isAccountNonExpired ( ) { return true ; } @ org . sentilo . web . catalog . test . security . service . Override public java . lang . String getUsername ( ) { return null ; } @ org . sentilo . web . catalog . test . security . service . Override public java . lang . String getPassword ( ) { return null ; } @ org . sentilo . web . catalog . test . security . service . Override public java . util . Collection < ? extends org . springframework . security . core . GrantedAuthority > getAuthorities ( ) { return null ; } } ) ; "<AssertPlaceHolder>" ; } getCatalogUserDetails ( ) { org . springframework . security . core . context . SecurityContextHolder . getContext ( ) . setAuthentication ( authentication ) ; when ( authentication . getPrincipal ( ) ) . thenReturn ( mockUserDetails ) ; final org . sentilo . web . catalog . security . CatalogUserDetails userDetails = service . getCatalogUserDetails ( ) ; org . junit . Assert . assertEquals ( mockUserDetails , userDetails ) ; }
|
org . junit . Assert . assertNull ( service . getCatalogUserDetails ( ) )
|
testGetCurrOffset ( ) { System . out . println ( "getCurrOffset" ) ; com . bixly . pastevid . recorders . AudioCache instance = new com . bixly . pastevid . recorders . AudioCache ( ) ; long expResult = 0L ; long result = instance . getCurrOffset ( ) ; "<AssertPlaceHolder>" ; } getCurrOffset ( ) { return currOffset ; }
|
org . junit . Assert . assertEquals ( expResult , result )
|
getMonitorLocalSources ( ) { "<AssertPlaceHolder>" ; } getMonitorLocalSources ( ) { return this . monitorLocalSources ; }
|
org . junit . Assert . assertThat ( plugin . getMonitorLocalSources ( ) , org . hamcrest . Matchers . is ( true ) )
|
testIncludeFileInJarWithSourceFilePresent ( ) { java . lang . String inputClassFileName = "FooBar.class" ; boolean expectedOutput = true ; compilationManager . addSourceFile ( "FooBar.java" ) ; "<AssertPlaceHolder>" ; } includeFileInJar ( java . lang . String ) { if ( ! ( classFileName . endsWith ( org . apache . sqoop . orm . CompilationManager . CLASS_EXTENSION ) ) ) { return false ; } java . lang . String className = org . apache . commons . lang3 . StringUtils . substringBeforeLast ( classFileName , org . apache . sqoop . orm . CompilationManager . CLASS_EXTENSION ) ; java . lang . String sourceFileOfClass = className + ( org . apache . sqoop . orm . CompilationManager . JAVA_EXTENSION ) ; return ( isInnerClass ( sourceFileOfClass ) ) || ( isOuterClass ( sourceFileOfClass ) ) ; }
|
org . junit . Assert . assertEquals ( expectedOutput , compilationManager . includeFileInJar ( inputClassFileName ) )
|
shouldUnicastMessageFromRecoveredProcess ( ) { broker . BrokerIntegrationTest . DummyProcess dummy1 = new broker . BrokerIntegrationTest . DummyProcess ( "Dummy<sp>1" , 1 , 2 ) ; broker . BrokerIntegrationTest . DummyProcess dummy2 = new broker . BrokerIntegrationTest . DummyProcess ( "Dummy<sp>2" , 2 , 2 ) ; dummy1 . start ( ) ; dummy2 . start ( ) ; failureInjector . killProcess ( 1 ) ; java . lang . Thread . sleep ( 50 ) ; failureInjector . restoreProcess ( 1 ) ; java . lang . Thread . sleep ( 50 ) ; dummy1 . send ( new message . ValueMessage ( 1 , 2 , 0 , "test" ) ) ; java . lang . Thread . sleep ( ( ( broker . ActiveMqBroker . DELAY ) + 50 ) ) ; "<AssertPlaceHolder>" ; } getMessage ( ) { return message ; }
|
org . junit . Assert . assertNotNull ( dummy2 . getMessage ( ) )
|
shouldMarkPositionWithMultilineContent ( ) { printTest ( "shouldMarkPositionWithMultilineContent()" ) ; java . lang . String content = "CREATE<sp>FOOBAR<sp>with<sp>NO<sp>WORDS;\n" + ( "CREATE<sp>BARFOO<sp>with<sp>lots<sp>of<sp>words<sp>after<sp>it;\n" + "CREATE<sp>TABLE<sp>myTable<sp>(column<sp>definition<sp>data);" ) ; java . lang . String fragment = "with<sp>lots<sp>of<sp>words<sp>after<sp>it;\n" + "CREATE<sp>TABLE<sp>myTable<sp>(column<sp>definition<sp>data);" ; org . modeshape . sequencer . ddl . DdlTokenStream tokens = getTokens ( content ) ; tokens . start ( ) ; while ( tokens . hasNext ( ) ) { java . lang . String lastToken = tokens . consume ( ) ; if ( lastToken . equalsIgnoreCase ( "BARFOO" ) ) { tokens . mark ( ) ; } } java . lang . String stringFragment = tokens . getMarkedContent ( ) ; "<AssertPlaceHolder>" ; } getMarkedContent ( ) { org . modeshape . common . text . Position startPosition = new org . modeshape . common . text . Position ( currentMarkedPosition . getIndexInContent ( ) , currentMarkedPosition . getLine ( ) , currentMarkedPosition . getColumn ( ) ) ; mark ( ) ; return getContentBetween ( startPosition , currentMarkedPosition ) ; }
|
org . junit . Assert . assertThat ( stringFragment , org . hamcrest . core . Is . is ( fragment ) )
|
testConvertAll ( ) { java . lang . Long id = 1L ; java . lang . String abbrName = "abbr<sp>name" ; java . lang . String name = "fgsdfds" ; java . lang . Long departmentId = 2L ; org . lnu . is . domain . department . Department department = new org . lnu . is . domain . department . Department ( ) ; department . setId ( departmentId ) ; java . lang . Long languageId = 2L ; org . lnu . is . domain . language . Language language = new org . lnu . is . domain . language . Language ( ) ; language . setId ( languageId ) ; org . lnu . is . domain . department . name . DepartmentName expected = new org . lnu . is . domain . department . name . DepartmentName ( ) ; expected . setId ( id ) ; expected . setDepartment ( department ) ; expected . setLanguage ( language ) ; expected . setAbbrName ( abbrName ) ; expected . setName ( name ) ; org . lnu . is . resource . department . name . DepartmentNameResource source = new org . lnu . is . resource . department . name . DepartmentNameResource ( ) ; source . setId ( id ) ; source . setDepartmentId ( departmentId ) ; source . setLanguageId ( languageId ) ; source . setAbbrName ( abbrName ) ; source . setName ( name ) ; org . lnu . is . domain . department . name . DepartmentName expected1 = new org . lnu . is . domain . department . name . DepartmentName ( ) ; org . lnu . is . resource . department . name . DepartmentNameResource source1 = new org . lnu . is . resource . department . name . DepartmentNameResource ( ) ; java . util . List < org . lnu . is . domain . department . name . DepartmentName > expecteds = java . util . Arrays . asList ( expected , expected1 ) ; java . util . List < org . lnu . is . resource . department . name . DepartmentNameResource > sources = java . util . Arrays . asList ( source , source1 ) ; java . util . List < org . lnu . is . domain . department . name . DepartmentName > actual = unit . convertAll ( sources ) ; "<AssertPlaceHolder>" ; } convertAll ( java . util . List ) { return convertAll ( sources , new java . util . ArrayList < TARGET > ( sources . size ( ) ) ) ; }
|
org . junit . Assert . assertEquals ( expecteds , actual )
|
reg_layout_1 ( ) { for ( java . lang . String s : layoutNames ) "<AssertPlaceHolder>" ; } fetch ( java . lang . String ) { if ( layoutTypeName == null ) throw new java . lang . IllegalArgumentException ( "LayoutType.convert:<sp>null<sp>not<sp>allowed" ) ; org . apache . jena . sdb . store . LayoutType t = org . apache . jena . sdb . store . LayoutType . registry . lookup ( layoutTypeName ) ; if ( t != null ) return t ; org . slf4j . LoggerFactory . getLogger ( org . apache . jena . sdb . store . LayoutType . class ) . warn ( ( ( "Can't<sp>turn<sp>'" + layoutTypeName ) + "'<sp>into<sp>a<sp>layout<sp>type" ) ) ; throw new org . apache . jena . sdb . SDBException ( ( ( "Can't<sp>turn<sp>'" + layoutTypeName ) + "'<sp>into<sp>a<sp>layout<sp>type" ) ) ; }
|
org . junit . Assert . assertNotNull ( org . apache . jena . sdb . store . LayoutType . fetch ( s ) )
|
getYamlDataObjectTest ( ) { java . util . Map < java . lang . String , java . lang . Object > map = org . apache . rocketmq . acl . common . AclUtils . getYamlDataObject ( "src/test/resources/conf/plain_acl.yml" , java . util . Map . class ) ; "<AssertPlaceHolder>" ; } getYamlDataObject ( java . lang . String , java . lang . Class ) { org . yaml . snakeyaml . Yaml ymal = new org . yaml . snakeyaml . Yaml ( ) ; java . io . FileInputStream fis = null ; try { fis = new java . io . FileInputStream ( new java . io . File ( path ) ) ; return ymal . loadAs ( fis , clazz ) ; } catch ( java . lang . Exception e ) { throw new org . apache . rocketmq . acl . common . AclException ( java . lang . String . format ( "The<sp>file<sp>for<sp>Plain<sp>mode<sp>was<sp>not<sp>found<sp>,<sp>paths<sp>%s" , path ) , e ) ; } finally { if ( fis != null ) { try { fis . close ( ) ; } catch ( java . io . IOException e ) { throw new org . apache . rocketmq . acl . common . AclException ( "close<sp>transport<sp>fileInputStream<sp>Exception" , e ) ; } } } }
|
org . junit . Assert . assertFalse ( map . isEmpty ( ) )
|
objectIsInstantiatedCorrectly_whenValidFactoryMethodAndParametersAreProvided ( ) { ci = new nl . jqno . equalsverifier . internal . reflection . ConditionalInstantiator ( "java.lang.Integer" ) ; int expected = java . lang . Integer . valueOf ( 42 ) ; int actual = ci . callFactory ( "valueOf" , nl . jqno . equalsverifier . internal . reflection . Util . classes ( int . class ) , nl . jqno . equalsverifier . internal . reflection . Util . objects ( 42 ) ) ; "<AssertPlaceHolder>" ; } objects ( java . lang . Object ) { return new java . lang . Object [ ] { first } ; }
|
org . junit . Assert . assertThat ( actual , org . hamcrest . CoreMatchers . is ( expected ) )
|
testTransformationObject ( ) { org . jglue . fluentjson . TestBuilderFactory . A a = new org . jglue . fluentjson . TestBuilderFactory . A ( ) ; com . google . gson . JsonObject jsonObject = org . jglue . fluentjson . JsonBuilderFactory . buildObject ( ) . add ( "value" , new org . jglue . fluentjson . AbstractMapper < org . jglue . fluentjson . TestBuilderFactory . A > ( ) { @ org . jglue . fluentjson . Override public org . jglue . fluentjson . JsonBuilder map ( org . jglue . fluentjson . TestBuilderFactory . A t ) { return buildObject ( ) . add ( "b" , t . b ) . add ( "c" , t . c ) ; } } , a ) . getJson ( ) ; com . google . gson . JsonElement test = new com . google . gson . JsonParser ( ) . parse ( "{\"value\":{\"b\":\"hello\",\"c\":\"world\"}}" ) ; "<AssertPlaceHolder>" ; } getJson ( ) { return ( ( R ) ( root ) ) ; }
|
org . junit . Assert . assertEquals ( test , jsonObject )
|
testIsTrue2 ( ) { org . apache . commons . lang3 . Validate . isTrue ( true , "MSG" ) ; try { org . apache . commons . lang3 . Validate . isTrue ( false , "MSG" ) ; org . junit . Assert . fail ( "Expecting<sp>IllegalArgumentException" ) ; } catch ( final java . lang . IllegalArgumentException ex ) { "<AssertPlaceHolder>" ; } } getMessage ( ) { return getFormattedExceptionMessage ( super . getMessage ( ) ) ; }
|
org . junit . Assert . assertEquals ( "MSG" , ex . getMessage ( ) )
|
Rekords_can_be_nested ( ) { com . noodlesandwich . rekord . Rekord < com . noodlesandwich . rekord . Person > hans = Person . rekord . with ( Person . firstName , "Hans" ) . with ( Person . address , Address . rekord . with ( Address . houseNumber , 123 ) . with ( Address . street , "Kaiserstrae" ) . with ( Address . city , "Frankfurt" ) . with ( Address . postalCode , "60329" ) ) ; "<AssertPlaceHolder>" ; } with ( V , com . noodlesandwich . rekord . keys . Key ) { return set ( key . set ( value , properties ) ) ; }
|
org . junit . Assert . assertThat ( hans , org . hamcrest . Matchers . is ( Person . rekord . with ( Person . firstName , "Hans" ) . with ( Person . address , Address . rekord . with ( Address . houseNumber , 123 ) . with ( Address . street , "Kaiserstrae" ) . with ( Address . city , "Frankfurt" ) . with ( Address . postalCode , "60329" ) ) ) )
|
scaleUp_RestUrlNull ( ) { prepareSlaveClusterSizeAndServerIds ( org . oscm . app . iaas . VSystemProcessorBeanTest . THREE , org . oscm . app . iaas . VSystemProcessorBeanTest . TWO ) ; org . oscm . app . iaas . data . FlowState newState = vSystemProcessor . scaleUp ( paramHandler , FlowState . VSYSTEM_CREATING , org . oscm . app . iaas . VSystemProcessorBeanTest . DISK_IMAGE_ID , org . oscm . app . iaas . VSystemProcessorBeanTest . DISK_IMAGE_ID , true ) ; "<AssertPlaceHolder>" ; } scaleUp ( org . oscm . app . iaas . PropertyHandler , org . oscm . app . iaas . data . FlowState , java . lang . String , java . lang . String , boolean ) { try { int slaveClusterSize = getSlaveClusterSize ( paramHandler ) ; java . util . List < java . lang . String > serverIds = vsysComm . getVServersForTemplate ( slaveTemplateId , paramHandler ) ; if ( slaveClusterSize > ( serverIds . size ( ) ) ) { if ( vSysInNormalState ) { java . lang . String vServerId = vsysComm . scaleUp ( masterTemplateId , slaveTemplateId , paramHandler ) ; paramHandler . setVserverId ( vServerId ) ; java . lang . String restURL = paramHandler . getAdminRestURL ( ) ; if ( restURL == null ) { return org . oscm . app . iaas . data . FlowState . VSYSTEM_SCALE_UP ; } return org . oscm . app . iaas . data . FlowState . VSYSTEM_SCALE_UP_WAIT_BEFORE_NOTIFICATION ; } } if ( slaveClusterSize == ( serverIds . size ( ) ) ) { newStatus = determineScalingAndSizing ( paramHandler ) ; } org . oscm . app . iaas . VSystemProcessorBean . logger . debug ( ( "newStatus=" + newStatus ) ) ; } catch ( java . lang . Exception e ) { org . oscm . app . iaas . VSystemProcessorBean . logger . error ( "Problem<sp>while<sp>scaling<sp>up:" , e ) ; throw e ; } return newStatus ; }
|
org . junit . Assert . assertEquals ( FlowState . VSYSTEM_SCALE_UP , newState )
|
testInverse ( ) { final int numVals = 10000 ; final java . util . Random random = java . util . concurrent . ThreadLocalRandom . current ( ) ; final int [ ] inverted = new int [ numVals ] ; final int [ ] original = new int [ numVals ] ; final java . util . List < java . lang . Integer > ints = java . util . stream . IntStream . range ( 0 , numVals ) . boxed ( ) . collect ( java . util . stream . Collectors . toList ( ) ) ; java . util . Collections . shuffle ( ints , random ) ; for ( int i = 0 ; i < numVals ; i ++ ) { inverted [ i ] = ints . get ( i ) ; original [ i ] = inverted [ i ] ; } org . apache . druid . common . utils . IntArrayUtils . inverse ( inverted ) ; for ( int i = 0 ; i < numVals ; i ++ ) { "<AssertPlaceHolder>" ; } } inverse ( int [ ] ) { for ( int i = 0 ; i < ( a . length ) ; i ++ ) { if ( ( a [ i ] ) >= 0 ) { org . apache . druid . common . utils . IntArrayUtils . inverseLoop ( a , i ) ; } } for ( int i = 0 ; i < ( a . length ) ; i ++ ) { a [ i ] = ~ ( a [ i ] ) ; } }
|
org . junit . Assert . assertEquals ( i , inverted [ original [ i ] ] )
|
testTrashParentWithBaseModelIsIsNotVisible ( ) { 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 ) ) )
|
testStateful ( ) { org . apache . aries . ejb . modelling . impl . ParsedEJBServices pes = new org . apache . aries . ejb . modelling . impl . ParsedEJBServices ( ) ; pes . setAllowedNames ( java . util . Arrays . asList ( "Bar" , "Baz" ) ) ; pes . addEJBView ( "Baz" , "Stateful" , "com.acme.Bar" , true ) ; "<AssertPlaceHolder>" ; } getServices ( ) { return registrations ; }
|
org . junit . Assert . assertEquals ( 0 , pes . getServices ( ) . size ( ) )
|
testErrorMessageForSummaryFileAndTwoReports ( ) { final java . io . File summaryFile = new java . io . File ( "summary.txt" ) ; final java . lang . String summaryFilePath = summaryFile . getAbsolutePath ( ) ; setField ( checkMojo , "summaryOutputFile" , summaryFile ) ; final java . lang . String expected = ( ( "[LINT]<sp>Violations<sp>found.<sp>For<sp>more<sp>details<sp>see<sp>results<sp>in<sp>one<sp>of<sp>the<sp>following<sp>files:<sp>" + summaryFilePath ) + ",<sp>" ) + ( xmlFilePath ) ; final java . lang . String actual = checkMojo . generateErrorMessage ( com . google . common . collect . Lists . newArrayList ( "summary" , "xml" ) ) ; "<AssertPlaceHolder>" ; } setField ( java . lang . Object , java . lang . String , java . lang . Object ) { final java . lang . reflect . Field field = object . getClass ( ) . getDeclaredField ( fieldname ) ; field . setAccessible ( true ) ; field . set ( object , value ) ; }
|
org . junit . Assert . assertEquals ( expected , actual )
|
withExtractedDirectionForDocumentSnapshotCursor ( ) { doAnswer ( com . google . cloud . firestore . LocalFirestoreHelper . queryResponse ( ) ) . when ( firestoreMock ) . streamRequest ( runQuery . capture ( ) , streamObserverCapture . capture ( ) , org . mockito . Matchers . < com . google . api . gax . rpc . ServerStreamingCallable > any ( ) ) ; query . orderBy ( "foo" , Query . Direction . DESCENDING ) . startAt ( com . google . cloud . firestore . LocalFirestoreHelper . SINGLE_FIELD_SNAPSHOT ) . get ( ) ; com . google . firestore . v1 . Value documentBoundary = com . google . firestore . v1 . Value . newBuilder ( ) . setReferenceValue ( ( ( query . getResourcePath ( ) . toString ( ) ) + "/doc" ) ) . build ( ) ; com . google . firestore . v1 . RunQueryRequest queryRequest = com . google . cloud . firestore . LocalFirestoreHelper . query ( com . google . cloud . firestore . LocalFirestoreHelper . order ( "foo" , Direction . DESCENDING ) , com . google . cloud . firestore . LocalFirestoreHelper . order ( "__name__" , StructuredQuery . Direction . DESCENDING ) , com . google . cloud . firestore . LocalFirestoreHelper . startAt ( true ) , com . google . cloud . firestore . LocalFirestoreHelper . startAt ( documentBoundary , true ) ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return value ; }
|
org . junit . Assert . assertEquals ( queryRequest , runQuery . getValue ( ) )
|
return_empty_sorted_set_java8 ( ) { java . util . Set < java . lang . String > emptySortedSet = java . util . Collections . emptySortedSet ( ) ; "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertTrue ( emptySortedSet . isEmpty ( ) )
|
testShortName ( ) { java . lang . String shortName = "MyLogger" ; java . lang . String fullName = ( ( getClass ( ) . getName ( ) ) + "." ) + shortName ; "<AssertPlaceHolder>" ; } getName ( java . lang . String ) { return org . zeroturnaround . exec . stream . CallerLoggerUtil . getName ( name , 1 ) ; }
|
org . junit . Assert . assertEquals ( fullName , org . zeroturnaround . exec . stream . CallerLoggerUtil . getName ( shortName ) )
|
testActionTypeCategory ( ) { for ( final com . amazonaws . codepipeline . jenkinsplugin . CodePipelineStateModel . CategoryType categoryType : com . amazonaws . codepipeline . jenkinsplugin . CodePipelineStateModel . CategoryType . values ( ) ) { model . setActionTypeCategory ( categoryType . getName ( ) ) ; "<AssertPlaceHolder>" ; } } getActionTypeCategory ( ) { return actionTypeCategory ; }
|
org . junit . Assert . assertEquals ( categoryType , model . getActionTypeCategory ( ) )
|
testReturnTypeEnhancementFromThirdPartyLoader ( ) { org . jboss . forge . furnace . addons . AddonRegistry registry = org . jboss . forge . arquillian . services . LocalServices . getFurnace ( getClass ( ) . getClassLoader ( ) ) . getAddonRegistry ( ) ; java . lang . ClassLoader thisLoader = org . jboss . forge . furnace . proxy . classloader . ClassLoaderAdapterCollisionsTest . class . getClassLoader ( ) ; java . lang . ClassLoader dep1Loader = registry . getAddon ( org . jboss . forge . furnace . addons . AddonId . from ( "dep1" , "1" ) ) . getClassLoader ( ) ; java . lang . ClassLoader dep2Loader = registry . getAddon ( org . jboss . forge . furnace . addons . AddonId . from ( "dep2" , "2" ) ) . getClassLoader ( ) ; org . jboss . forge . classloader . mock . collisions . ClassCreatesInstanceFromClassLoader creator ; try { @ org . jboss . forge . furnace . proxy . classloader . SuppressWarnings ( "unused" ) org . jboss . forge . classloader . mock . collisions . ClassWithGetterAndSetter result = new org . jboss . forge . classloader . mock . collisions . ClassCreatesInstanceFromClassLoader ( ) . create ( dep2Loader , org . jboss . forge . classloader . mock . collisions . ClassWithGetterAndSetter . class ) ; org . junit . Assert . fail ( ( "Should<sp>have<sp>received<sp>a<sp>" + ( org . jboss . forge . furnace . proxy . classloader . ClassCastException . class . getName ( ) ) ) ) ; } catch ( java . lang . ClassCastException e ) { } catch ( java . lang . Exception e ) { org . junit . Assert . fail ( ( "Should<sp>have<sp>received<sp>a<sp>" + ( org . jboss . forge . furnace . proxy . classloader . ClassCastException . class . getName ( ) ) ) ) ; } java . lang . Object delegate = dep1Loader . loadClass ( org . jboss . forge . classloader . mock . collisions . ClassCreatesInstanceFromClassLoader . class . getName ( ) ) . newInstance ( ) ; creator = ( ( org . jboss . forge . classloader . mock . collisions . ClassCreatesInstanceFromClassLoader ) ( org . jboss . forge . furnace . proxy . ClassLoaderAdapterBuilder . callingLoader ( thisLoader ) . delegateLoader ( dep1Loader ) . enhance ( delegate ) ) ) ; org . jboss . forge . classloader . mock . collisions . ClassWithGetterAndSetter create = creator . create ( dep2Loader , org . jboss . forge . classloader . mock . collisions . ClassWithGetterAndSetter . class ) ; "<AssertPlaceHolder>" ; } create ( java . lang . String , org . jboss . forge . furnace . versions . VersionRange ) { return org . jboss . forge . furnace . repositories . AddonDependencyEntry . create ( name , range , false , false ) ; }
|
org . junit . Assert . assertNotNull ( create )
|
testOldConfigsExistFalse ( ) { when ( mockedHistoryDao . hasOldRevision ( mockedProject . getConfigFile ( ) , configDates [ 0 ] ) ) . thenReturn ( true ) ; when ( mockedHistoryDao . hasOldRevision ( mockedProject . getConfigFile ( ) , configDates [ 1 ] ) ) . thenReturn ( false ) ; boolean expResult = false ; sut . onAttached ( mockedBuild ) ; boolean result = sut . oldConfigsExist ( ) ; "<AssertPlaceHolder>" ; } oldConfigsExist ( ) { final hudson . plugins . jobConfigHistory . HistoryDao historyDao = getHistoryDao ( ) ; final hudson . model . Job < ? , ? > project = build . getParent ( ) ; for ( java . lang . String timestamp : configDates ) { if ( ! ( historyDao . hasOldRevision ( project . getConfigFile ( ) , timestamp ) ) ) { return false ; } } return true ; }
|
org . junit . Assert . assertEquals ( expResult , result )
|
focusRemainsInOriginalWindowWhenOpeningNewWindow ( ) { org . junit . Assume . assumeTrue ( org . openqa . selenium . firefox . FirefoxDriverTest . platformHasNativeEvents ( ) ) ; driver . get ( pages . xhtmlTestPage ) ; driver . findElement ( org . openqa . selenium . By . name ( "windowOne" ) ) . click ( ) ; sleepBecauseWindowsTakeTimeToOpen ( ) ; driver . get ( pages . javascriptPage ) ; org . openqa . selenium . WebElement keyReporter = driver . findElement ( org . openqa . selenium . By . id ( "keyReporter" ) ) ; keyReporter . sendKeys ( "ABC<sp>DEF" ) ; "<AssertPlaceHolder>" ; } getAttribute ( java . lang . String ) { return commandProcessor . getString ( "getAttribute" , new java . lang . String [ ] { attributeLocator } ) ; }
|
org . junit . Assert . assertThat ( keyReporter . getAttribute ( "value" ) , org . hamcrest . Matchers . is ( "ABC<sp>DEF" ) )
|
selectRowIdAndVersionDistinct ( ) { org . sagebionetworks . table . cluster . SqlQuery translator = new org . sagebionetworks . table . cluster . SqlQueryBuilder ( "select<sp>distinct<sp>foo<sp>from<sp>syn123" , tableSchema ) . build ( ) ; "<AssertPlaceHolder>" ; } includesRowIdAndVersion ( ) { return this . includesRowIdAndVersion ; }
|
org . junit . Assert . assertFalse ( translator . includesRowIdAndVersion ( ) )
|
convertPolygonWithHole_NoRedundantSpaces_ShouldConvert ( ) { java . lang . String wkt = "POLYGON<sp>((35<sp>10,<sp>45<sp>45,<sp>15<sp>40,<sp>10<sp>20,<sp>35<sp>10),(20<sp>30,<sp>35<sp>35,<sp>30<sp>20,<sp>20<sp>30))" ; java . lang . String geoJson = org . nlpcn . es4sql . spatial . WktToGeoJsonConverter . toGeoJson ( wkt ) ; java . lang . String expectedGeoJson = "{\"type\":\"Polygon\",<sp>\"coordinates\":<sp>[[[35,10],[45,45],[15,40],[10,20],[35,10]],[[20,30],[35,35],[30,20],[20,30]]]}" ; "<AssertPlaceHolder>" ; } toGeoJson ( java . lang . String ) { wkt = wkt . toLowerCase ( ) ; int startOfCoordinates = wkt . indexOf ( "multilinestring" 2 ) ; if ( startOfCoordinates == ( - 1 ) ) throw new java . lang . IllegalArgumentException ( "multilinestring" 4 ) ; java . lang . String wktType = wkt . substring ( 0 , startOfCoordinates ) . trim ( ) ; wkt = wkt . substring ( startOfCoordinates ) ; java . lang . String type = "" ; java . lang . String coordinates = "" ; switch ( wktType ) { case "point" : type = "multilinestring" 3 ; coordinates = org . nlpcn . es4sql . spatial . WktToGeoJsonConverter . pointCoordinatesFromWkt ( wkt ) ; break ; case "polygon" : type = "multilinestring" 1 ; coordinates = org . nlpcn . es4sql . spatial . WktToGeoJsonConverter . polygonCoordinatesFromWkt ( wkt ) ; break ; case "linestring" : type = "LineString" ; coordinates = org . nlpcn . es4sql . spatial . WktToGeoJsonConverter . lineStringCoordinatesFromWkt ( wkt ) ; break ; case "multipolygon" : type = "MultiPolygon" ; coordinates = org . nlpcn . es4sql . spatial . WktToGeoJsonConverter . multiPolygonCoordinatesFromWkt ( wkt ) ; break ; case "multipoint" : type = "multilinestring" 0 ; coordinates = org . nlpcn . es4sql . spatial . WktToGeoJsonConverter . multiPointCoordinatesFromWkt ( wkt ) ; break ; case "multilinestring" : type = "MultiLineString" ; coordinates = org . nlpcn . es4sql . spatial . WktToGeoJsonConverter . multiLineStringCoordinatesFromWkt ( wkt ) ; break ; default : throw new java . lang . IllegalArgumentException ( "multilinestring" 5 ) ; } return org . nlpcn . es4sql . spatial . WktToGeoJsonConverter . buildGeoJson ( type , coordinates ) ; }
|
org . junit . Assert . assertEquals ( expectedGeoJson , geoJson )
|
updateConfiguration_updatesActive ( ) { int rowsModified ; org . easyrec . model . plugin . NamedConfiguration config ; config = new org . easyrec . model . plugin . NamedConfiguration ( 1 , 1 , waitingGenerator . getId ( ) , "Configuration<sp>2" , org . easyrec . store . dao . plugin . impl . NamedConfigurationDAOMysqlImplTest . CONFIG_1_1_2 , true ) ; rowsModified = namedConfigurationDAO . updateConfiguration ( config ) ; "<AssertPlaceHolder>" ; } updateConfiguration ( org . easyrec . model . plugin . NamedConfiguration ) { com . google . common . base . Preconditions . checkNotNull ( namedConfiguration ) ; com . google . common . base . Preconditions . checkNotNull ( namedConfiguration . getPluginId ( ) ) ; com . google . common . base . Preconditions . checkNotNull ( namedConfiguration . getPluginId ( ) . getUri ( ) ) ; com . google . common . base . Preconditions . checkNotNull ( namedConfiguration . getPluginId ( ) . getVersion ( ) ) ; com . google . common . base . Preconditions . checkNotNull ( namedConfiguration . getName ( ) ) ; com . google . common . base . Preconditions . checkNotNull ( namedConfiguration . getConfiguration ( ) ) ; com . google . common . base . Preconditions . checkNotNull ( namedConfiguration . getConfiguration ( ) . getConfigurationName ( ) ) ; java . lang . String oldName = namedConfiguration . getName ( ) ; java . lang . String newName = namedConfiguration . getConfiguration ( ) . getConfigurationName ( ) ; int rowsAffected ; if ( namedConfiguration . isActive ( ) ) { updateAllInactive . update ( namedConfiguration . getTenantId ( ) , namedConfiguration . getAssocTypeId ( ) ) ; rowsAffected = updateConfigurationActive . update ( newName , namedConfiguration . getConfiguration ( ) . marshal ( false ) , namedConfiguration . getTenantId ( ) , namedConfiguration . getAssocTypeId ( ) , namedConfiguration . getPluginId ( ) . getUri ( ) , namedConfiguration . getPluginId ( ) . getVersion ( ) , oldName ) ; } else rowsAffected = updateConfigurationInactive . update ( newName , namedConfiguration . getConfiguration ( ) . marshal ( false ) , namedConfiguration . getTenantId ( ) , namedConfiguration . getAssocTypeId ( ) , namedConfiguration . getPluginId ( ) . getUri ( ) , namedConfiguration . getPluginId ( ) . getVersion ( ) , oldName ) ; namedConfiguration . setName ( newName ) ; return rowsAffected ; }
|
org . junit . Assert . assertThat ( rowsModified , is ( 1 ) )
|
removeCorrespondingKeys ( ) { java . util . Properties p = new java . util . Properties ( ) ; p . setProperty ( SessionProfile . KEY_PROVIDER , "aaa" ) ; p . setProperty ( ( ( SessionProfile . KEY_PROVIDER ) + "_" ) , "bbb" ) ; p . setProperty ( ( ( SessionProfile . KEY_PREFIX ) + "" ) , "" ) ; p . setProperty ( ( ( SessionProfile . KEY_PREFIX ) + "ccc" ) , "ccc" ) ; com . asakusafw . windgate . core . session . SessionProfile . removeCorrespondingKeys ( p ) ; java . util . Properties answer = new java . util . Properties ( ) ; answer . setProperty ( ( ( SessionProfile . KEY_PROVIDER ) + "_" ) , "bbb" ) ; "<AssertPlaceHolder>" ; } is ( java . lang . String ) { com . asakusafw . dmdl . java . util . JavaName jn = com . asakusafw . dmdl . java . util . JavaName . of ( new com . asakusafw . dmdl . model . AstSimpleName ( null , name ) ) ; jn . addFirst ( "is" ) ; java . lang . Object result = invoke ( jn . toMemberName ( ) ) ; return ( ( java . lang . Boolean ) ( result ) ) ; }
|
org . junit . Assert . assertThat ( p , is ( answer ) )
|
testObjectMethodReturnsV8Object ( ) { com . eclipsesource . v8 . V8CallbackTest . ICallback callback = mock ( com . eclipsesource . v8 . V8CallbackTest . ICallback . class ) ; doReturn ( new com . eclipsesource . v8 . V8Object ( v8 ) . add ( "foo" , "bar" ) ) . when ( callback ) . objectMethodNoParameter ( ) ; v8 . registerJavaMethod ( callback , "objectMethodNoParameter" , "foo" , new java . lang . Class < ? > [ ] { } ) ; com . eclipsesource . v8 . V8Object result = v8 . executeObjectFunction ( "foo" , null ) ; "<AssertPlaceHolder>" ; result . close ( ) ; } getString ( java . lang . String ) { throw new java . lang . UnsupportedOperationException ( ) ; }
|
org . junit . Assert . assertEquals ( "bar" , result . getString ( "foo" ) )
|
testGetScriptAsString ( ) { org . springframework . data . redis . core . script . DefaultRedisScript < java . lang . String > redisScript = new org . springframework . data . redis . core . script . DefaultRedisScript < java . lang . String > ( ) ; redisScript . setScriptText ( "return<sp>ARGS[1]" ) ; redisScript . setResultType ( java . lang . String . class ) ; "<AssertPlaceHolder>" ; } getScriptAsString ( ) { try { return scriptSource . getScriptAsString ( ) ; } catch ( java . io . IOException e ) { throw new org . springframework . data . redis . core . script . ScriptingException ( "Error<sp>reading<sp>script<sp>text" , e ) ; } }
|
org . junit . Assert . assertEquals ( "return<sp>ARGS[1]" , redisScript . getScriptAsString ( ) )
|
testLoadingProperties ( ) { java . lang . String fromAddress = WaitListManager . waitListProperties . getProperty ( "from_address" ) ; "<AssertPlaceHolder>" ; } getProperty ( java . lang . String ) { oscar . OscarProperties proper = oscar . OscarProperties . getInstance ( ) ; return proper . getProperty ( proName , null ) ; }
|
org . junit . Assert . assertNotNull ( fromAddress )
|
should_deserialize_JSON_to_Object_field ( ) { org . springframework . data . simpledb . core . entity . ObjectFieldWrapperTest . AClass aDomainObject = new org . springframework . data . simpledb . core . entity . ObjectFieldWrapperTest . AClass ( ) ; org . springframework . data . simpledb . core . entity . ObjectFieldWrapperTest . JSONCompatibleClass aJSONObject = new org . springframework . data . simpledb . core . entity . ObjectFieldWrapperTest . JSONCompatibleClass ( ) ; aJSONObject . setName ( org . springframework . data . simpledb . core . entity . ObjectFieldWrapperTest . SAMPLE_STRING_VALUE ) ; aDomainObject . setObject ( aJSONObject ) ; org . springframework . data . simpledb . core . entity . EntityWrapper < org . springframework . data . simpledb . core . entity . ObjectFieldWrapperTest . AClass , java . lang . String > sdbEntity = new org . springframework . data . simpledb . core . entity . EntityWrapper < org . springframework . data . simpledb . core . entity . ObjectFieldWrapperTest . AClass , java . lang . String > ( org . springframework . data . simpledb . util . EntityInformationSupport . readEntityInformation ( org . springframework . data . simpledb . core . entity . ObjectFieldWrapperTest . AClass . class ) , aDomainObject ) ; final java . util . Map < java . lang . String , java . lang . String > attributes = sdbEntity . serialize ( ) ; org . springframework . data . simpledb . core . entity . EntityWrapper < org . springframework . data . simpledb . core . entity . ObjectFieldWrapperTest . AClass , java . lang . String > newSdbEntity = new org . springframework . data . simpledb . core . entity . EntityWrapper < org . springframework . data . simpledb . core . entity . ObjectFieldWrapperTest . AClass , java . lang . String > ( org . springframework . data . simpledb . util . EntityInformationSupport . readEntityInformation ( org . springframework . data . simpledb . core . entity . ObjectFieldWrapperTest . AClass . class ) ) ; newSdbEntity . deserialize ( attributes ) ; org . springframework . data . simpledb . core . entity . ObjectFieldWrapperTest . AClass returnedEntity = newSdbEntity . getItem ( ) ; org . springframework . data . simpledb . core . entity . ObjectFieldWrapperTest . JSONCompatibleClass deserializedJSONObject = ( ( org . springframework . data . simpledb . core . entity . ObjectFieldWrapperTest . JSONCompatibleClass ) ( returnedEntity . getObject ( ) ) ) ; "<AssertPlaceHolder>" ; } getName ( ) { return name ; }
|
org . junit . Assert . assertEquals ( aJSONObject . getName ( ) , deserializedJSONObject . getName ( ) )
|
testSkipsValue ( ) { java . io . ByteArrayOutputStream baos = new java . io . ByteArrayOutputStream ( ) ; com . splicemachine . orc . stream . TestDecimalStream . writeBigInteger ( baos , java . math . BigInteger . valueOf ( Long . MAX_VALUE ) ) ; com . splicemachine . orc . stream . TestDecimalStream . writeBigInteger ( baos , java . math . BigInteger . valueOf ( Long . MIN_VALUE ) ) ; com . splicemachine . orc . stream . OrcInputStream inputStream = com . splicemachine . orc . stream . TestDecimalStream . orcInputStreamFor ( "skip<sp>test" , baos . toByteArray ( ) ) ; com . splicemachine . orc . stream . DecimalStream stream = new com . splicemachine . orc . stream . DecimalStream ( inputStream ) ; stream . skip ( 1 ) ; "<AssertPlaceHolder>" ; } nextLong ( ) { long result = 0 ; int offset = 0 ; long b ; do { b = input . read ( ) ; if ( b == ( - 1 ) ) { throw new com . splicemachine . orc . OrcCorruptionException ( ( "Reading<sp>BigInteger<sp>past<sp>EOF<sp>from<sp>" + ( input ) ) ) ; } long work = 127 & b ; if ( ( offset >= 63 ) && ( ( offset != 63 ) || ( work > 1 ) ) ) { throw new com . splicemachine . orc . OrcCorruptionException ( "Decimal<sp>does<sp>not<sp>fit<sp>long<sp>(invalid<sp>table<sp>schema?)" ) ; } result |= work << offset ; offset += 7 ; } while ( b >= 128 ) ; boolean isNegative = ( result & 1 ) != 0 ; if ( isNegative ) { result += 1 ; result = - result ; result = result > > 1 ; result |= 1L << 63 ; } else { result = result > > 1 ; result &= java . lang . Long . MAX_VALUE ; } return result ; }
|
org . junit . Assert . assertEquals ( stream . nextLong ( ) , Long . MIN_VALUE )
|
createEndpoint_TransportNotExist ( ) { new mockit . Expectations ( ) { { transportManager . findTransport ( anyString ) ; result = null ; } } ; org . apache . servicecomb . loadbalance . ServiceCombServer server = ( ( org . apache . servicecomb . loadbalance . ServiceCombServer ) ( filter . createEndpoint ( Const . RESTFUL , null , null ) ) ) ; "<AssertPlaceHolder>" ; } createEndpoint ( java . lang . String , java . lang . String , org . apache . servicecomb . serviceregistry . api . registry . MicroserviceInstance ) { org . apache . servicecomb . core . Transport transport = org . apache . servicecomb . core . CseContext . getInstance ( ) . getTransportManager ( ) . findTransport ( transportName ) ; if ( transport == null ) { org . apache . servicecomb . core . filter . EndpointDiscoveryFilter . LOGGER . info ( "not<sp>deployed<sp>transport<sp>{},<sp>ignore<sp>{}." , transportName , endpoint ) ; return null ; } return new org . apache . servicecomb . core . Endpoint ( transport , endpoint , instance ) ; }
|
org . junit . Assert . assertNull ( server )
|
testSkipDouble ( ) { long sentinel = Long . MAX_VALUE ; org . apache . trevni . OutputBuffer out = new org . apache . trevni . OutputBuffer ( ) ; out . writeValue ( Double . MAX_VALUE , ValueType . DOUBLE ) ; out . writeLong ( sentinel ) ; org . apache . trevni . InputBuffer in = new org . apache . trevni . InputBuffer ( new org . apache . trevni . InputBytes ( out . toByteArray ( ) ) ) ; in . skipValue ( ValueType . DOUBLE ) ; "<AssertPlaceHolder>" ; } readLong ( ) { org . apache . avro . io . parsing . Symbol actual = parser . advance ( Symbol . LONG ) ; if ( actual == ( org . apache . avro . io . parsing . Symbol . INT ) ) { return in . readInt ( ) ; } else if ( actual == ( org . apache . avro . io . parsing . Symbol . DOUBLE ) ) { return ( ( long ) ( in . readDouble ( ) ) ) ; } else { assert actual == ( org . apache . avro . io . parsing . Symbol . LONG ) ; return in . readLong ( ) ; } }
|
org . junit . Assert . assertEquals ( sentinel , in . readLong ( ) )
|
testRemoveMultiplePastEmpty ( ) { org . apache . commons . math3 . stat . regression . SimpleRegression regression = new org . apache . commons . math3 . stat . regression . SimpleRegression ( ) ; regression . addData ( removeX , removeY ) ; regression . removeData ( removeMultiple ) ; "<AssertPlaceHolder>" ; } getN ( ) { return n ; }
|
org . junit . Assert . assertEquals ( regression . getN ( ) , 0 )
|
testBatchSink ( ) { org . apache . hadoop . hbase . regionserver . wal . HLog [ ] entries = new org . apache . hadoop . hbase . regionserver . wal . HLog . Entry [ org . apache . hadoop . hbase . replication . regionserver . TestReplicationSink . BATCH_SIZE ] ; for ( int i = 0 ; i < ( org . apache . hadoop . hbase . replication . regionserver . TestReplicationSink . BATCH_SIZE ) ; i ++ ) { entries [ i ] = createEntry ( org . apache . hadoop . hbase . replication . regionserver . TestReplicationSink . TABLE_NAME1 , i , KeyValue . Type . Put ) ; } org . apache . hadoop . hbase . replication . regionserver . TestReplicationSink . SINK . replicateEntries ( entries ) ; org . apache . hadoop . hbase . client . Scan scan = new org . apache . hadoop . hbase . client . Scan ( ) ; org . apache . hadoop . hbase . client . ResultScanner scanRes = org . apache . hadoop . hbase . replication . regionserver . TestReplicationSink . table1 . getScanner ( scan ) ; "<AssertPlaceHolder>" ; } next ( int ) { java . lang . StringBuilder sb = new java . lang . StringBuilder ( uri ) ; sb . append ( "?n=" ) ; sb . append ( nbRows ) ; for ( int i = 0 ; i < ( maxRetries ) ; i ++ ) { org . apache . hadoop . hbase . rest . client . Response response = client . get ( sb . toString ( ) , Constants . MIMETYPE_PROTOBUF ) ; int code = response . getCode ( ) ; switch ( code ) { case 200 : org . apache . hadoop . hbase . rest . model . CellSetModel model = new org . apache . hadoop . hbase . rest . model . CellSetModel ( ) ; model . getObjectFromMessage ( response . getBody ( ) ) ; return buildResultFromModel ( model ) ; case 204 : case 206 : return null ; case 509 : try { java . lang . Thread . sleep ( sleepTime ) ; } catch ( java . lang . InterruptedException e ) { } break ; default : throw new java . io . IOException ( ( "scanner.next<sp>request<sp>failed<sp>with<sp>" + code ) ) ; } } throw new java . io . IOException ( "scanner.next<sp>request<sp>timed<sp>out" ) ; }
|
org . junit . Assert . assertEquals ( org . apache . hadoop . hbase . replication . regionserver . TestReplicationSink . BATCH_SIZE , scanRes . next ( org . apache . hadoop . hbase . replication . regionserver . TestReplicationSink . BATCH_SIZE ) . length )
|
shouldDeleteFlowCookie ( ) { org . openkilda . model . FlowCookie cookie = org . openkilda . model . FlowCookie . builder ( ) . unmaskedCookie ( org . openkilda . persistence . repositories . impl . Neo4jFlowCookieRepositoryTest . TEST_COOKIE ) . flowId ( org . openkilda . persistence . repositories . impl . Neo4jFlowCookieRepositoryTest . TEST_FLOW_ID ) . build ( ) ; org . openkilda . persistence . repositories . impl . Neo4jFlowCookieRepositoryTest . flowCookieRepository . createOrUpdate ( cookie ) ; org . openkilda . persistence . repositories . impl . Neo4jFlowCookieRepositoryTest . flowCookieRepository . delete ( cookie ) ; "<AssertPlaceHolder>" ; } findAll ( ) { return super . findAll ( ) . stream ( ) . map ( this :: completeWithPaths ) . collect ( java . util . stream . Collectors . toList ( ) ) ; }
|
org . junit . Assert . assertEquals ( 0 , org . openkilda . persistence . repositories . impl . Neo4jFlowCookieRepositoryTest . flowCookieRepository . findAll ( ) . size ( ) )
|
testGetTransactionOtherThread ( ) { final java . util . concurrent . atomic . AtomicReference < java . lang . RuntimeException > exception = new java . util . concurrent . atomic . AtomicReference < java . lang . RuntimeException > ( null ) ; java . lang . Thread thread = new java . lang . Thread ( ) { public void run ( ) { try { com . sun . sgs . service . Transaction t = handle . getTransaction ( ) ; if ( ( txn ) != t ) { throw new java . lang . RuntimeException ( ( ( ( "Expected<sp>" + ( txn ) ) + ",<sp>got<sp>" ) + t ) ) ; } } catch ( java . lang . RuntimeException e ) { e . printStackTrace ( ) ; exception . set ( e ) ; } } } ; thread . start ( ) ; thread . join ( ) ; "<AssertPlaceHolder>" ; } get ( ) { return object ; }
|
org . junit . Assert . assertSame ( null , exception . get ( ) )
|
connection_prepared_statement_batch_01 ( ) { org . apache . jena . jdbc . connections . JenaConnection conn = this . getConnection ( ) ; org . apache . jena . jdbc . connections . PreparedStatement stmt = conn . prepareStatement ( "SELECT<sp>*<sp>WHERE<sp>{<sp>?<sp>?p<sp>?o<sp>}" ) ; for ( int i = 1 ; i <= 5 ; i ++ ) { stmt . setURL ( 1 , new java . net . URL ( ( "http://example/" + i ) ) ) ; stmt . addBatch ( ) ; } int [ ] batchResults = stmt . executeBatch ( ) ; "<AssertPlaceHolder>" ; java . sql . ResultSet rset = stmt . getResultSet ( ) ; checkSelectMetadata ( rset , 2 ) ; while ( stmt . getMoreResults ( ) ) { rset = stmt . getResultSet ( ) ; checkSelectMetadata ( rset , 2 ) ; } stmt . close ( ) ; conn . close ( ) ; } addBatch ( ) { this . addBatch ( this . sparqlStr . toString ( ) ) ; }
|
org . junit . Assert . assertEquals ( 5 , batchResults . length )
|
AccessInstanceVariableIndirect_VarVarToString ( ) { java . lang . String fromClass = "Domain.Indirect.ViolatingFrom.AccessInstanceVariableIndirect_VarVarToString" ; java . lang . String toClass = "Domain.Indirect.IndirectTo.ServiceOne" ; java . util . ArrayList < java . lang . String > typesToFind = new java . util . ArrayList < java . lang . String > ( ) ; typesToFind . add ( "Access" ) ; "<AssertPlaceHolder>" ; } areDependencyTypesDetected ( java . lang . String , java . lang . String , java . util . ArrayList , boolean ) { return areDependencyTypesDetected ( classFrom , classTo , dependencyTypes , "" , isIndirect ) ; }
|
org . junit . Assert . assertTrue ( areDependencyTypesDetected ( fromClass , toClass , typesToFind , true ) )
|
getFileNameShouldGetFileNameFromParam ( ) { java . util . Map < java . lang . String , java . lang . Object > metaDatas = java . util . Collections . singletonMap ( "multipart.filename" , ( ( java . lang . Object ) ( "expected" ) ) ) ; org . codegist . crest . param . Param param = mock ( org . codegist . crest . param . Param . class ) ; org . codegist . crest . config . ParamConfig paramConfig = mock ( org . codegist . crest . config . ParamConfig . class ) ; when ( paramConfig . getMetaDatas ( ) ) . thenReturn ( metaDatas ) ; when ( param . getParamConfig ( ) ) . thenReturn ( paramConfig ) ; "<AssertPlaceHolder>" ; } getFileName ( org . codegist . crest . config . ParamConfig ) { return ( ( java . lang . String ) ( paramConfig . getMetaDatas ( ) . get ( org . codegist . crest . util . MultiParts . FILENAME ) ) ) ; }
|
org . junit . Assert . assertEquals ( "expected" , org . codegist . crest . util . MultiParts . getFileName ( param ) )
|
shutDownParameterShouldBeReturned ( ) { when ( view . shutdown . getSelectedIndex ( ) ) . thenReturn ( 1 ) ; when ( view . shutdown . getValue ( 1 ) ) . thenReturn ( org . eclipse . che . ide . ext . runner . client . tabs . properties . panel . BY_TIMEOUT_4 . toString ( ) ) ; "<AssertPlaceHolder>" ; } getShutdown ( ) { java . lang . String value = shutdown . getValue ( shutdown . getSelectedIndex ( ) ) ; return org . eclipse . che . ide . ext . runner . client . tabs . properties . panel . common . Shutdown . detect ( value ) ; }
|
org . junit . Assert . assertThat ( view . getShutdown ( ) , org . hamcrest . CoreMatchers . is ( org . eclipse . che . ide . ext . runner . client . tabs . properties . panel . BY_TIMEOUT_4 ) )
|
testSetMatchNoRewriteLevel2Root ( ) { java . lang . String grammar = "grammar<sp>T;\n" + ( ( ( ( "options<sp>{output=AST;}\n" + "a" 4 ) + "ID<sp>:<sp>\'a\'..\'z\'+<sp>;\n" ) + "INT<sp>:<sp>\'0\'..\'9\'+;\n" ) + "a" 0 ) ; java . lang . String treeGrammar = "tree<sp>grammar<sp>TP;\n" + ( "options<sp>{output=AST;<sp>ASTLabelType=CommonTree;<sp>tokenVocab=T;}\n" + "a<sp>:<sp>^((ID<sp>|<sp>INT)<sp>INT)<sp>;\n" ) ; java . lang . String found = execTreeParser ( "a" 6 , grammar , "TParser" , "a" 5 , treeGrammar , "TP" , "a" 1 , "a" , "a" , "a" 2 ) ; "<AssertPlaceHolder>" ; } execTreeParser ( java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String ) { return execTreeParser ( parserGrammarFileName , parserGrammarStr , parserName , treeParserGrammarFileName , treeParserGrammarStr , treeParserName , lexerName , parserStartRuleName , treeParserStartRuleName , input , false ) ; }
|
org . junit . Assert . assertEquals ( "a" 3 , found )
|
testHashEquals ( ) { handleBreak ( new com . eclipsesource . v8 . debug . BreakHandler ( ) { @ com . eclipsesource . v8 . debug . Override public void onBreak ( final com . eclipsesource . v8 . debug . DebugHandler . DebugEvent event , final com . eclipsesource . v8 . debug . ExecutionState state , final com . eclipsesource . v8 . debug . EventData eventData , final com . eclipsesource . v8 . V8Object data ) { com . eclipsesource . v8 . debug . mirror . Frame frame = state . getFrame ( 0 ) ; com . eclipsesource . v8 . debug . mirror . ValueMirror objectValue1 = frame . getLocalValue ( 2 ) ; com . eclipsesource . v8 . debug . mirror . ValueMirror objectValue2 = frame . getLocalValue ( 2 ) ; result = ( objectValue1 . hashCode ( ) ) == ( objectValue2 . hashCode ( ) ) ; objectValue1 . close ( ) ; objectValue2 . close ( ) ; frame . close ( ) ; } } ) ; v8 . executeScript ( com . eclipsesource . v8 . debug . MirrorTest . script , "script" , 0 ) ; "<AssertPlaceHolder>" ; } executeScript ( java . lang . String , java . lang . String , int ) { checkThread ( ) ; com . eclipsesource . v8 . V8 . checkScript ( script ) ; return executeScript ( getV8RuntimePtr ( ) , com . eclipsesource . v8 . UNKNOWN , script , scriptName , lineNumber ) ; }
|
org . junit . Assert . assertTrue ( ( ( java . lang . Boolean ) ( result ) ) )
|
t00_task_creation ( ) { droidefense . batch . base . IBatchTask task = new droidefense . batch . base . IBatchTask ( ) { @ droidefense . Override public void beforeTask ( ) { } @ droidefense . Override public void onTask ( ) { } @ droidefense . Override public void afterTask ( ) { } @ droidefense . Override public java . lang . String getTaskName ( ) { return null ; } @ droidefense . Override public java . lang . String getTaskIdName ( ) { return null ; } } ; "<AssertPlaceHolder>" ; } getTaskIdName ( ) { return null ; }
|
org . junit . Assert . assertNotNull ( task )
|
isNotHeld ( ) { doReturn ( FilePlanComponentKind . RECORD ) . when ( mockedFilePlanService ) . getFilePlanComponentKind ( record ) ; doReturn ( Collections . EMPTY_LIST ) . when ( mockedHoldService ) . heldBy ( record , true ) ; boolean result = evaluator . evaluate ( record ) ; "<AssertPlaceHolder>" ; verify ( mockedHoldService , times ( 1 ) ) . heldBy ( record , true ) ; } evaluate ( org . json . simple . JSONObject ) { if ( ( action ) == null ) { return false ; } try { org . json . simple . JSONArray actions = getRMActions ( jsonObject ) ; if ( actions == null ) { return false ; } else { if ( actions . contains ( action ) ) { return true ; } } } catch ( java . lang . Exception err ) { throw new org . alfresco . error . AlfrescoRuntimeException ( ( "Exception<sp>whilst<sp>running<sp>UI<sp>evaluator:<sp>" + err ) ) ; } return false ; }
|
org . junit . Assert . assertFalse ( result )
|
testTessVersion ( ) { net . sourceforge . tess4j . TessAPI1Test . logger . info ( "TessVersion" ) ; java . lang . String expResult = "4.1.0" ; java . lang . String result = net . sourceforge . tess4j . TessAPI1 . TessVersion ( ) ; net . sourceforge . tess4j . TessAPI1Test . logger . info ( result ) ; "<AssertPlaceHolder>" ; } TessVersion ( ) { throw new java . lang . UnsupportedOperationException ( "Not<sp>supported<sp>yet." ) ; }
|
org . junit . Assert . assertTrue ( result . startsWith ( expResult ) )
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.