input
stringlengths 28
18.7k
| output
stringlengths 39
1.69k
|
---|---|
after_step_hook_scenario_contains_step_failure_when_step_does_not_pass ( ) { java . lang . Throwable expectedError = new org . junit . AssumptionViolatedException ( "oops" ) ; doThrow ( expectedError ) . when ( definitionMatch ) . runStep ( any ( cucumber . runner . Scenario . class ) ) ; doThrow ( new java . lang . Exception ( ) ) . when ( afterHookDefinition ) . execute ( argThat ( cucumber . runner . PickleStepTestStepTest . scenarioDoesNotHave ( expectedError ) ) ) ; step . run ( testCase , bus , scenario , false ) ; "<AssertPlaceHolder>" ; } getError ( ) { if ( ( result ) == null ) { return null ; } switch ( result . getStatus ( ) ) { case FAILED : case AMBIGUOUS : return result . getError ( ) ; case PENDING : if ( strict ) { return result . getError ( ) ; } else { return new org . testng . SkipException ( result . getErrorMessage ( ) , result . getError ( ) ) ; } case UNDEFINED : if ( strict ) { return new cucumber . runtime . CucumberException ( cucumber . api . testng . TestCaseResultListener . UNDEFINED_MESSAGE ) ; } else { return new org . testng . SkipException ( cucumber . api . testng . TestCaseResultListener . UNDEFINED_MESSAGE ) ; } case SKIPPED : java . lang . Throwable error = result . getError ( ) ; if ( error != null ) { if ( error instanceof org . testng . SkipException ) { return error ; } else { return new org . testng . SkipException ( result . getErrorMessage ( ) , error ) ; } } else { return new org . testng . SkipException ( cucumber . api . testng . TestCaseResultListener . SKIPPED_MESSAGE ) ; } case PASSED : return null ; default : throw new java . lang . IllegalStateException ( ( "Unexpected<sp>result<sp>status:<sp>" + ( result . getStatus ( ) ) ) ) ; } }
|
org . junit . Assert . assertThat ( scenario . getError ( ) , org . hamcrest . core . Is . is ( expectedError ) )
|
testRecordQueriesNegativeQueryType ( ) { try { io . sniffy . Sniffer . run ( BaseTest :: executeStatement ) . verify ( 1 , Query . INSERT ) ; org . junit . Assert . fail ( ) ; } catch ( io . sniffy . WrongNumberOfQueriesError e ) { "<AssertPlaceHolder>" ; } } verify ( int , io . sniffy . Threads ) { return verify ( io . sniffy . sql . SqlQueries . exactQueries ( allowedStatements ) . threads ( threadMatcher ) ) ; }
|
org . junit . Assert . assertNotNull ( e )
|
supportsServicesThatWithVoidReturnType ( ) { com . avanza . astrix . remoting . server . AstrixRemotingDriver remotingDriver = new com . avanza . astrix . remoting . server . AstrixRemotingDriver ( ) ; final java . util . concurrent . BlockingQueue < java . lang . String > receivedRequest = new java . util . concurrent . LinkedBlockingQueue ( ) ; com . avanza . astrix . remoting . server . AstrixRemotingTest . VoidService impl = new com . avanza . astrix . remoting . server . AstrixRemotingTest . VoidService ( ) { @ com . avanza . astrix . remoting . server . Override public void hello ( java . lang . String message ) { receivedRequest . add ( message ) ; } } ; remotingDriver . registerServer ( com . avanza . astrix . remoting . server . AstrixRemotingTest . VoidService . class , impl ) ; com . avanza . astrix . remoting . server . AstrixRemotingTest . VoidService testService = remotingDriver . createRemotingProxy ( com . avanza . astrix . remoting . server . AstrixRemotingTest . VoidService . class ) ; testService . hello ( "kalle" ) ; java . lang . String lastReceivedRequest = receivedRequest . poll ( 1 , TimeUnit . SECONDS ) ; "<AssertPlaceHolder>" ; } hello ( com . avanza . astrix . gs . remoting . GsRoutingStrategyTest$IllegalRoutingMethod ) { }
|
org . junit . Assert . assertEquals ( "kalle" , lastReceivedRequest )
|
checkMessageMethod ( ) { java . lang . String str = "test" ; info . smart_tools . smartactors . ioc . iioccontainer . exception . DeletionException exception = new info . smart_tools . smartactors . ioc . iioccontainer . exception . DeletionException ( str ) ; "<AssertPlaceHolder>" ; throw exception ; } getMessage ( ) { return message ; }
|
org . junit . Assert . assertEquals ( exception . getMessage ( ) , str )
|
testOnSourceDataTagValueUpdateRequestProcess ( ) { cern . c2mon . daq . common . conf . core . ConfigurationController configurationController = getBasicConfigurationController ( ) ; cern . c2mon . daq . common . messaging . impl . RequestController handler = new cern . c2mon . daq . common . messaging . impl . RequestController ( configurationController ) ; cern . c2mon . shared . daq . datatag . SourceDataTagValueRequest valueRequest = new cern . c2mon . shared . daq . datatag . SourceDataTagValueRequest ( PROCESS , 1L ) ; cern . c2mon . shared . daq . datatag . SourceDataTagValueResponse response = handler . onSourceDataTagValueUpdateRequest ( valueRequest ) ; "<AssertPlaceHolder>" ; } getAllDataTagValueObjects ( ) { java . util . Collection < cern . c2mon . shared . common . datatag . SourceDataTagValue > result = new java . util . ArrayList ( ) ; for ( int i = 0 ; i < ( this . dataTagValueUpdates . size ( ) ) ; i ++ ) { result . addAll ( dataTagValueUpdates . get ( i ) . getValues ( ) ) ; } return result ; }
|
org . junit . Assert . assertTrue ( ( ( response . getAllDataTagValueObjects ( ) . size ( ) ) == 3 ) )
|
testIssue1526 ( ) { java . lang . String code = org . apache . commons . io . IOUtils . toString ( this . getClass ( ) . getResourceAsStream ( "TableCollectionExpressionIssue1526.pls" ) , StandardCharsets . UTF_8 ) ; net . sourceforge . pmd . lang . plsql . ast . ASTInput input = parsePLSQL ( code ) ; "<AssertPlaceHolder>" ; } parsePLSQL ( java . lang . String ) { return parsePLSQL ( net . sourceforge . pmd . lang . LanguageRegistry . getLanguage ( PLSQLLanguageModule . NAME ) . getDefaultVersion ( ) , code ) ; }
|
org . junit . Assert . assertNotNull ( input )
|
testGetProcessDefinition ( ) { org . powermock . api . mockito . PowerMockito . mockStatic ( nl . bzk . migratiebrp . isc . jbpm . common . jsf . JbpmJsfUtil . class ) ; org . mockito . Mockito . when ( nl . bzk . migratiebrp . isc . jbpm . common . jsf . JbpmJsfUtil . getTaskInstance ( ) ) . thenReturn ( task ) ; org . mockito . Mockito . when ( task . getProcessInstance ( ) ) . thenReturn ( process ) ; org . mockito . Mockito . when ( process . getProcessDefinition ( ) ) . thenReturn ( processDefinition ) ; "<AssertPlaceHolder>" ; } getProcessDefinition ( ) { final org . jbpm . taskmgmt . exe . TaskInstance task = nl . moderniseringgba . isc . jbpm . jsf . JbpmJsfUtil . getTaskInstance ( ) ; return task . getProcessInstance ( ) . getProcessDefinition ( ) ; }
|
org . junit . Assert . assertEquals ( processDefinition , subject . getProcessDefinition ( ) )
|
testAdjacencyListIteratorRemoveFirst ( ) { edu . ucla . sspace . graph . WeightedDirectedMultigraph < java . lang . String > g = new edu . ucla . sspace . graph . WeightedDirectedMultigraph < java . lang . String > ( ) ; for ( int i = 0 ; i < 10 ; ++ i ) { for ( int j = i + 1 ; j < 10 ; ++ j ) { edu . ucla . sspace . graph . WeightedDirectedTypedEdge < java . lang . String > e = new edu . ucla . sspace . graph . SimpleWeightedDirectedTypedEdge < java . lang . String > ( "type-1" , i , j , 1.0 ) ; g . add ( e ) ; } } edu . ucla . sspace . graph . Set < edu . ucla . sspace . graph . WeightedDirectedTypedEdge < java . lang . String > > test = new edu . ucla . sspace . graph . HashSet < edu . ucla . sspace . graph . WeightedDirectedTypedEdge < java . lang . String > > ( ) ; edu . ucla . sspace . graph . Set < edu . ucla . sspace . graph . WeightedDirectedTypedEdge < java . lang . String > > adjacencyList = g . getAdjacencyList ( 0 ) ; "<AssertPlaceHolder>" ; edu . ucla . sspace . graph . Iterator < edu . ucla . sspace . graph . WeightedDirectedTypedEdge < java . lang . String > > it = adjacencyList . iterator ( ) ; it . remove ( ) ; } size ( ) { return assignments . length ; }
|
org . junit . Assert . assertEquals ( 9 , adjacencyList . size ( ) )
|
testImgFromImg ( ) { final net . imglib2 . img . Img < net . imglib2 . type . numeric . integer . ByteType > img = ops . create ( ) . img ( new net . imglib2 . FinalDimensions ( 1 ) , new net . imglib2 . type . numeric . integer . ByteType ( ) ) ; @ net . imagej . ops . create . SuppressWarnings ( "unchecked" ) final net . imglib2 . img . Img < net . imglib2 . type . numeric . integer . ByteType > newImg = ( ( net . imglib2 . img . Img < net . imglib2 . type . numeric . integer . ByteType > ) ( ops . run ( net . imagej . ops . create . img . CreateImgFromImg . class , img ) ) ) ; "<AssertPlaceHolder>" ; } firstElement ( ) { return cursor ( ) . next ( ) ; }
|
org . junit . Assert . assertEquals ( img . firstElement ( ) . getClass ( ) , newImg . firstElement ( ) . getClass ( ) )
|
UponLeaving_LeavingActionsExecuted ( ) { com . github . oxo42 . stateless4j . StateRepresentation < com . github . oxo42 . stateless4j . State , com . github . oxo42 . stateless4j . Trigger > stateRepresentation = CreateRepresentation ( State . A ) ; com . github . oxo42 . stateless4j . transitions . Transition < com . github . oxo42 . stateless4j . State , com . github . oxo42 . stateless4j . Trigger > transition = new com . github . oxo42 . stateless4j . transitions . Transition ( State . A , State . B , Trigger . X ) ; actualTransition = null ; stateRepresentation . addExitAction ( new com . github . oxo42 . stateless4j . delegates . Action1 < com . github . oxo42 . stateless4j . transitions . Transition < com . github . oxo42 . stateless4j . State , com . github . oxo42 . stateless4j . Trigger > > ( ) { @ com . github . oxo42 . stateless4j . Override public void doIt ( com . github . oxo42 . stateless4j . transitions . Transition < com . github . oxo42 . stateless4j . State , com . github . oxo42 . stateless4j . Trigger > t ) { actualTransition = t ; } } ) ; stateRepresentation . exit ( transition ) ; "<AssertPlaceHolder>" ; } exit ( com . github . oxo42 . stateless4j . transitions . Transition ) { assert transition != null : com . github . oxo42 . stateless4j . StateRepresentation . TRANSITION_IS_NULL ; if ( transition . isReentry ( ) ) { executeExitActions ( transition ) ; } else if ( ! ( includes ( transition . getDestination ( ) ) ) ) { executeExitActions ( transition ) ; if ( ( superstate ) != null ) { superstate . exit ( transition ) ; } } }
|
org . junit . Assert . assertEquals ( transition , actualTransition )
|
testRelations ( ) { uk . gov . dstl . baleen . uima . BaleenCollectionReader bcr = getCollectionReader ( Re3dReader . PARAM_FOLDER , uk . gov . dstl . baleen . collectionreaders . re3d . Re3dReaderTest . tmpDir . toAbsolutePath ( ) . toString ( ) , Re3dReader . PARAM_ENTITIES , true , Re3dReader . PARAM_RELATIONSHIPS , true , Re3dReader . PARAM_RANDOM_DATES , true ) ; "<AssertPlaceHolder>" ; bcr . getNext ( jCas . getCas ( ) ) ; org . apache . uima . cas . text . AnnotationIndex < uk . gov . dstl . baleen . types . semantic . Entity > entityIndex = jCas . getAnnotationIndex ( uk . gov . dstl . baleen . types . semantic . Entity . class ) ; uk . gov . dstl . baleen . types . semantic . Entity source = com . google . common . collect . Streams . stream ( entityIndex ) . filter ( ( e ) -> ( e . getBegin ( ) ) == 12 ) . findAny ( ) . get ( ) ; uk . gov . dstl . baleen . types . semantic . Entity target = com . google . common . collect . Streams . stream ( entityIndex ) . filter ( ( e ) -> ( e . getBegin ( ) ) == 9 ) . findAny ( ) . get ( ) ; org . apache . uima . cas . text . AnnotationIndex < uk . gov . dstl . baleen . types . semantic . Relation > relationIndex = jCas . getAnnotationIndex ( uk . gov . dstl . baleen . types . semantic . Relation . class ) ; contains ( relationIndex , ( r ) -> ( r . getBegin ( ) ) == 11 ) ; contains ( relationIndex , ( r ) -> ( r . getEnd ( ) ) == 12 ) ; contains ( relationIndex , ( r ) -> r . getValue ( ) . equals ( "" ) ) ; contains ( relationIndex , ( r ) -> r . getRelationshipType ( ) . equals ( "HasAttrOf" ) ) ; contains ( relationIndex , ( r ) -> r . getSource ( ) . equals ( source ) ) ; contains ( relationIndex , ( r ) -> r . getTarget ( ) . equals ( target ) ) ; bcr . close ( ) ; } doHasNext ( ) { if ( ! ( idsToProcess . isEmpty ( ) ) ) return true ; idsToProcess . addAll ( getIds ( currId ) ) ; return ! ( idsToProcess . isEmpty ( ) ) ; }
|
org . junit . Assert . assertTrue ( bcr . doHasNext ( ) )
|
testAddItem ( ) { final org . uberfire . ext . widgets . core . client . tree . TreeItem childTreeItem = mock ( org . uberfire . ext . widgets . core . client . tree . TreeItem . class ) ; when ( childTreeItem . getType ( ) ) . thenReturn ( TreeItem . Type . ITEM ) ; final org . uberfire . ext . widgets . core . client . tree . TreeItem treeItem1 = testedRoot . addItem ( childTreeItem ) ; "<AssertPlaceHolder>" ; verify ( childTreeItem , times ( 1 ) ) . setTree ( eq ( tree ) ) ; verify ( childTreeItem , times ( 1 ) ) . setParentItem ( eq ( testedRoot ) ) ; verify ( content , times ( 1 ) ) . add ( eq ( childTreeItem ) ) ; } addItem ( org . jboss . errai . common . client . api . IsElement ) { items . appendChild ( item . getElement ( ) ) ; }
|
org . junit . Assert . assertEquals ( treeItem1 , childTreeItem )
|
testGetSearchResult ( ) { "<AssertPlaceHolder>" ; } getSearchResult ( ) { return this . searchResult ; }
|
org . junit . Assert . assertEquals ( result , event . getSearchResult ( ) )
|
testNamedQueryGetSingleResultCount ( ) { java . lang . String queryName = "DictionaryCategory.getCount" ; org . dayatang . persistence . hibernate . NamedQuery query = new org . dayatang . persistence . hibernate . NamedQuery ( repository , queryName ) . addParameter ( "name" , "gender" ) ; "<AssertPlaceHolder>" ; } getSingleResult ( org . dayatang . persistence . jpa . SqlQuery ) { try { return ( ( T ) ( getQuery ( sqlQuery ) . getSingleResult ( ) ) ) ; } catch ( javax . persistence . NoResultException e ) { return null ; } }
|
org . junit . Assert . assertEquals ( 1L , repository . getSingleResult ( query ) )
|
testReadShortString ( ) { final java . lang . String s = "" ; final int len = s . getBytes ( "UTF-8" ) . length ; final java . nio . ByteBuffer buffer = java . nio . ByteBuffer . allocate ( ( 2 + len ) ) ; buffer . putShort ( ( ( short ) ( len ) ) ) ; buffer . put ( s . getBytes ( "UTF-8" ) ) ; buffer . rewind ( ) ; "<AssertPlaceHolder>" ; } readShortString ( java . nio . ByteBuffer ) { short size = buffer . getShort ( ) ; if ( size < 0 ) { return null ; } byte [ ] bytes = new byte [ size ] ; buffer . get ( bytes ) ; return com . leansoft . luxun . utils . Utils . fromBytes ( bytes ) ; }
|
org . junit . Assert . assertEquals ( s , com . leansoft . luxun . utils . Utils . readShortString ( buffer ) )
|
testReadFrom ( ) { channelBuffer = org . jboss . netty . buffer . ChannelBuffers . copiedBuffer ( tlv ) ; ipInterfaceAddressTlv . readFrom ( channelBuffer ) ; "<AssertPlaceHolder>" ; } interfaceAddress ( ) { return interfaceAddress ; }
|
org . junit . Assert . assertThat ( ipInterfaceAddressTlv . interfaceAddress ( ) . size ( ) , org . hamcrest . CoreMatchers . is ( 1 ) )
|
testPoolNotYetActive ( ) { org . candlepin . model . Pool pool = createPool ( owner , product , 100L , org . candlepin . test . TestUtil . createDate ( 2050 , 3 , 2 ) , org . candlepin . test . TestUtil . createDate ( 2055 , 3 , 2 ) ) ; poolCurator . create ( pool ) ; java . util . List < org . candlepin . model . Pool > results = poolCurator . listAvailableEntitlementPools ( consumer , consumer . getOwnerId ( ) , ( ( java . util . Collection < java . lang . String > ) ( null ) ) , org . candlepin . test . TestUtil . createDate ( 20450 , 3 , 2 ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return virtUuidToConsumerMap . keySet ( ) . size ( ) ; }
|
org . junit . Assert . assertEquals ( 0 , results . size ( ) )
|
testValidateSubscriptionWithExternalPriceMdel_notExtPriceModel ( ) { org . oscm . internal . vo . VOSubscriptionDetails subscription = new org . oscm . internal . vo . VOSubscriptionDetails ( ) ; org . oscm . internal . vo . VOPriceModel voPriceModel = new org . oscm . internal . vo . VOPriceModel ( ) ; voPriceModel . setExternal ( false ) ; subscription . setPriceModel ( voPriceModel ) ; org . oscm . internal . vo . VOSubscriptionDetails result = bean . validateSubscription ( subscription ) ; "<AssertPlaceHolder>" ; } validateSubscription ( org . oscm . internal . vo . VOService ) { org . oscm . domobjects . PlatformUser currentUser = dm . getCurrentUser ( ) ; org . oscm . domobjects . Product product = dm . getReference ( org . oscm . domobjects . Product . class , service . getKey ( ) ) ; org . oscm . domobjects . Subscription subscription = validateSubscription ( service , currentUser , product ) ; org . oscm . internal . vo . VOSubscriptionDetails voSubscriptionDetails = subscriptionService . getSubscriptionDetailsWithoutOwnerCheck ( subscription . getKey ( ) ) ; return voSubscriptionDetails ; }
|
org . junit . Assert . assertTrue ( ( result == null ) )
|
should_get_named_service_with_Provides_bean ( ) { final java . util . List < com . github . greengerong . named . NamedService > namedServices = injector . getInstance ( new com . google . inject . Key < java . util . List < com . github . greengerong . named . NamedService > > ( ) { } ) ; "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertThat ( namedServices . size ( ) , org . hamcrest . core . Is . is ( 2 ) )
|
testPoolWhenOneSingleThreadedCaller ( ) { final int maxPoolSize = 3 ; final int poolTimeout = 1000 ; final io . confluent . kafkarest . unit . SimpleConsumerPool pool = new io . confluent . kafkarest . unit . SimpleConsumerPool ( maxPoolSize , poolTimeout , new io . confluent . kafkarest . unit . SystemTime ( ) , simpleConsumerFactory ) ; for ( int i = 0 ; i < 10 ; i ++ ) { io . confluent . kafkarest . unit . SimpleFetcher fetcher = pool . get ( "" , 0 ) ; fetcher . close ( ) ; } "<AssertPlaceHolder>" ; } size ( ) { return simpleConsumers . size ( ) ; }
|
org . junit . Assert . assertTrue ( ( ( pool . size ( ) ) == 1 ) )
|
testDeleteProcessInstanceInfoLogByDate ( ) { int p = 0 ; java . util . Date endDate = pilTestData [ ( p ++ ) ] . getEnd ( ) ; org . kie . internal . runtime . manager . audit . query . ProcessInstanceLogDeleteBuilder updateBuilder = this . processInstanceLogDelete ( ) . endDate ( endDate ) ; int result = updateBuilder . build ( ) . execute ( ) ; "<AssertPlaceHolder>" ; } build ( ) { return new org . kie . internal . query . ParametrizedQuery < org . kie . api . task . model . TaskSummary > ( ) { private org . jbpm . query . jpa . data . QueryWhere queryWhere = new org . jbpm . query . jpa . data . QueryWhere ( getQueryWhere ( ) ) ; @ org . jbpm . services . task . impl . Override public java . util . List < org . kie . api . task . model . TaskSummary > getResultList ( ) { org . jbpm . services . task . commands . TaskSummaryQueryCommand cmd = new org . jbpm . services . task . commands . TaskSummaryQueryCommand ( queryWhere ) ; cmd . setUserId ( userId ) ; return executor . execute ( cmd ) ; } } ; }
|
org . junit . Assert . assertEquals ( 1 , result )
|
testLandscapeRightRotation ( ) { org . openqa . selenium . DeviceRotation landscapeRightRotation = new org . openqa . selenium . DeviceRotation ( 0 , 0 , 90 ) ; driver . rotate ( landscapeRightRotation ) ; "<AssertPlaceHolder>" ; } rotation ( ) { org . openqa . selenium . remote . Response response = execute ( DriverCommand . GET_SCREEN_ROTATION ) ; org . openqa . selenium . DeviceRotation deviceRotation = new org . openqa . selenium . DeviceRotation ( ( ( java . util . Map < java . lang . String , java . lang . Number > ) ( response . getValue ( ) ) ) ) ; if ( ( ( ( deviceRotation . getX ( ) ) < 0 ) || ( ( deviceRotation . getY ( ) ) < 0 ) ) || ( ( deviceRotation . getZ ( ) ) < 0 ) ) { throw new org . openqa . selenium . WebDriverException ( ( "Unexpected<sp>orientation<sp>returned:<sp>" + deviceRotation ) ) ; } return deviceRotation ; }
|
org . junit . Assert . assertEquals ( driver . rotation ( ) , landscapeRightRotation )
|
testBooleanConstructor ( ) { java . lang . Boolean expectedValue = false ; de . metanome . algorithm_integration . configuration . ConfigurationSettingBoolean setting = new de . metanome . algorithm_integration . configuration . ConfigurationSettingBoolean ( expectedValue ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return value ; }
|
org . junit . Assert . assertEquals ( expectedValue , setting . getValue ( ) )
|
testConnStringNoReadPreference ( ) { final io . vertx . ext . mongo . impl . config . ConnectionString connString = new io . vertx . ext . mongo . impl . config . ConnectionString ( "mongodb://localhost:27017/mydb?replicaSet=myapp" ) ; io . vertx . ext . mongo . impl . config . ReadPreference rp = new io . vertx . ext . mongo . impl . config . ReadPreferenceParser ( connString , new io . vertx . core . json . JsonObject ( ) ) . readPreference ( ) ; "<AssertPlaceHolder>" ; } readPreference ( ) { return readPreference ; }
|
org . junit . Assert . assertNull ( rp )
|
decodeStringTest ( ) { com . ociweb . pronghorn . pipe . Pipe < com . ociweb . pronghorn . pipe . RawDataSchema > pipe = new com . ociweb . pronghorn . pipe . Pipe < com . ociweb . pronghorn . pipe . RawDataSchema > ( new com . ociweb . pronghorn . pipe . PipeConfig < com . ociweb . pronghorn . pipe . RawDataSchema > ( com . ociweb . pronghorn . pipe . RawDataSchema . instance , 100 , 4000 ) ) ; pipe . initBuffers ( ) ; com . ociweb . pronghorn . pipe . DataOutputBlobWriter < com . ociweb . pronghorn . pipe . RawDataSchema > writer = new com . ociweb . pronghorn . pipe . DataOutputBlobWriter < com . ociweb . pronghorn . pipe . RawDataSchema > ( pipe ) ; com . ociweb . pronghorn . pipe . DataOutputBlobWriter . writePackedInt ( writer , ( - 63 ) ) ; writer . writeUTF ( "This<sp>is<sp>a<sp>test" ) ; writer . close ( ) ; com . ociweb . pronghorn . pipe . DataInputBlobReader < com . ociweb . pronghorn . pipe . RawDataSchema > reader = new com . ociweb . pronghorn . pipe . DataInputBlobReader < com . ociweb . pronghorn . pipe . RawDataSchema > ( pipe ) ; java . lang . String stest = com . ociweb . pronghorn . stage . phast . PhastDecoder . decodeString ( reader , false ) ; reader . close ( ) ; "<AssertPlaceHolder>" ; } close ( ) { long lastCheckedValue = com . ociweb . pronghorn . pipe . Pipe . tailPosition ( pipe ) ; while ( ( null == ( com . ociweb . pronghorn . pipe . Pipe . slab ( pipe ) ) ) || ( lastCheckedValue < ( ( com . ociweb . pronghorn . pipe . Pipe . headPosition ( pipe ) ) - ( ( 1 + ( pipe . slabMask ) ) - ( com . ociweb . pronghorn . pipe . Pipe . EOF_SIZE ) ) ) ) ) { com . ociweb . pronghorn . pipe . Pipe . spinWork ( pipe ) ; lastCheckedValue = com . ociweb . pronghorn . pipe . Pipe . tailPosition ( pipe ) ; } com . ociweb . pronghorn . pipe . Pipe . publishEOF ( pipe ) ; }
|
org . junit . Assert . assertTrue ( ( ( stest . compareTo ( "This<sp>is<sp>a<sp>test" ) ) == 0 ) )
|
testHashCode ( ) { final org . opendaylight . mdsal . binding . model . util . generated . type . builder . AnnotationTypeBuilderImpl annotBuilderImpl = new org . opendaylight . mdsal . binding . model . util . generated . type . builder . AnnotationTypeBuilderImpl ( org . opendaylight . mdsal . binding . model . api . JavaTypeName . create ( "org.opedaylight.yangtools.test" , "AnnotationTest" ) ) ; final org . opendaylight . mdsal . binding . model . util . generated . type . builder . AnnotationTypeBuilderImpl annotBuilderImpl2 = new org . opendaylight . mdsal . binding . model . util . generated . type . builder . AnnotationTypeBuilderImpl ( org . opendaylight . mdsal . binding . model . api . JavaTypeName . create ( "org.opedaylight.yangtools.test" , "AnnotationTest2" ) ) ; "<AssertPlaceHolder>" ; } hashCode ( ) { final int prime = 31 ; int result = 1 ; result = ( prime * result ) + ( hasOwner ? 1231 : 1237 ) ; result = ( prime * result ) + ( isOwner ? 1231 : 1237 ) ; result = ( prime * result ) + ( wasOwner ? 1231 : 1237 ) ; return result ; }
|
org . junit . Assert . assertFalse ( ( ( annotBuilderImpl . hashCode ( ) ) == ( annotBuilderImpl2 . hashCode ( ) ) ) )
|
testFindAll ( ) { org . kuali . rice . core . api . criteria . QueryResults allResults = mock ( org . kuali . rice . core . api . criteria . QueryResults . class ) ; org . kuali . rice . core . api . criteria . QueryByCriteria query = QueryByCriteria . Builder . create ( ) . build ( ) ; when ( mockProvider . findAll ( any ( java . lang . Class . class ) ) ) . thenReturn ( allResults ) ; "<AssertPlaceHolder>" ; verify ( mockProvider ) . findAll ( any ( java . lang . Class . class ) ) ; } findAll ( java . lang . Class ) { return businessObjectDao . findAll ( clazz ) ; }
|
org . junit . Assert . assertSame ( allResults , service . findAll ( java . lang . Object . class ) )
|
testGetSubResourceDefinitions ( ) { final org . apache . ambari . server . api . resources . ComponentStackVersionResourceDefinition resourceDefinition = new org . apache . ambari . server . api . resources . ComponentStackVersionResourceDefinition ( null ) ; final java . util . Set < org . apache . ambari . server . api . resources . SubResourceDefinition > subResourceDefinitions = resourceDefinition . getSubResourceDefinitions ( ) ; "<AssertPlaceHolder>" ; } size ( ) { java . util . Set < java . lang . String > nodes = new java . util . HashSet < java . lang . String > ( ) ; for ( org . apache . ambari . eventdb . model . WorkflowDag . WorkflowDagEntry entry : entries ) { nodes . add ( entry . getSource ( ) ) ; nodes . addAll ( entry . getTargets ( ) ) ; } return nodes . size ( ) ; }
|
org . junit . Assert . assertEquals ( 1 , subResourceDefinitions . size ( ) )
|
testCorrectePeriode ( ) { java . util . List < nl . bzk . brp . model . basis . BerichtEntiteit > objectenDieDeRegelOvertreden = brby0904 . voerRegelUit ( null , maakPersoonOverlijden ( maakLand ( "24" , "land" , 19000101 , null ) , 19000101 ) , maakActie ( "id.actie1" , 19000101 , null ) , null ) ; "<AssertPlaceHolder>" ; } size ( ) { return elementen . size ( ) ; }
|
org . junit . Assert . assertEquals ( 0 , objectenDieDeRegelOvertreden . size ( ) )
|
testForEachThrowingException ( ) { ch . lambdaj . List < ch . lambdaj . Person > personInFamily = asList ( new ch . lambdaj . Person ( "Domenico" ) , new ch . lambdaj . Person ( "Mario" ) , new ch . lambdaj . PersonThrowingException ( ) ) ; try { forEach ( personInFamily ) . setLastName ( "Fusco" ) ; org . junit . Assert . fail ( "Must<sp>throw<sp>a<sp>RuntimeException" ) ; } catch ( java . lang . RuntimeException e ) { "<AssertPlaceHolder>" ; } } setLastName ( java . lang . String ) { throw new java . lang . RuntimeException ( "Cannot<sp>set<sp>last<sp>name" ) ; }
|
org . junit . Assert . assertEquals ( "Cannot<sp>set<sp>last<sp>name" , e . getMessage ( ) )
|
testFixInstance ( ) { org . jacoco . core . analysis . ICounter c1 = org . jacoco . core . internal . analysis . CounterImpl . getInstance ( 30 , 30 ) ; org . jacoco . core . analysis . ICounter c2 = org . jacoco . core . internal . analysis . CounterImpl . getInstance ( 30 , 30 ) ; "<AssertPlaceHolder>" ; } getInstance ( int , int ) { if ( ( missed <= ( org . jacoco . core . internal . analysis . CounterImpl . SINGLETON_LIMIT ) ) && ( covered <= ( org . jacoco . core . internal . analysis . CounterImpl . SINGLETON_LIMIT ) ) ) { return org . jacoco . core . internal . analysis . CounterImpl . SINGLETONS [ missed ] [ covered ] ; } else { return new org . jacoco . core . internal . analysis . CounterImpl . Var ( missed , covered ) ; } }
|
org . junit . Assert . assertSame ( c1 , c2 )
|
testUpdateCollectionWithMatcherWillNotRemoveItemNotPresentInSourceIfRemoveOrphansIsFalse ( ) { com . codiform . moo . CollectionUpdateTest . ValueDtoList dtoList = new com . codiform . moo . CollectionUpdateTest . ValueDtoList ( new com . codiform . moo . CollectionUpdateTest . ValueDto ( 1 , "Updated<sp>First" ) , new com . codiform . moo . CollectionUpdateTest . ValueDto ( 3 , "New<sp>Third" ) ) ; com . codiform . moo . CollectionUpdateTest . RetainValueSet valueSet = new com . codiform . moo . CollectionUpdateTest . RetainValueSet ( new com . codiform . moo . CollectionUpdateTest . Value ( 2 , "Second" ) , new com . codiform . moo . CollectionUpdateTest . Value ( 1 , "First" ) ) ; com . codiform . moo . curry . Update . from ( dtoList ) . to ( valueSet ) ; "<AssertPlaceHolder>" ; } size ( ) { return size ; }
|
org . junit . Assert . assertEquals ( 3 , valueSet . size ( ) )
|
testGetDependencies ( ) { java . util . Set < org . drugis . addis . entities . Entity > expected = new java . util . HashSet < org . drugis . addis . entities . Entity > ( ) ; expected . add ( d_BRAnalysis . getIndication ( ) ) ; expected . addAll ( d_BRAnalysis . getCriteria ( ) ) ; org . drugis . addis . util . EntityUtil . addRecursiveDependencies ( expected , d_BRAnalysis . getMetaAnalyses ( ) ) ; for ( org . drugis . addis . entities . treatment . Category category : org . drugis . addis . util . EntityUtil . < org . drugis . addis . entities . treatment . Category > flatten ( d_BRAnalysis . getAlternatives ( ) ) ) { expected . addAll ( category . getDependencies ( ) ) ; } "<AssertPlaceHolder>" ; } getDependencies ( ) { return d_activity . getDependencies ( ) ; }
|
org . junit . Assert . assertEquals ( expected , d_BRAnalysis . getDependencies ( ) )
|
andSeparatedByOrWorking ( ) { if ( isBatoo ( ) ) { return ; } final java . lang . String subQueryJPQL = "select<sp>sub.id<sp>from<sp>RegularEntityOne<sp>sub<sp>where<sp>(sub.stringAttribute<sp>=<sp>'Just<sp>a<sp>String<sp>02'<sp>and<sp>sub.longAttributeOne<sp>=<sp>33)<sp>or<sp>(sub.booleanAttributeTwo<sp>=<sp>true<sp>and<sp>sub.longAttributeTwo<sp>=<sp>15)" ; final java . lang . String query = ( ( "select<sp>r<sp>from<sp>RegularEntityTwo<sp>r<sp>" + "<sp>where<sp>r.id<sp>in<sp>(" ) + subQueryJPQL ) + ")" ; final java . util . List < com . uaihebert . model . test . RegularEntityTwo > resultFromJPQL = jpqlHelper . getListFromJPQL ( query , com . uaihebert . model . test . RegularEntityTwo . class ) ; "<AssertPlaceHolder>" ; final com . uaihebert . uaicriteria . UaiCriteria < com . uaihebert . model . test . RegularEntityTwo > uaiCriteria = createCriteria ( com . uaihebert . model . test . RegularEntityTwo . class ) ; final com . uaihebert . uaicriteria . UaiCriteria < com . uaihebert . model . test . RegularEntityOne > subQuery = uaiCriteria . subQuery ( "id" , com . uaihebert . model . test . RegularEntityOne . class ) ; subQuery . addAndSeparatedByOr ( 0 , "stringAttribute" , "Just<sp>a<sp>String<sp>02" ) . addAndSeparatedByOr ( 0 , "longAttributeOne" , 33 ) ; subQuery . addAndSeparatedByOr ( 1 , "booleanAttributeTwo" , true ) . addAndSeparatedByOr ( 1 , "longAttributeTwo" , 15L ) ; uaiCriteria . andAttributeIn ( "id" , subQuery ) ; validateTestLists ( resultFromJPQL , uaiCriteria . getResultList ( ) ) ; } getListFromJPQL ( java . lang . String , java . lang . Class ) { return getListFromJPQL ( query , classToUse , null ) ; }
|
org . junit . Assert . assertTrue ( ( ( resultFromJPQL . size ( ) ) > 0 ) )
|
testModifyTicketExpireEmptyDate ( ) { org . irods . jargon . ticket . packinstr . TicketAdminInp pi = org . irods . jargon . ticket . packinstr . TicketAdminInp . instanceForModifyExpiration ( ticketId , "" ) ; "<AssertPlaceHolder>" ; } instanceForModifyExpiration ( java . lang . String , java . lang . String ) { if ( ( ticketId == null ) || ( ticketId . isEmpty ( ) ) ) { throw new java . lang . IllegalArgumentException ( "null<sp>or<sp>empty<sp>ticket<sp>id" ) ; } if ( ( expirationDate == null ) || ( expirationDate . isEmpty ( ) ) ) { throw new java . lang . IllegalArgumentException ( "null<sp>or<sp>empty<sp>expiration<sp>date" ) ; } if ( ! ( org . irods . jargon . ticket . packinstr . MODIFY_DATE_FORMAT . matcher ( expirationDate ) . matches ( ) ) ) { throw new java . lang . IllegalArgumentException ( "illegal<sp>expiration<sp>date" ) ; } return new org . irods . jargon . ticket . packinstr . TicketAdminInp ( TICKET_ADMIN_INP_API_NBR , "mod" , ticketId , "expire" , expirationDate , BLANK , BLANK ) ; }
|
org . junit . Assert . assertNotNull ( pi )
|
test_getType ( ) { "<AssertPlaceHolder>" ; } getType ( ) { com . psddev . dari . db . ObjectType type = getDatabase ( ) . getEnvironment ( ) . getTypeById ( getTypeId ( ) ) ; if ( type == null ) { for ( java . lang . Object object : linkedObjects . values ( ) ) { if ( ( object instanceof com . psddev . dari . db . ObjectType ) && ( getId ( ) . equals ( getTypeId ( ) ) ) ) { type = ( ( com . psddev . dari . db . ObjectType ) ( object ) ) ; type . setObjectClassName ( com . psddev . dari . db . ObjectType . class . getName ( ) ) ; type . initialize ( ) ; } break ; } } return type ; }
|
org . junit . Assert . assertThat ( ref . getType ( ) , equalTo ( java . lang . String . class ) )
|
getAttribute ( ) { java . lang . String name = "name" ; this . validate ( ( session ) -> session . getAttribute ( name ) ) ; org . wildfly . clustering . web . session . SessionManager < org . wildfly . clustering . web . undertow . session . LocalSessionContext , org . wildfly . clustering . ee . Batch > manager = mock ( org . wildfly . clustering . web . session . SessionManager . class ) ; org . wildfly . clustering . ee . Batcher < org . wildfly . clustering . ee . Batch > batcher = mock ( org . wildfly . clustering . ee . Batcher . class ) ; org . wildfly . clustering . ee . BatchContext context = mock ( org . wildfly . clustering . ee . BatchContext . class ) ; org . wildfly . clustering . web . session . SessionAttributes attributes = mock ( org . wildfly . clustering . web . session . SessionAttributes . class ) ; java . lang . Object expected = new java . lang . Object ( ) ; when ( this . session . getAttributes ( ) ) . thenReturn ( attributes ) ; when ( attributes . getAttribute ( name ) ) . thenReturn ( expected ) ; when ( this . manager . getSessionManager ( ) ) . thenReturn ( manager ) ; when ( manager . getBatcher ( ) ) . thenReturn ( batcher ) ; when ( batcher . resumeBatch ( this . batch ) ) . thenReturn ( context ) ; java . lang . Object result = this . adapter . getAttribute ( name ) ; "<AssertPlaceHolder>" ; verify ( context ) . close ( ) ; } getAttribute ( java . lang . String ) { return this . attributes . get ( name ) ; }
|
org . junit . Assert . assertSame ( expected , result )
|
testStatusAndDescriptionComparisonTrue ( ) { cern . c2mon . shared . common . datatag . DataTagQuality quality = new cern . c2mon . shared . common . datatag . DataTagQualityImpl ( TagQualityStatus . EQUIPMENT_DOWN , null ) ; "<AssertPlaceHolder>" ; } isInvalidStatusSetWithSameDescription ( cern . c2mon . shared . common . datatag . TagQualityStatus , java . lang . String ) { java . lang . String nonNullQualityDescription ; if ( qualityDescription == null ) { nonNullQualityDescription = "" ; } else { nonNullQualityDescription = qualityDescription ; } return ( invalidQualityStates . containsKey ( status ) ) && ( nonNullQualityDescription . equalsIgnoreCase ( invalidQualityStates . get ( status ) ) ) ; }
|
org . junit . Assert . assertTrue ( quality . isInvalidStatusSetWithSameDescription ( TagQualityStatus . EQUIPMENT_DOWN , "" ) )
|
testBuildWithParameters ( ) { java . lang . String name = "name" ; org . lnu . is . domain . wave . type . WaveType context = new org . lnu . is . domain . wave . type . WaveType ( ) ; context . setName ( name ) ; java . lang . String expected = "SELECT<sp>e<sp>FROM<sp>WaveType<sp>e<sp>WHERE<sp>(<sp>e.name<sp>LIKE<sp>CONCAT('%',:name,'%')<sp>)<sp>AND<sp>e.status=:status<sp>AND<sp>e.crtUserGroup<sp>IN<sp>(:userGroups)<sp>" ; org . lnu . is . pagination . MultiplePagedSearch < org . lnu . is . domain . wave . type . WaveType > pagedSearch = new org . lnu . is . pagination . MultiplePagedSearch ( ) ; pagedSearch . setEntity ( context ) ; java . lang . String actualQuery = unit . build ( pagedSearch ) ; "<AssertPlaceHolder>" ; } setEntity ( T ) { this . entity = entity ; }
|
org . junit . Assert . assertEquals ( expected , actualQuery )
|
testEmptyUnmodIterator ( ) { "<AssertPlaceHolder>" ; } emptyUnmodIterator ( ) { return ( ( org . organicdesign . fp . collections . UnmodIterator < T > ) ( org . organicdesign . fp . collections . UnmodIterator . UnIterator . EMPTY ) ) ; }
|
org . junit . Assert . assertFalse ( org . organicdesign . fp . collections . UnmodIterator . emptyUnmodIterator ( ) . hasNext ( ) )
|
build_shouldInitPriceField ( ) { com . kiroule . example . springjpaunitils . domain . Book b = builder . price ( com . kiroule . example . springjpaunitils . domain . builder . BookBuilderTest . PRICE ) . build ( ) ; "<AssertPlaceHolder>" ; } getPrice ( ) { return price ; }
|
org . junit . Assert . assertEquals ( com . kiroule . example . springjpaunitils . domain . builder . BookBuilderTest . PRICE , b . getPrice ( ) )
|
testExclusion ( ) { com . sap . hcp . cf . logback . converter . ContextPropsConverter cpc = new com . sap . hcp . cf . logback . converter . ContextPropsConverter ( ) ; cpc . setOptionList ( asList ( com . sap . hcp . cf . logback . converter . SOME_KEY ) ) ; cpc . start ( ) ; org . slf4j . MDC . clear ( ) ; org . slf4j . MDC . put ( com . sap . hcp . cf . logback . converter . SOME_KEY , com . sap . hcp . cf . logback . converter . SOME_VALUE ) ; org . slf4j . MDC . put ( com . sap . hcp . cf . logback . converter . SOME_OTHER_KEY , com . sap . hcp . cf . logback . converter . SOME_OTHER_VALUE ) ; java . util . Map < java . lang . String , java . lang . Object > actMap = mapFrom ( cpc . convert ( makeEvent ( com . sap . hcp . cf . logback . converter . TEST_MSG_NO_ARGS , com . sap . hcp . cf . logback . converter . NO_ARGS ) ) ) ; "<AssertPlaceHolder>" ; } mdcMap ( java . lang . String [ ] ) { java . util . Map < java . lang . String , java . lang . Object > result = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; java . util . List < java . lang . String > exclusionList ; if ( exclusions == null ) { exclusionList = java . util . Arrays . asList ( new java . lang . String [ 0 ] ) ; } else { exclusionList = java . util . Arrays . asList ( exclusions ) ; } for ( java . util . Map . Entry < java . lang . String , java . lang . String > t : org . slf4j . MDC . getCopyOfContextMap ( ) . entrySet ( ) ) { if ( ! ( exclusionList . contains ( t . getKey ( ) ) ) ) { result . put ( t . getKey ( ) , t . getValue ( ) ) ; } } return result ; }
|
org . junit . Assert . assertThat ( actMap , org . hamcrest . core . Is . is ( mdcMap ( asList ( com . sap . hcp . cf . logback . converter . SOME_KEY ) ) ) )
|
testNormalInitialization ( ) { org . databene . contiperf . WaitTimer timer = org . databene . contiperf . timer . ConstantTimer . class . newInstance ( ) ; timer . init ( new double [ ] { 123 } ) ; for ( int i = 0 ; i < 1000 ; i ++ ) { "<AssertPlaceHolder>" ; } } getWaitTime ( ) { return ( min ) + ( random . nextInt ( range ) ) ; }
|
org . junit . Assert . assertEquals ( 123 , timer . getWaitTime ( ) )
|
postToOpenCloseAndLaterOpenByOthersTest ( ) { listsService . setPublic ( token , openList . getStateToken ( ) , false ) ; listsService . setPublic ( token , openList . getStateToken ( ) , true ) ; doLogout ( ) ; doLoginWithDummyUser ( ) ; final cc . kune . core . shared . dto . StateContentDTO newPost = listsService . newPost ( getHash ( ) , openList . getStateToken ( ) , "lalala" ) ; "<AssertPlaceHolder>" ; } getStateToken ( ) { return getContainer ( ) . getStateToken ( ) . copy ( ) . setDocumentL ( getId ( ) ) ; }
|
org . junit . Assert . assertNotNull ( newPost )
|
testGetProjectFromIndexPatternWhenEmpty ( ) { "<AssertPlaceHolder>" ; } getProjectFromIndexPattern ( java . lang . String ) { if ( org . apache . commons . lang . StringUtils . isEmpty ( index ) ) { return io . fabric8 . elasticsearch . plugin . model . Project . EMPTY ; } java . util . regex . Matcher matcher = reIndexPattern . matcher ( index ) ; if ( matcher . matches ( ) ) { return new io . fabric8 . elasticsearch . plugin . model . Project ( matcher . group ( "name" ) , matcher . group ( "uid" ) ) ; } return new io . fabric8 . elasticsearch . plugin . model . Project ( index , null ) ; }
|
org . junit . Assert . assertEquals ( Project . EMPTY , utils . getProjectFromIndexPattern ( "" ) )
|
allocateChildProducerWithTxSubmmited ( ) { producer . createTransaction ( false ) . commit ( ) ; final org . opendaylight . mdsal . dom . api . DOMDataTreeProducer childProducer = producer . createProducer ( org . opendaylight . mdsal . dom . broker . ShardedDOMDataTreeProducerSingleShardTest . SUBTREES_TEST ) ; "<AssertPlaceHolder>" ; } createProducer ( java . util . Collection ) { checkNotClosed ( ) ; checkIdle ( ) ; final org . opendaylight . mdsal . dom . broker . ProducerLayout local = layout ; for ( final org . opendaylight . mdsal . dom . api . DOMDataTreeIdentifier s : subtrees ) { com . google . common . base . Preconditions . checkArgument ( local . haveSubtree ( s ) , "Subtree<sp>%s<sp>was<sp>never<sp>available<sp>in<sp>producer<sp>%s" , s , this ) ; final org . opendaylight . mdsal . dom . api . DOMDataTreeProducer child = local . lookupChild ( s ) ; com . google . common . base . Preconditions . checkArgument ( ( child == null ) , "Subtree<sp>%s<sp>is<sp>delegated<sp>to<sp>child<sp>producer<sp>%s" , s , child ) ; for ( final org . opendaylight . mdsal . dom . api . DOMDataTreeIdentifier c : local . getChildTrees ( ) ) { com . google . common . base . Preconditions . checkArgument ( ( ! ( s . contains ( c ) ) ) , "Subtree<sp>%s<sp>cannot<sp>be<sp>delegated<sp>as<sp>it<sp>is<sp>a<sp>superset<sp>of<sp>already-delegated<sp>%s" , s , c ) ; } } final org . opendaylight . mdsal . dom . api . DOMDataTreeProducer ret ; synchronized ( this ) { ret = dataTree . createProducer ( this , subtrees ) ; } layout = local . addChild ( ret , subtrees ) ; return ret ; }
|
org . junit . Assert . assertNotNull ( childProducer )
|
test_adjust_LocalDate ( org . threeten . extra . chrono . BritishCutoverDate , java . time . LocalDate , org . threeten . extra . chrono . BritishCutoverDate ) { org . threeten . extra . chrono . BritishCutoverDate test = input . with ( local ) ; "<AssertPlaceHolder>" ; } with ( java . time . temporal . TemporalAdjuster ) { return ( ( org . threeten . extra . YearQuarter ) ( adjuster . adjustInto ( this ) ) ) ; }
|
org . junit . Assert . assertEquals ( expected , test )
|
testMultipleBREEs ( ) { org . eclipse . tycho . core . osgitools . OsgiManifest manifest = parseManifest ( "bree.mf" ) ; org . eclipse . tycho . core . ee . shared . ExecutionEnvironment [ ] expected = new org . eclipse . tycho . core . ee . shared . ExecutionEnvironment [ ] { org . eclipse . tycho . core . ee . ExecutionEnvironmentUtils . getExecutionEnvironment ( "J2SE-1.5" ) , org . eclipse . tycho . core . ee . ExecutionEnvironmentUtils . getExecutionEnvironment ( "JavaSE-1.7" ) } ; "<AssertPlaceHolder>" ; } getExecutionEnvironments ( ) { return executionEnvironments ; }
|
org . junit . Assert . assertArrayEquals ( expected , manifest . getExecutionEnvironments ( ) )
|
shipmentViolationAtAct3_shouldWork ( ) { buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore ( ) ; com . graphhopper . jsprit . core . analysis . SolutionAnalyser analyser = new com . graphhopper . jsprit . core . analysis . SolutionAnalyser ( vrp , solution , vrp . getTransportCosts ( ) ) ; com . graphhopper . jsprit . core . problem . solution . route . VehicleRoute route = solution . getRoutes ( ) . iterator ( ) . next ( ) ; java . lang . Boolean violation = analyser . hasBackhaulConstraintViolationAtActivity ( route . getActivities ( ) . get ( 2 ) , route ) ; "<AssertPlaceHolder>" ; } get ( com . graphhopper . jsprit . core . problem . solution . route . VehicleRoute ) { com . graphhopper . jsprit . core . problem . constraint . List < com . graphhopper . jsprit . core . problem . constraint . Vehicle > vehicles = new com . graphhopper . jsprit . core . problem . constraint . ArrayList < com . graphhopper . jsprit . core . problem . constraint . Vehicle > ( ) ; vehicles . add ( route . getVehicle ( ) ) ; vehicles . addAll ( fleetManager . getAvailableVehicles ( route . getVehicle ( ) ) ) ; return vehicles ; }
|
org . junit . Assert . assertFalse ( violation )
|
tesStringOneArgLocaleUs_MessageFormatMessage ( ) { final java . lang . String testMsg = "Test<sp>message<sp>{0,number,currency}" ; final org . apache . logging . log4j . message . FormattedMessage msg = new org . apache . logging . log4j . message . FormattedMessage ( java . util . Locale . US , testMsg , 12 ) ; final java . lang . String result = msg . getFormattedMessage ( ) ; final java . lang . String expected = "Test<sp>message<sp>$12.00" ; "<AssertPlaceHolder>" ; } getFormattedMessage ( ) { return ( messageText ) != null ? messageText . toString ( ) : ( message ) == null ? null : message . getFormattedMessage ( ) ; }
|
org . junit . Assert . assertEquals ( expected , result )
|
testListDirectories ( ) { java . util . List < java . io . File > testFiles = new java . util . ArrayList ( org . bff . javampd . integrationdata . TestFiles . getRootTestFiles ( testProperties . getPath ( ) ) ) ; for ( java . io . File f : testFiles ) { boolean found = false ; for ( org . bff . javampd . file . MPDFile mpdF : fileDatabase . listRootDirectory ( ) ) { if ( ( f . getName ( ) . equals ( mpdF . getPath ( ) ) ) && ( f . isDirectory ( ) ) ) { found = true ; compareDirs ( f , mpdF ) ; } } "<AssertPlaceHolder>" ; } } compareDirs ( java . io . File , org . bff . javampd . file . MPDFile ) { java . util . List < java . io . File > testFiles = new java . util . ArrayList ( org . bff . javampd . integrationdata . TestFiles . getTestFiles ( testFile ) ) ; java . util . List < org . bff . javampd . file . MPDFile > files = new java . util . ArrayList ( fileDatabase . listDirectory ( file ) ) ; org . junit . Assert . assertEquals ( testFiles . size ( ) , files . size ( ) ) ; for ( java . io . File f : testFiles ) { boolean found = false ; for ( org . bff . javampd . file . MPDFile mpdF : files ) { if ( f . getName ( ) . equals ( mpdF . getPath ( ) . replaceFirst ( ( ( file . getPath ( ) ) + "/" ) , "" ) ) ) { found = true ; org . junit . Assert . assertEquals ( f . isDirectory ( ) , mpdF . isDirectory ( ) ) ; if ( f . isDirectory ( ) ) { compareDirs ( f , mpdF ) ; } } } org . junit . Assert . assertTrue ( found ) ; } }
|
org . junit . Assert . assertTrue ( found )
|
testGetRaDetailByDateDateDateLocale ( ) { org . oscarehr . common . dao . RaHeaderDao raHeaderDao = ( ( org . oscarehr . common . dao . RaHeaderDao ) ( org . oscarehr . util . SpringUtils . getBean ( org . oscarehr . common . dao . RaHeaderDao . class ) ) ) ; java . lang . String paymentDate1 = "20130101" ; java . lang . String paymentDate2 = "20120101" ; java . lang . String paymentDate3 = "20110101" ; java . lang . String paymentDate4 = "20100101" ; java . lang . String paymentDate5 = "20080101" ; org . oscarehr . common . model . RaHeader raHeader1 = new org . oscarehr . common . model . RaHeader ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( raHeader1 ) ; raHeader1 . setPaymentDate ( paymentDate1 ) ; raHeaderDao . persist ( raHeader1 ) ; org . oscarehr . common . model . RaHeader raHeader2 = new org . oscarehr . common . model . RaHeader ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( raHeader2 ) ; raHeader2 . setPaymentDate ( paymentDate2 ) ; raHeaderDao . persist ( raHeader2 ) ; org . oscarehr . common . model . RaHeader raHeader3 = new org . oscarehr . common . model . RaHeader ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( raHeader3 ) ; raHeader3 . setPaymentDate ( paymentDate3 ) ; raHeaderDao . persist ( raHeader3 ) ; org . oscarehr . common . model . RaHeader raHeader4 = new org . oscarehr . common . model . RaHeader ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( raHeader4 ) ; raHeader4 . setPaymentDate ( paymentDate4 ) ; raHeaderDao . persist ( raHeader4 ) ; org . oscarehr . common . model . RaHeader raHeader5 = new org . oscarehr . common . model . RaHeader ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( raHeader5 ) ; raHeader5 . setPaymentDate ( paymentDate5 ) ; raHeaderDao . persist ( raHeader5 ) ; int billingNo1 = 101 ; int billingNo2 = 202 ; java . util . Date startDate = new java . util . Date ( dfm . parse ( "20090101" ) . getTime ( ) ) ; java . util . Date endDate = new java . util . Date ( dfm . parse ( "20121215" ) . getTime ( ) ) ; java . util . Locale locale = java . util . Locale . getDefault ( ) ; org . oscarehr . common . model . RaDetail raDetail1 = new org . oscarehr . common . model . RaDetail ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( raDetail1 ) ; raDetail1 . setRaHeaderNo ( raHeader1 . getId ( ) ) ; raDetail1 . setBillingNo ( billingNo1 ) ; dao . persist ( raDetail1 ) ; org . oscarehr . common . model . RaDetail raDetail2 = new org . oscarehr . common . model . RaDetail ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( raDetail2 ) ; raDetail2 . setRaHeaderNo ( raHeader2 . getId ( ) ) ; raDetail2 . setBillingNo ( billingNo2 ) ; dao . persist ( raDetail2 ) ; org . oscarehr . common . model . RaDetail raDetail3 = new org . oscarehr . common . model . RaDetail ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( raDetail3 ) ; raDetail3 . setRaHeaderNo ( raHeader3 . getId ( ) ) ; raDetail3 . setBillingNo ( billingNo1 ) ; dao . persist ( raDetail3 ) ; org . oscarehr . common . model . RaDetail raDetail4 = new org . oscarehr . common . model . RaDetail ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( raDetail4 ) ; raDetail4 . setRaHeaderNo ( raHeader4 . getId ( ) ) ; raDetail4 . setBillingNo ( billingNo1 ) ; dao . persist ( raDetail4 ) ; org . oscarehr . common . model . RaDetail raDetail5 = new org . oscarehr . common . model . RaDetail ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( raDetail5 ) ; raDetail5 . setRaHeaderNo ( raHeader5 . getId ( ) ) ; raDetail5 . setBillingNo ( billingNo1 ) ; dao . persist ( raDetail5 ) ; java . util . List < org . oscarehr . common . model . RaDetail > expectedResult = new java . util . ArrayList < org . oscarehr . common . model . RaDetail > ( java . util . Arrays . asList ( raDetail2 , raDetail3 , raDetail4 ) ) ; java . util . List < org . oscarehr . common . model . RaDetail > result = dao . getRaDetailByDate ( startDate , endDate , locale ) ; org . apache . log4j . Logger logger = org . oscarehr . util . MiscUtils . getLogger ( ) ; if ( ( result . size ( ) ) != ( expectedResult . size ( ) ) ) { logger . warn ( "Array<sp>sizes<sp>do<sp>not<sp>match." ) ; org . junit . Assert . fail ( "Array<sp>sizes<sp>do<sp>not<sp>match." ) ; } for ( int i = 0 ; i < ( expectedResult . size ( ) ) ; i ++ ) { if ( ! ( expectedResult . get ( i ) . equals ( result . get ( i ) ) ) ) { logger . warn ( "Items<sp>do<sp>not<sp>match." ) ; org . junit . Assert . fail ( "Items<sp>do<sp>not<sp>match." ) ; } } "<AssertPlaceHolder>" ; } get ( java . lang . String ) { try {
|
org . junit . Assert . assertTrue ( true )
|
profile ( ) { conf . setMapperClass ( WordCount . TokenizerMapper . class ) ; conf . setCombinerClass ( WordCount . SumCombiner . class ) ; conf . setMapOutputKeySchema ( com . aliyun . odps . mapred . utils . SchemaUtils . fromString ( "word:string" ) ) ; conf . setMapOutputValueSchema ( com . aliyun . odps . mapred . utils . SchemaUtils . fromString ( "count:bigint" ) ) ; com . aliyun . odps . mapred . bridge . LotMapperUDTFTest . MockMapperUDTF udtf = new com . aliyun . odps . mapred . bridge . LotMapperUDTFTest . MockMapperUDTF ( conf , testData ) ; udtf . setup ( ctx ) ; java . lang . Object [ ] [ ] testData = new java . lang . Object [ 100000 ] [ 1 ] ; for ( int i = 0 ; i < 100000 ; i ++ ) { testData [ i ] = new java . lang . Object [ ] { org . apache . commons . lang . RandomStringUtils . randomAlphabetic ( 5 ) } ; } udtf . setTestData ( testData ) ; udtf . run ( ) ; udtf . close ( ) ; int sum = 0 ; for ( java . lang . Object [ ] item : udtf . getForwarded ( ) ) { sum += ( ( com . aliyun . odps . io . LongWritable ) ( item [ 1 ] ) ) . get ( ) ; } "<AssertPlaceHolder>" ; } get ( ) { return com . aliyun . odps . mapred . conf . SessionState . tss . get ( ) ; }
|
org . junit . Assert . assertEquals ( 100000 , sum )
|
shouldConvertLongWrapped ( ) { final com . tinkerpop . blueprints . Vertex v = graph . addVertex ( new java . lang . Long ( 1 ) ) ; "<AssertPlaceHolder>" ; } convertIdentifier ( java . lang . Object ) { if ( id instanceof java . lang . Long ) return ( ( java . lang . Long ) ( id ) ) ; long identifier = - 1L ; if ( id != null ) { try { identifier = java . lang . Long . parseLong ( id . toString ( ) ) ; } catch ( final java . lang . NumberFormatException e ) { identifier = - 1L ; } } return identifier ; }
|
org . junit . Assert . assertEquals ( 1L , handler . convertIdentifier ( v ) )
|
testAppendBase16 ( ) { @ org . jetbrains . annotations . NotNull net . openhft . chronicle . bytes . Bytes b = alloc1 . elasticBytes ( 16 ) ; for ( long value : new long [ ] { Long . MIN_VALUE , Integer . MIN_VALUE , - 1 , 0 , 1 , Integer . MAX_VALUE , Long . MAX_VALUE } ) { java . lang . String s = java . lang . Long . toHexString ( value ) . toLowerCase ( ) ; b . clear ( ) . appendBase16 ( value ) ; "<AssertPlaceHolder>" ; } b . release ( ) ; } toString ( ) { return ( ( ( ( "MyNested{" + "byteable=" ) + ( byteable ) ) + ",<sp>scalars=" ) + ( scalars ) ) + '}' ; }
|
org . junit . Assert . assertEquals ( s , b . toString ( ) )
|
testCreate ( ) { org . yes . cart . domain . dto . AssociationDTO dto = getDto ( ) ; dto = dtoAssociationService . create ( dto ) ; "<AssertPlaceHolder>" ; dtoAssociationService . remove ( dto . getAssociationId ( ) ) ; } getAssociationId ( ) { return associationId ; }
|
org . junit . Assert . assertTrue ( ( ( dto . getAssociationId ( ) ) > 0 ) )
|
testRegisterFileWriter ( ) { java . lang . String id = "1" ; org . pentaho . di . core . logging . LoggingRegistry loggingRegistry = org . pentaho . di . core . logging . LoggingRegistry . getInstance ( ) ; org . pentaho . di . core . logging . LogChannelFileWriterBuffer buffer = new org . pentaho . di . core . logging . LogChannelFileWriterBuffer ( id ) ; loggingRegistry . registerLogChannelFileWriterBuffer ( buffer ) ; "<AssertPlaceHolder>" ; } getLogChannelFileWriterBuffer ( java . lang . String ) { for ( java . lang . String bufferId : this . fileWriterBuffers . keySet ( ) ) { if ( getLogChannelChildren ( bufferId ) . contains ( id ) ) { return this . fileWriterBuffers . get ( bufferId ) ; } } return null ; }
|
org . junit . Assert . assertNotNull ( loggingRegistry . getLogChannelFileWriterBuffer ( id ) )
|
testGetOwnedOperation2 ( ) { if ( ! ( org . dresdenocl . metamodels . test . MetaModelTestServices . supportsNoOperations ) ) { java . util . List < org . dresdenocl . pivotmodel . Operation > operations ; boolean foundOperation1 ; boolean foundOperation2 ; java . lang . String msg ; msg = "The<sp>adaptation<sp>of<sp>Type.getOwnedOperation()<sp>seems<sp>to<sp>be<sp>wrong." ; operations = org . dresdenocl . metamodels . test . tests . TestType . class2 . getOwnedOperation ( ) ; "<AssertPlaceHolder>" ; } getOwnedOperation ( ) { return getOwnedOperationGen ( ) ; }
|
org . junit . Assert . assertTrue ( msg , foundOperation2 )
|
getPathReturnsPath ( ) { final java . lang . String iotHubHostname = "sample.iothubhostname" ; final java . lang . String deviceId = "sample-deviceid" ; final java . lang . String iotHubMethodPath = "/sample-path" ; com . microsoft . azure . sdk . iot . device . net . IotHubUri uri = new com . microsoft . azure . sdk . iot . device . net . IotHubUri ( iotHubHostname , deviceId , iotHubMethodPath , null ) ; java . lang . String testPath = uri . getPath ( ) ; final java . lang . String expectedPath = "/devices/sample-deviceid/sample-path" ; "<AssertPlaceHolder>" ; } getPath ( ) { return this . path ; }
|
org . junit . Assert . assertThat ( testPath , org . hamcrest . CoreMatchers . is ( expectedPath ) )
|
testCursorsOnRHSLiteralExpressionOnLHS ( ) { java . lang . String tenantId = getOrganizationId ( ) ; java . lang . String aTable = initATableValues ( null , tenantId , getDefaultSplits ( tenantId ) , null , null , getUrl ( ) , null ) ; java . lang . String query = ( ( ( "SELECT<sp>a_integer,<sp>x_integer<sp>FROM<sp>" + aTable ) + "<sp>WHERE<sp>'" ) + tenantId ) + "'=organization_id<sp>AND<sp>7<sp><=<sp>(a_integer,<sp>x_integer)" ; java . util . Properties props = org . apache . phoenix . util . PropertiesUtil . deepCopy ( org . apache . phoenix . end2end . TEST_PROPERTIES ) ; java . lang . String cursorName = generateUniqueName ( ) ; try ( java . sql . Connection conn = java . sql . DriverManager . getConnection ( getUrl ( ) , props ) ) { java . lang . String cursor = ( ( "DECLARE<sp>" + cursorName ) + "<sp>CURSOR<sp>FOR<sp>" ) + query ; try { conn . prepareStatement ( cursor ) . execute ( ) ; cursor = "OPEN<sp>" + cursorName ; conn . prepareStatement ( cursor ) . execute ( ) ; cursor = "FETCH<sp>NEXT<sp>FROM<sp>" + cursorName ; java . sql . ResultSet rs = conn . prepareStatement ( cursor ) . executeQuery ( ) ; int count = 0 ; while ( rs . next ( ) ) { count ++ ; rs = conn . prepareStatement ( cursor ) . executeQuery ( ) ; } "<AssertPlaceHolder>" ; } finally { cursor = "CLOSE<sp>" + cursorName ; conn . prepareStatement ( cursor ) . execute ( ) ; } } } executeQuery ( ) { java . sql . ResultSet rs = new org . apache . phoenix . jdbc . LoggingPhoenixResultSet ( super . executeQuery ( ) , phoenixMetricsLog , sql ) ; this . loggingAutoCommitHelper ( ) ; return rs ; }
|
org . junit . Assert . assertTrue ( ( count == 3 ) )
|
testShouldResendEmailYes ( ) { org . joda . time . DateTime now = new org . joda . time . DateTime ( "2018-06-08T14:00:00.000-07:00" ) ; doReturn ( now ) . when ( dateTimeUtils ) . now ( ) ; org . joda . time . DateTime previousEmailDateTime = new org . joda . time . DateTime ( "2018-06-08T12:00:00.000-07:00" ) ; boolean shouldResendEmail = slaCheckerEmailService . shouldResendEmail ( previousEmailDateTime ) ; "<AssertPlaceHolder>" ; } shouldResendEmail ( org . joda . time . DateTime ) { org . joda . time . DateTime now = dateTimeUtils . now ( ) ; return previousEmailDateTime . isBefore ( now . minus ( slaCheckerEmailConfig . getPeriodBetweenEmail ( ) ) ) ; }
|
org . junit . Assert . assertTrue ( shouldResendEmail )
|
emptyCollection ( ) { final eu . europa . esig . dss . util . TimeDependentValues < eu . europa . esig . dss . util . BaseTimeDependent > coll = new eu . europa . esig . dss . util . TimeDependentValues < eu . europa . esig . dss . util . BaseTimeDependent > ( ) ; "<AssertPlaceHolder>" ; } iterator ( ) { return immutableList . iterator ( ) ; }
|
org . junit . Assert . assertFalse ( coll . iterator ( ) . hasNext ( ) )
|
testGetStorageAttributeIntegerValueByNameWithDefault_4 ( ) { java . lang . String attributeName = "test" ; java . lang . String attributeValue = "1234" ; org . finra . herd . model . jpa . StorageEntity storageEntity = storageDaoTestHelper . createStorageEntityWithAttributes ( attributeName , attributeValue ) ; java . lang . Integer defaultValue = null ; java . lang . Integer value = storageHelper . getStorageAttributeIntegerValueByName ( attributeName , storageEntity , defaultValue ) ; "<AssertPlaceHolder>" ; } getStorageAttributeIntegerValueByName ( java . lang . String , org . finra . herd . model . jpa . StorageEntity , java . lang . Integer ) { java . lang . Integer value = getStorageAttributeIntegerValueByName ( attributeName , storageEntity , false , false ) ; if ( value == null ) { value = defaultValue ; } return value ; }
|
org . junit . Assert . assertEquals ( new java . lang . Integer ( attributeValue ) , value )
|
testParseNoLoginBefore ( ) { final com . atlassian . jira . rest . client . internal . json . LoginInfoJsonParser parser = new com . atlassian . jira . rest . client . internal . json . LoginInfoJsonParser ( ) ; final com . atlassian . jira . rest . client . api . domain . LoginInfo loginInfo = parser . parse ( com . atlassian . jira . rest . client . internal . json . ResourceUtil . getJsonObjectFromResource ( "/json/loginInfo/valid-no-login-so-far.json" ) ) ; "<AssertPlaceHolder>" ; } getJsonObjectFromResource ( java . lang . String ) { final java . lang . String s = com . atlassian . jira . rest . client . internal . json . ResourceUtil . getStringFromResource ( resourcePath ) ; try { return new org . codehaus . jettison . json . JSONObject ( s ) ; } catch ( org . codehaus . jettison . json . JSONException e ) { throw new java . lang . RuntimeException ( e ) ; } }
|
org . junit . Assert . assertEquals ( new com . atlassian . jira . rest . client . api . domain . LoginInfo ( 0 , 1 , null , null ) , loginInfo )
|
testSetEffectiveClientFaultPolicy ( ) { engine = new org . apache . cxf . ws . policy . PolicyEngineImpl ( ) ; org . apache . cxf . service . model . EndpointInfo ei = createMockEndpointInfo ( ) ; org . apache . cxf . service . model . BindingFaultInfo bfi = new org . apache . cxf . service . model . BindingFaultInfo ( null , null ) ; org . apache . cxf . ws . policy . EffectivePolicy epi = control . createMock ( org . apache . cxf . ws . policy . EffectivePolicy . class ) ; engine . setEffectiveClientFaultPolicy ( ei , bfi , epi ) ; "<AssertPlaceHolder>" ; } getEffectiveClientFaultPolicy ( org . apache . cxf . service . model . EndpointInfo , org . apache . cxf . service . model . BindingOperationInfo , org . apache . cxf . service . model . BindingFaultInfo , org . apache . cxf . message . Message ) { org . apache . cxf . ws . policy . EffectivePolicy effectivePolicy = null ; if ( bfi != null ) { effectivePolicy = ( ( org . apache . cxf . ws . policy . EffectivePolicy ) ( bfi . getProperty ( org . apache . cxf . ws . policy . PolicyEngineImpl . POLICY_INFO_FAULT_CLIENT ) ) ) ; } if ( effectivePolicy == null ) { synchronized ( ei ) { if ( bfi != null ) { effectivePolicy = ( ( org . apache . cxf . ws . policy . EffectivePolicy ) ( bfi . getProperty ( org . apache . cxf . ws . policy . PolicyEngineImpl . POLICY_INFO_FAULT_CLIENT ) ) ) ; } if ( null == effectivePolicy ) { org . apache . cxf . ws . policy . EffectivePolicyImpl epi = createOutPolicyInfo ( ) ; epi . initialisePolicy ( ei , boi , bfi , this , m ) ; if ( bfi != null ) { bfi . setProperty ( org . apache . cxf . ws . policy . PolicyEngineImpl . POLICY_INFO_FAULT_CLIENT , epi ) ; } effectivePolicy = epi ; } } } return effectivePolicy ; }
|
org . junit . Assert . assertSame ( epi , engine . getEffectiveClientFaultPolicy ( ei , null , bfi , msg ) )
|
testRemoveDDMFormInstanceRecordWriter ( ) { com . liferay . dynamic . data . mapping . io . internal . exporter . DDMFormInstanceRecordWriterTrackerImpl ddmFormInstanceRecordWriterTracker = new com . liferay . dynamic . data . mapping . io . internal . exporter . DDMFormInstanceRecordWriterTrackerImpl ( ) ; addDDMFormInstanceRecordCSVWriter ( ddmFormInstanceRecordWriterTracker ) ; addDDMFormInstanceRecordJSONWriter ( ddmFormInstanceRecordWriterTracker ) ; com . liferay . dynamic . data . mapping . io . exporter . DDMFormInstanceRecordWriter ddmFormInstanceRecordWriter = new com . liferay . dynamic . data . mapping . io . internal . exporter . DDMFormInstanceRecordCSVWriter ( ) ; java . util . Map < java . lang . String , java . lang . Object > properties = new java . util . HashMap ( ) { { put ( "ddm.form.instance.record.writer.type" , "csv" ) ; put ( "ddm.form.instance.record.writer.extension" , "csv" ) ; } } ; ddmFormInstanceRecordWriterTracker . removeDDMFormInstanceRecordWriter ( ddmFormInstanceRecordWriter , properties ) ; ddmFormInstanceRecordWriter = ddmFormInstanceRecordWriterTracker . getDDMFormInstanceRecordWriter ( "csv" ) ; "<AssertPlaceHolder>" ; } getDDMFormInstanceRecordWriter ( java . lang . String ) { return _ddmFormInstanceRecordWriters . get ( type ) ; }
|
org . junit . Assert . assertNull ( ddmFormInstanceRecordWriter )
|
testConstructor ( ) { org . openhealthtools . mdht . uml . cda . ihe . operations . PayerEntryOperations obj = new org . openhealthtools . mdht . uml . cda . ihe . operations . PayerEntryOperations ( ) ; "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertTrue ( true )
|
testGetCurrentTransaction ( ) { try ( final io . vertigo . commons . transaction . VTransactionWritable currentTransaction = transactionManager . createCurrentTransaction ( ) ) { "<AssertPlaceHolder>" ; currentTransaction . rollback ( ) ; } } getCurrentTransaction ( ) { return transactionManager . getCurrentTransaction ( ) ; }
|
org . junit . Assert . assertEquals ( currentTransaction , transactionManager . getCurrentTransaction ( ) )
|
testRemoveSchemaSelect ( ) { java . lang . String sql = "select<sp>id<sp>as<sp>'aa'<sp>from<sp>test<sp>where<sp>name='abcdtestx.aa'<sp>and<sp>id=1<sp>and<sp>testx=123" ; java . lang . String afterAql = io . mycat . route . util . RouterUtil . removeSchema ( sql , "testx" ) ; "<AssertPlaceHolder>" ; } removeSchema ( java . lang . String , java . lang . String ) { final java . lang . String upStmt = stmt . toUpperCase ( ) ; final java . lang . String upSchema = ( schema . toUpperCase ( ) ) + "." ; final java . lang . String upSchema2 = new java . lang . StringBuilder ( "`" ) . append ( schema . toUpperCase ( ) ) . append ( "`." ) . toString ( ) ; int strtPos = 0 ; int indx = 0 ; int indx1 = upStmt . indexOf ( upSchema , strtPos ) ; int indx2 = upStmt . indexOf ( upSchema2 , strtPos ) ; boolean flag = ( indx1 < indx2 ) ? indx1 == ( - 1 ) : indx2 != ( - 1 ) ; indx = ( ! flag ) ? indx1 > 0 ? indx1 : indx2 : indx2 > 0 ? indx2 : indx1 ; if ( indx < 0 ) { return stmt ; } int firstE = upStmt . indexOf ( "'" ) ; int endE = upStmt . lastIndexOf ( "'" ) ; java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; while ( indx > 0 ) { sb . append ( stmt . substring ( strtPos , indx ) ) ; if ( flag ) { strtPos = indx + ( upSchema2 . length ( ) ) ; } else { strtPos = indx + ( upSchema . length ( ) ) ; } if ( ( ( indx > firstE ) && ( indx < endE ) ) && ( ( ( io . mycat . route . util . RouterUtil . countChar ( stmt , indx ) ) % 2 ) == 1 ) ) { sb . append ( stmt . substring ( indx , ( ( indx + ( schema . length ( ) ) ) + 1 ) ) ) ; } indx1 = upStmt . indexOf ( upSchema , strtPos ) ; indx2 = upStmt . indexOf ( upSchema2 , strtPos ) ; flag = ( indx1 < indx2 ) ? indx1 == ( - 1 ) : indx2 != ( - 1 ) ; indx = ( ! flag ) ? indx1 > 0 ? indx1 : indx2 : indx2 > 0 ? indx2 : indx1 ; } sb . append ( stmt . substring ( strtPos ) ) ; return sb . toString ( ) ; }
|
org . junit . Assert . assertEquals ( sql , afterAql )
|
testImportFileLocationInSubdir ( ) { java . lang . String slave = "parser<sp>grammar<sp>S;\n" + "a<sp>:<sp>B<sp>{System.out.println(\"S.a\");}<sp>;\n" ; mkdir ( tmpdir ) ; java . lang . String subdir = ( tmpdir ) + "/sub" ; mkdir ( subdir ) ; writeFile ( subdir , "S.g4" , slave ) ; java . lang . String master = "grammar<sp>M;\n" + ( ( ( "parser<sp>grammar<sp>S;\n" 0 + "parser<sp>grammar<sp>S;\n" 1 ) + "B<sp>:<sp>'b'<sp>;" ) + "WS<sp>:<sp>(\'<sp>\'|\'\\n\')<sp>-><sp>skip<sp>;\n" ) ; writeFile ( tmpdir , "M.g4" , master ) ; org . antlr . v4 . test . tool . ErrorQueue equeue = antlr ( "M.g4" , false , "-lib" , subdir ) ; "<AssertPlaceHolder>" ; } size ( ) { return ( all . size ( ) ) + ( infos . size ( ) ) ; }
|
org . junit . Assert . assertEquals ( 0 , equeue . size ( ) )
|
testRetryDurationZero ( javax . servlet . http . HttpServletRequest , javax . servlet . http . HttpServletResponse ) { try { beanC . connectCDurationZero ( ) ; org . junit . Assert . fail ( "Exception<sp>not<sp>thrown" ) ; } catch ( com . ibm . ws . microprofile . faulttolerance_fat . util . ConnectException e ) { } "<AssertPlaceHolder>" ; } getConnectCount ( ) { return connectCount ; }
|
org . junit . Assert . assertThat ( beanC . getConnectCount ( ) , org . hamcrest . Matchers . is ( 6 ) )
|
testStep ( ) { final net . imglib2 . type . numeric . integer . LongType in = new net . imglib2 . type . numeric . integer . LongType ( 1234567890 ) ; final net . imglib2 . type . numeric . real . DoubleType out = new net . imglib2 . type . numeric . real . DoubleType ( ) ; ops . run ( net . imagej . ops . math . UnaryRealTypeMath . Step . class , out , in ) ; "<AssertPlaceHolder>" ; } get ( ) { for ( int d = 0 ; d < ( position . length ) ; d ++ ) { blockPos [ d ] = ( position [ d ] ) / ( blockSize [ d ] ) ; blockOffset [ d ] = ( position [ d ] ) % ( blockSize [ d ] ) ; } final int blockIndex = net . imglib2 . util . IntervalIndexer . positionToIndex ( blockPos , blockDims ) ; final int shuffledBlockIndex = blockIndices [ blockIndex ] ; net . imglib2 . util . IntervalIndexer . indexToPosition ( shuffledBlockIndex , blockDims , shuffledBlockPos ) ; for ( int d = 0 ; d < ( position . length ) ; d ++ ) { final long pd = ( ( shuffledBlockPos [ d ] ) * ( blockSize [ d ] ) ) + ( blockOffset [ d ] ) ; imageRA . setPosition ( pd , d ) ; } return imageRA . get ( ) ; }
|
org . junit . Assert . assertEquals ( out . get ( ) , 1.0 , 0.0 )
|
testLoadByHashKeyAndRangeKey_WhenDynamoDBMapperReturnsNull ( ) { org . socialsignin . spring . data . dynamodb . domain . sample . Playlist playlist = dynamoDBTemplate . load ( org . socialsignin . spring . data . dynamodb . domain . sample . Playlist . class , "someHashKey" , "someRangeKey" ) ; "<AssertPlaceHolder>" ; } load ( java . lang . Class , java . lang . Object , java . lang . Object ) { T entity = dynamoDBMapper . load ( domainClass , hashKey , rangeKey ) ; if ( entity != null ) { maybeEmitEvent ( new org . socialsignin . spring . data . dynamodb . mapping . event . AfterLoadEvent < java . lang . Object > ( entity ) ) ; } return entity ; }
|
org . junit . Assert . assertNull ( playlist )
|
test_GetHyperlink_By_AutomationId ( ) { when ( element . findFirst ( mmarquee . automation . BaseAutomationTest . isTreeScope ( TreeScope . Descendants ) , any ( ) ) ) . thenReturn ( targetElement ) ; mmarquee . automation . controls . AutomationHyperlink link = spyWndw . getHyperlink ( mmarquee . automation . controls . Search . getBuilder ( ) . automationId ( "myID" ) . build ( ) ) ; "<AssertPlaceHolder>" ; verify ( spyWndw ) . createAutomationIdPropertyCondition ( "myID" ) ; verify ( spyWndw ) . createControlTypeCondition ( ControlType . Hyperlink ) ; verify ( element , atLeastOnce ( ) ) . findFirst ( any ( ) , any ( ) ) ; } getElement ( ) { return this . element ; }
|
org . junit . Assert . assertEquals ( targetElement , link . getElement ( ) )
|
testStrToDate_20130101 ( ) { java . util . Calendar cal = new java . util . GregorianCalendar ( 2013 , 0 , 1 ) ; java . util . Date expected = cal . getTime ( ) ; java . lang . String fixture = "2013/01/01" ; try { java . util . Date actual = info . michaelkohler . helpertools . date . DateFormatHelper . strToDate ( fixture ) ; "<AssertPlaceHolder>" ; } catch ( java . text . ParseException e ) { org . junit . Assert . fail ( e . getMessage ( ) ) ; } } strToDate ( java . lang . String ) { if ( info . michaelkohler . helpertools . date . DateFormatHelper . queryForTodayDate ( dateStr ) ) return info . michaelkohler . helpertools . date . DateHelper . todayDate ( ) ; else if ( info . michaelkohler . helpertools . date . DateFormatHelper . queryForYesterdayDate ( dateStr ) ) return info . michaelkohler . helpertools . date . DateHelper . yesterdayDate ( ) ; else if ( info . michaelkohler . helpertools . date . DateFormatHelper . queryForTomorrowDate ( dateStr ) ) return info . michaelkohler . helpertools . date . DateHelper . tomorrowDate ( ) ; return info . michaelkohler . helpertools . date . DateFormatHelper . dateFormatter . parse ( dateStr ) ; }
|
org . junit . Assert . assertTrue ( actual . equals ( expected ) )
|
test4 ( ) { java . lang . String [ ] vars = new java . lang . String [ ] { "x" , "y" , "z" } ; cc . redberry . rings . poly . MultivariateRing < cc . redberry . rings . poly . multivar . MultivariatePolynomial < cc . redberry . rings . bigint . BigInteger > > polyRing = cc . redberry . rings . Rings . MultivariateRing ( vars . length , cc . redberry . rings . io . Z ) ; java . util . HashMap < java . lang . String , cc . redberry . rings . poly . multivar . MultivariatePolynomial < cc . redberry . rings . bigint . BigInteger > > pVars = new java . util . HashMap ( ) ; for ( int i = 0 ; i < ( vars . length ) ; i ++ ) pVars . put ( vars [ i ] , polyRing . variable ( i ) ) ; cc . redberry . rings . Rationals < cc . redberry . rings . poly . multivar . MultivariatePolynomial < cc . redberry . rings . bigint . BigInteger > > baseRing = cc . redberry . rings . Rings . Frac ( polyRing ) ; java . util . Map < java . lang . String , cc . redberry . rings . Rational < cc . redberry . rings . poly . multivar . MultivariatePolynomial < cc . redberry . rings . bigint . BigInteger > > > eVars = pVars . entrySet ( ) . stream ( ) . collect ( java . util . stream . Collectors . toMap ( java . util . Map . Entry :: getKey , ( e ) -> new cc . redberry . rings . io . Rational < > ( polyRing , e . getValue ( ) ) ) ) ; cc . redberry . rings . io . Coder < cc . redberry . rings . Rational < cc . redberry . rings . poly . multivar . MultivariatePolynomial < cc . redberry . rings . bigint . BigInteger > > , ? , ? > notOptimizedParser = cc . redberry . rings . io . Coder . mkCoder ( baseRing , eVars , null , null , null ) ; cc . redberry . rings . io . Coder < cc . redberry . rings . Rational < cc . redberry . rings . poly . multivar . MultivariatePolynomial < cc . redberry . rings . bigint . BigInteger > > , ? , ? > optimizedParser = cc . redberry . rings . io . Coder . mkCoder ( baseRing , eVars , polyRing , pVars , ( p ) -> new cc . redberry . rings . io . Rational < > ( polyRing , p ) ) ; java . lang . String expressionStr = "(-5942283839318488889)*x^4*y^4" ; cc . redberry . rings . Rational < cc . redberry . rings . poly . multivar . MultivariatePolynomial < cc . redberry . rings . bigint . BigInteger > > a = notOptimizedParser . parse ( cc . redberry . rings . io . Tokenizer . mkTokenizer ( expressionStr ) ) ; cc . redberry . rings . Rational < cc . redberry . rings . poly . multivar . MultivariatePolynomial < cc . redberry . rings . bigint . BigInteger > > b = optimizedParser . parse ( cc . redberry . rings . io . Tokenizer . mkTokenizer ( expressionStr ) ) ; "<AssertPlaceHolder>" ; } parse ( java . lang . String ) { return valueOf ( factory . parsePoly ( string ) ) ; }
|
org . junit . Assert . assertEquals ( a , b )
|
getProvidersByRole_shouldReturnEmptySetForNoRole ( ) { org . openmrs . Encounter encounter = new org . openmrs . Encounter ( ) ; org . openmrs . EncounterRole role = new org . openmrs . EncounterRole ( ) ; org . openmrs . Provider provider = new org . openmrs . Provider ( ) ; encounter . addProvider ( role , provider ) ; org . openmrs . EncounterRole role2 = new org . openmrs . EncounterRole ( ) ; java . util . Set < org . openmrs . Provider > providers = encounter . getProvidersByRole ( role2 ) ; "<AssertPlaceHolder>" ; } size ( ) { return getMemberships ( ) . stream ( ) . filter ( ( m ) -> ! ( m . getVoided ( ) ) ) . collect ( java . util . stream . Collectors . toList ( ) ) . size ( ) ; }
|
org . junit . Assert . assertEquals ( 0 , providers . size ( ) )
|
testShouldAlphaShareNotEqualsInDifferentPackages ( ) { final java . lang . String drl1 = ( ( ( ( ( ( ( "package<sp>iTzXzx;\n" 1 + "import<sp>" ) + ( org . drools . compiler . integrationtests . SharingTest . TestObject . class . getCanonicalName ( ) ) ) + "\n" ) + "rule<sp>fileArule1<sp>when\n" ) + "<sp>TestObject(value<sp>>=<sp>1<sp>)\n" ) + "then\n" ) + "package<sp>iTzXzx;\n" 2 ) + "" ; final java . lang . String drl2 = ( ( ( ( ( ( ( ( ( ( ( "package<sp>iTzXzx;\n" + "import<sp>" ) + ( org . drools . compiler . integrationtests . SharingTest . TestObject . class . getCanonicalName ( ) ) ) + "\n" ) + "rule<sp>fileBrule1<sp>when\n" ) + "<sp>TestObject(value<sp>>=<sp>1<sp>)\n" ) + "then\n" ) + "package<sp>iTzXzx;\n" 2 ) + "rule<sp>fileBrule2<sp>when\n" ) + "<sp>TestObject(value<sp>>=<sp>2<sp>)\n" ) + "then\n" ) + "package<sp>iTzXzx;\n" 2 ) + "" ; final org . kie . api . KieBase kbase = org . drools . testcoverage . common . util . KieBaseUtil . getKieBaseFromKieModuleFromDrl ( "package<sp>iTzXzx;\n" 0 , kieBaseTestConfiguration , drl1 , drl2 ) ; final org . kie . api . runtime . KieSession kieSession = kbase . newKieSession ( ) ; try { kieSession . insert ( new org . drools . compiler . integrationtests . SharingTest . TestObject ( 1 ) ) ; "<AssertPlaceHolder>" ; } finally { kieSession . dispose ( ) ; } } fireAllRules ( ) { return 0 ; }
|
org . junit . Assert . assertEquals ( 2 , kieSession . fireAllRules ( ) )
|
publishWithProof ( ) { com . restfb . DefaultFacebookClient client = new com . restfb . DefaultFacebookClient ( getTestSettings ( ) . getUserAccessToken ( ) , getTestSettings ( ) . getAppSecret ( ) , com . restfb . Version . LATEST ) ; com . restfb . json . JsonObject me = client . publish ( "/me/feed" , com . restfb . json . JsonObject . class , com . restfb . Parameter . with ( "message" , "Test<sp>publish" ) , com . restfb . Parameter . with ( "privacy" , "{\"value\":<sp>\"SELF\"}" ) ) ; "<AssertPlaceHolder>" ; } with ( java . lang . String , java . lang . Object ) { return com . restfb . Parameter . with ( name , value , new com . restfb . DefaultJsonMapper ( ) ) ; }
|
org . junit . Assert . assertNotNull ( me )
|
getAllConceptSources_shouldReturnAllConceptSourcesExcludingRetiredOnesWhenGivenFalse ( ) { int conceptSourcesInDataset = 3 ; java . util . List < org . openmrs . ConceptSource > conceptSources = conceptService . getAllConceptSources ( false ) ; "<AssertPlaceHolder>" ; } size ( ) { return getMemberships ( ) . stream ( ) . filter ( ( m ) -> ! ( m . getVoided ( ) ) ) . collect ( java . util . stream . Collectors . toList ( ) ) . size ( ) ; }
|
org . junit . Assert . assertEquals ( conceptSourcesInDataset , conceptSources . size ( ) )
|
testExists_False ( ) { initializeExpectedNetwork ( 2 ) ; com . google . cloud . compute . deprecated . Compute [ ] expectedOptions = new Compute . NetworkOption [ ] { Compute . NetworkOption . fields ( ) } ; expect ( compute . getOptions ( ) ) . andReturn ( mockOptions ) ; expect ( compute . getNetwork ( com . google . cloud . compute . deprecated . NetworkTest . NETWORK_ID . getNetwork ( ) , expectedOptions ) ) . andReturn ( null ) ; replay ( compute ) ; initializeNetwork ( ) ; "<AssertPlaceHolder>" ; verify ( compute ) ; } exists ( ) { return ( reload ( com . google . cloud . compute . deprecated . Compute . SubnetworkOption . fields ( ) ) ) != null ; }
|
org . junit . Assert . assertFalse ( network . exists ( ) )
|
testSimple ( ) { java . lang . String s = "console" ; com . cloudera . flume . core . EventSink sink = com . cloudera . flume . conf . FlumeBuilder . buildSink ( new com . cloudera . flume . conf . Context ( ) , s ) ; java . util . Map < java . lang . String , com . cloudera . flume . reporter . ReportEvent > reports = new java . util . HashMap < java . lang . String , com . cloudera . flume . reporter . ReportEvent > ( ) ; sink . getReports ( "X." , reports ) ; java . lang . String r = "" ; for ( java . util . Map . Entry < java . lang . String , com . cloudera . flume . reporter . ReportEvent > e : reports . entrySet ( ) ) { r += ( ( e . getKey ( ) ) + "<sp>=<sp>" ) + ( e . getValue ( ) . toText ( ) ) ; } System . out . println ( r ) ; "<AssertPlaceHolder>" ; } contains ( com . cloudera . util . bloom . BloomSet ) { com . cloudera . util . bloom . BloomSet subClone = new com . cloudera . util . bloom . BloomSet ( subset ) ; subClone . and ( this ) ; return subClone . equals ( subset ) ; }
|
org . junit . Assert . assertTrue ( r . contains ( ( "X." + ( sink . getName ( ) ) ) ) )
|
bytesFromBigInt ( ) { int byte_size = 48 ; java . math . BigInteger bigInteger = new java . math . BigInteger ( "13190295509826637194583200125168488859623001289643321872497025844241981297292953903419783680940401133507992851240799" ) ; byte [ ] outBytes = new byte [ Kerl . BYTE_HASH_LENGTH ] ; com . iota . iri . crypto . Kerl . bytesFromBigInt ( bigInteger , outBytes ) ; java . math . BigInteger out_bigInteger = new java . math . BigInteger ( outBytes ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == o ) { return true ; } if ( ( o == null ) || ( ( getClass ( ) ) != ( o . getClass ( ) ) ) ) { return false ; } com . iota . iri . controllers . TransactionViewModel other = ( ( com . iota . iri . controllers . TransactionViewModel ) ( o ) ) ; return com . iota . iri . controllers . Objects . equals ( getHash ( ) , other . getHash ( ) ) ; }
|
org . junit . Assert . assertTrue ( bigInteger . equals ( out_bigInteger ) )
|
simpleQueryOnSeveralFields_OR ( ) { demo . Account example = new demo . Account ( ) ; example . setLastName ( "Jag" ) ; example . setBirthDate ( new java . util . Date ( ) ) ; demo . SearchParameters sp = new demo . SearchParameters ( ) . orMode ( ) . orderBy ( OrderByDirection . ASC , Account_ . lastName ) . startingLike ( ) ; java . util . List < demo . Account > result = accountRepository . find ( example , sp ) ; "<AssertPlaceHolder>" ; } is ( com . jaxio . jpa . querybyexample . SearchMode ) { return ( getSearchMode ( ) ) == searchMode ; }
|
org . junit . Assert . assertThat ( result . size ( ) , org . hamcrest . CoreMatchers . is ( 1 ) )
|
whenSendPostRequestWithAuthorization_thenCorrect ( ) { final java . lang . String postBody = "test<sp>post" ; final okhttp3 . Request request = new okhttp3 . Request . Builder ( ) . url ( com . baeldung . okhttp . OkHttpPostingLiveTest . URL_SECURED_BY_BASIC_AUTHENTICATION ) . addHeader ( "Authorization" , okhttp3 . Credentials . basic ( "test" , "test" ) ) . post ( okhttp3 . RequestBody . create ( okhttp3 . MediaType . parse ( "text/x-markdown;<sp>charset=utf-8" ) , "test<sp>post" ) ) . build ( ) ; final okhttp3 . Call call = client . newCall ( request ) ; final okhttp3 . Response response = call . execute ( ) ; "<AssertPlaceHolder>" ; } execute ( ) { return ( a ) + ( b ) ; }
|
org . junit . Assert . assertThat ( response . code ( ) , org . hamcrest . Matchers . equalTo ( 200 ) )
|
testBothEmbeddedIsNull ( ) { org . tests . model . embedded . EMain emain1 = createEMain ( ) ; emain1 . setEmbeddable ( null ) ; org . tests . model . embedded . EMain emain2 = createEMain ( ) ; emain2 . setEmbeddable ( null ) ; java . util . Map < java . lang . String , io . ebean . ValuePair > diff = io . ebeaninternal . server . core . DiffHelp . diff ( emain1 , emain2 , emainDesc ) ; "<AssertPlaceHolder>" ; } size ( ) { return changes . size ( ) ; }
|
org . junit . Assert . assertEquals ( 0 , diff . size ( ) )
|
testNotBlankMsgEmptyStringShouldThrow ( ) { final java . lang . String string = "" ; try { org . apache . commons . lang3 . Validate . notBlank ( string , "Message" ) ; org . junit . Assert . fail ( "Expecting<sp>IllegalArgumentException" ) ; } catch ( final java . lang . IllegalArgumentException e ) { "<AssertPlaceHolder>" ; } } getMessage ( ) { return getFormattedExceptionMessage ( super . getMessage ( ) ) ; }
|
org . junit . Assert . assertEquals ( "Message" , e . getMessage ( ) )
|
testAccountingServerSessionStartsIdleState ( ) { org . jdiameter . api . acc . ServerAccSession session = getAppSession ( org . jdiameter . api . acc . ServerAccSession . class , new org . jdiameter . common . impl . app . acc . AccSessionFactoryImpl ( org . mobicents . diameter . stack . sessions . SessionsWithAppIdTest . sessionFactory ) , org . mobicents . diameter . stack . sessions . SessionsWithAppIdTest . BASE_ACCT_APPID ) ; org . jdiameter . common . api . app . acc . ServerAccSessionState state = session . getState ( org . jdiameter . common . api . app . acc . ServerAccSessionState . class ) ; "<AssertPlaceHolder>" ; } getState ( java . lang . Class ) { switch ( stack . getState ( ) ) { case IDLE : return ( ( E ) ( org . jdiameter . api . PeerState . DOWN ) ) ; case CONFIGURED : return ( ( E ) ( org . jdiameter . api . PeerState . INITIAL ) ) ; case STARTED : return ( ( E ) ( org . jdiameter . api . PeerState . OKAY ) ) ; case STOPPED : return ( ( E ) ( org . jdiameter . api . PeerState . SUSPECT ) ) ; } return ( ( E ) ( org . jdiameter . api . PeerState . DOWN ) ) ; }
|
org . junit . Assert . assertEquals ( state . IDLE , state )
|
testIntModulo ( ) { executeWithDefaultScope ( "intVar<sp>=<sp>42<sp>%<sp>2" ) ; "<AssertPlaceHolder>" ; } getIntValue ( ) { return context . getVariable ( "intVar" ) . getValue ( ) ; }
|
org . junit . Assert . assertEquals ( 0L , getIntValue ( ) )
|
testUnCapitalize6 ( ) { java . lang . Object target = "Abc<sp>Def" ; java . lang . String expResult = "abc<sp>Def" ; java . lang . String result = org . thymeleaf . util . StringUtils . unCapitalize ( target ) ; "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertEquals ( expResult , result )
|
parsesGivenSourceAndRegistersParsedTemplates ( ) { javax . xml . transform . Source source = mock ( javax . xml . transform . Source . class ) ; javax . xml . transform . Templates templates = mock ( javax . xml . transform . Templates . class ) ; when ( templatesParser . parseTemplates ( source ) ) . thenReturn ( templates ) ; xsltTemplatesContextResolver . addAsTemplate ( "templates<sp>1" , source ) ; "<AssertPlaceHolder>" ; } getTemplates ( java . lang . String ) { return templatesMap . get ( name ) ; }
|
org . junit . Assert . assertSame ( templates , xsltTemplatesContextResolver . getTemplates ( "templates<sp>1" ) )
|
test2 ( ) { com . creactiviti . piper . core . MapObject mo = new com . creactiviti . piper . core . MapObject ( java . util . Collections . singletonMap ( "number" , "5" ) ) { } ; "<AssertPlaceHolder>" ; } getInteger ( java . lang . Object ) { return get ( aKey , com . creactiviti . piper . core . Integer . class ) ; }
|
org . junit . Assert . assertEquals ( java . lang . Integer . valueOf ( 5 ) , mo . getInteger ( "number" ) )
|
testTakeUpdatedLease ( ) { software . amazon . kinesis . leases . dynamodb . TestHarnessBuilder builder = new software . amazon . kinesis . leases . dynamodb . TestHarnessBuilder ( leaseRefresher ) ; software . amazon . kinesis . leases . Lease lease = builder . withLease ( "1" ) . build ( ) . get ( "1" ) ; software . amazon . kinesis . leases . Lease leaseCopy = leaseRefresher . getLease ( lease . leaseKey ( ) ) ; java . lang . String newOwner = "newOwner" ; leaseRefresher . takeLease ( lease , newOwner ) ; "<AssertPlaceHolder>" ; } takeLease ( software . amazon . kinesis . leases . Lease , java . lang . String ) { final java . lang . String oldOwner = lease . leaseOwner ( ) ; log . debug ( "Taking<sp>lease<sp>with<sp>leaseKey<sp>{}<sp>from<sp>{}<sp>to<sp>{}" , lease . leaseKey ( ) , ( ( lease . leaseOwner ( ) ) == null ? "nobody" : lease . leaseOwner ( ) ) , owner ) ; final software . amazon . kinesis . retrieval . AWSExceptionManager exceptionManager = createExceptionManager ( ) ; exceptionManager . add ( software . amazon . awssdk . services . dynamodb . model . ConditionalCheckFailedException . class , ( t ) -> t ) ; java . util . Map < java . lang . String , software . amazon . awssdk . services . dynamodb . model . AttributeValueUpdate > updates = serializer . getDynamoLeaseCounterUpdate ( lease ) ; updates . putAll ( serializer . getDynamoTakeLeaseUpdate ( lease , owner ) ) ; software . amazon . awssdk . services . dynamodb . model . UpdateItemRequest request = software . amazon . awssdk . services . dynamodb . model . UpdateItemRequest . builder ( ) . tableName ( table ) . key ( serializer . getDynamoHashKey ( lease ) ) . expected ( serializer . getDynamoLeaseCounterExpectation ( lease ) ) . attributeUpdates ( updates ) . build ( ) ; try { try { software . amazon . kinesis . common . FutureUtils . resolveOrCancelFuture ( dynamoDBClient . updateItem ( request ) , dynamoDbRequestTimeout ) ; } catch ( java . util . concurrent . ExecutionException e ) { throw exceptionManager . apply ( e . getCause ( ) ) ; } catch ( java . lang . InterruptedException e ) { throw new software . amazon . kinesis . leases . exceptions . DependencyException ( e ) ; } } catch ( software . amazon . awssdk . services . dynamodb . model . ConditionalCheckFailedException e ) { log . debug ( "Lease<sp>renewal<sp>failed<sp>for<sp>lease<sp>with<sp>key<sp>{}<sp>because<sp>the<sp>lease<sp>counter<sp>was<sp>not<sp>{}" , lease . leaseKey ( ) , lease . leaseCounter ( ) ) ; return false ; } catch ( software . amazon . awssdk . services . dynamodb . model . DynamoDbException | java . util . concurrent . TimeoutException e ) { throw convertAndRethrowExceptions ( "take" , lease . leaseKey ( ) , e ) ; } lease . leaseCounter ( ( ( lease . leaseCounter ( ) ) + 1 ) ) ; lease . leaseOwner ( owner ) ; if ( ( oldOwner != null ) && ( ! ( oldOwner . equals ( owner ) ) ) ) { lease . ownerSwitchesSinceCheckpoint ( ( ( lease . ownerSwitchesSinceCheckpoint ( ) ) + 1 ) ) ; } return true ; }
|
org . junit . Assert . assertFalse ( leaseRefresher . takeLease ( leaseCopy , newOwner ) )
|
getAuthorizationListVersionVerifyReturnValue ( ) { int listVersion = 1 ; when ( chargePointService . getLocalListVersion ( any ( io . motown . ocpp . v15 . soap . chargepoint . GetLocalListVersionRequest . class ) , eq ( io . motown . ocpp . v15 . soap . chargepoint . CHARGING_STATION_ID . getId ( ) ) ) ) . thenReturn ( getGetLocalListVersionResponse ( listVersion ) ) ; int authorizationListVersion = client . getAuthorizationListVersion ( io . motown . ocpp . v15 . soap . chargepoint . CHARGING_STATION_ID ) ; "<AssertPlaceHolder>" ; } getAuthorizationListVersion ( io . motown . ocpp . v15 . soap . chargepoint . ChargingStationId ) { io . motown . ocpp . v15 . soap . chargepoint . ChargePointService chargePointService = this . createChargingStationService ( id ) ; io . motown . ocpp . v15 . soap . chargepoint . GetLocalListVersionResponse response = chargePointService . getLocalListVersion ( new io . motown . ocpp . v15 . soap . chargepoint . GetLocalListVersionRequest ( ) , id . getId ( ) ) ; int currentWhitelistVersion = response . getListVersion ( ) ; io . motown . ocpp . v15 . soap . chargepoint . ChargingStationOcpp15SoapClient . LOG . info ( "At<sp>the<sp>moment<sp>{}<sp>has<sp>authorizationlist<sp>version<sp>{}" , id . getId ( ) , currentWhitelistVersion ) ; return currentWhitelistVersion ; }
|
org . junit . Assert . assertEquals ( listVersion , authorizationListVersion )
|
mergeShouldHandleAllEmptyIterators ( ) { org . neo4j . kernel . api . impl . fulltext . ScoreEntityIterator one = org . neo4j . kernel . api . impl . fulltext . ScoreEntityIteratorTest . iteratorOf ( org . neo4j . kernel . api . impl . fulltext . ScoreEntityIteratorTest . emptyEntries ( ) ) ; org . neo4j . kernel . api . impl . fulltext . ScoreEntityIterator two = org . neo4j . kernel . api . impl . fulltext . ScoreEntityIteratorTest . iteratorOf ( org . neo4j . kernel . api . impl . fulltext . ScoreEntityIteratorTest . emptyEntries ( ) ) ; org . neo4j . kernel . api . impl . fulltext . ScoreEntityIterator three = org . neo4j . kernel . api . impl . fulltext . ScoreEntityIteratorTest . iteratorOf ( org . neo4j . kernel . api . impl . fulltext . ScoreEntityIteratorTest . emptyEntries ( ) ) ; org . neo4j . kernel . api . impl . fulltext . ScoreEntityIterator concat = org . neo4j . kernel . api . impl . fulltext . ScoreEntityIterator . mergeIterators ( java . util . Arrays . asList ( one , two , three ) ) ; "<AssertPlaceHolder>" ; } hasNext ( ) { return entries . hasNext ( ) ; }
|
org . junit . Assert . assertFalse ( concat . hasNext ( ) )
|
getNullValueFromScopeResolutionStrategyWithoutDefaultValueTest ( ) { final java . lang . String value = preferenceStore . get ( preferenceScopeResolutionStrategyInfo , org . uberfire . preferences . backend . PreferenceStoreImplTest . KEY ) ; "<AssertPlaceHolder>" ; verify ( storage ) . read ( preferenceScopeResolutionStrategyInfo , org . uberfire . preferences . backend . PreferenceStoreImplTest . KEY ) ; } get ( java . lang . String , java . lang . String [ ] ) { return org . uberfire . java . nio . file . Paths . get ( first , more ) ; }
|
org . junit . Assert . assertNull ( value )
|
testAddTags ( ) { final com . spotify . metrics . tags . NoopTagExtractor noopTagExtractor = new com . spotify . metrics . tags . NoopTagExtractor ( ) ; final java . util . Map < java . lang . String , java . lang . String > currentMap = com . google . common . collect . ImmutableMap . of ( "foo" , "bar" , "bar" , "baz" , "cluster" , "cluster1" ) ; final java . util . Map < java . lang . String , java . lang . String > out = noopTagExtractor . addTags ( currentMap ) ; "<AssertPlaceHolder>" ; } addTags ( java . util . Map ) { return tags ; }
|
org . junit . Assert . assertEquals ( com . google . common . collect . ImmutableMap . of ( "foo" , "bar" , "bar" , "baz" , "cluster" , "cluster1" ) , out )
|
testAliasWithArgs ( ) { java . lang . String dir = getRandomDir ( ) ; java . lang . String groupFile = "a(x,y)<sp>::=<sp>\"<x><y>\"\n" + "b<sp>::=<sp>a\n" ; writeFile ( dir , "group.stg" , groupFile ) ; org . stringtemplate . v4 . STGroupFile group = new org . stringtemplate . v4 . STGroupFile ( ( dir + "/group.stg" ) ) ; org . stringtemplate . v4 . ST st = group . getInstanceOf ( "b" ) ; st . add ( "x" , 1 ) ; st . add ( "y" , 2 ) ; java . lang . String expected = "12" ; java . lang . String result = st . render ( ) ; "<AssertPlaceHolder>" ; } render ( ) { return render ( java . util . Locale . getDefault ( ) ) ; }
|
org . junit . Assert . assertEquals ( expected , result )
|
Sorted_Overlapping ( ) { java . util . Map < java . lang . Object , java . lang . Object > diff = org . javersion . core . Diff . diff ( org . javersion . core . DiffTest . sorted ( 1 , 1 , 2 , 2 ) , org . javersion . core . DiffTest . sorted ( 2 , 2 , 3 , 3 ) ) ; "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertThat ( diff , org . hamcrest . Matchers . equalTo ( org . javersion . core . DiffTest . sorted ( 1 , null , 3 , 3 ) ) )
|
deveObterValorUnitarioTributavelComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe400 . classes . nota . NFNotaInfoItemProduto produto = new com . fincatto . documentofiscal . nfe400 . classes . nota . NFNotaInfoItemProduto ( ) ; final java . math . BigDecimal valorUnitarioTributavel = new java . math . BigDecimal ( "9999999999.9999999999" ) ; produto . setValorUnitarioTributavel ( valorUnitarioTributavel ) ; "<AssertPlaceHolder>" ; } getValorUnitarioTributavel ( ) { return this . valorUnitarioTributavel ; }
|
org . junit . Assert . assertEquals ( "9999999999.9999999999" , produto . getValorUnitarioTributavel ( ) )
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.