input
stringlengths
28
18.7k
output
stringlengths
39
1.69k
testExtractMonthDate ( ) { java . lang . String sqlText = ( "select<sp>d,<sp>EXTRACT(MONTH<sp>FROM<sp>d)<sp>as<sp>\"MONTH\"<sp>from<sp>" + ( com . splicemachine . derby . utils . SpliceDateFunctionsIT . tableWatcherI ) ) + "<sp>order<sp>by<sp>d" ; try ( com . splicemachine . derby . utils . ResultSet rs = methodWatcher . executeQuery ( sqlText ) ) { java . lang . String expected = "<sp>from<sp>" 0 + ( ( ( ( ( ( "--------------------\n" + "2009-01-02<sp>|<sp>1<sp>|\n" ) + "2009-07-02<sp>|<sp>7<sp>|\n" ) + "2009-09-02<sp>|<sp>9<sp>|\n" ) + "2012-12-31<sp>|<sp>12<sp>|\n" ) + "2012-12-31<sp>|<sp>12<sp>|\n" ) + "2013-12-31<sp>|<sp>12<sp>|" ) ; "<AssertPlaceHolder>" ; } } toStringUnsorted ( com . splicemachine . homeless . ResultSet ) { return com . splicemachine . homeless . TestUtils . FormattedResult . ResultFactory . convert ( "" , rs , false ) . toString ( ) . trim ( ) ; }
org . junit . Assert . assertEquals ( ( ( "\n" + sqlText ) + "\n" ) , expected , TestUtils . FormattedResult . ResultFactory . toStringUnsorted ( rs ) )
testUserOnBusinessAdministratorGroups ( ) { java . util . List < java . lang . String > userGroups = new java . util . ArrayList ( ) ; userGroups . add ( "admin" ) ; when ( userGroupCallback . getGroupsForUser ( org . jbpm . services . task . commands . GetUserTaskCommandTest . USER_ID ) ) . thenReturn ( userGroups ) ; java . util . List < org . kie . api . task . model . OrganizationalEntity > admins = new java . util . ArrayList ( ) ; admins . add ( new org . jbpm . services . task . impl . model . GroupImpl ( "admin" ) ) ; when ( peopleAssignments . getBusinessAdministrators ( ) ) . thenReturn ( admins ) ; org . kie . api . task . model . Task commandTask = command . execute ( taskContext ) ; "<AssertPlaceHolder>" ; } execute ( org . kie . api . runtime . Context ) { org . kie . api . runtime . KieSession ksession = ( ( org . kie . internal . command . RegistryContext ) ( context ) ) . lookup ( org . kie . api . runtime . KieSession . class ) ; org . kie . api . runtime . process . ProcessInstance processInstance = ksession . getProcessInstance ( processInstanceId ) ; org . jbpm . workflow . instance . node . DynamicNodeInstance dynamicContext = ( ( org . jbpm . workflow . instance . node . DynamicNodeInstance ) ( ( ( org . jbpm . workflow . instance . impl . WorkflowProcessInstanceImpl ) ( processInstance ) ) . getNodeInstances ( true ) . stream ( ) . filter ( ( ni ) -> ( ni instanceof org . jbpm . workflow . instance . node . DynamicNodeInstance ) && ( ( stage . equals ( ni . getNode ( ) . getMetaData ( ) . get ( "UniqueId" ) ) ) || ( stage . equals ( ni . getNodeName ( ) ) ) ) ) . findFirst ( ) . orElseThrow ( ( ) -> new org . jbpm . casemgmt . api . StageNotFoundException ( ( "No<sp>stage<sp>found<sp>with<sp>id<sp>" + ( stage ) ) ) ) ) ) ; org . jbpm . casemgmt . api . model . CaseStage caseStage = caseDef . getCaseStages ( ) . stream ( ) . filter ( ( stage ) -> stage . getId ( ) . equals ( dynamicContext . getNode ( ) . getMetaData ( ) . get ( "UniqueId" ) ) ) . findFirst ( ) . get ( ) ; if ( ! ( caseStage . getAdHocFragments ( ) . stream ( ) . anyMatch ( ( fragment ) -> fragment . getName ( ) . equals ( fragmentName ) ) ) ) { throw new org . jbpm . casemgmt . api . AdHocFragmentNotFoundException ( ( ( ( ( ( "AdHoc<sp>fragment<sp>'" + ( fragmentName ) ) + "'<sp>not<sp>found<sp>in<sp>case<sp>" ) + ( ( ( org . jbpm . workflow . instance . impl . WorkflowProcessInstanceImpl ) ( processInstance ) ) . getCorrelationKey ( ) ) ) + "<sp>and<sp>stage<sp>" ) + ( stage ) ) ) ; } dynamicContext . signalEvent ( fragmentName , data ) ; return null ; }
org . junit . Assert . assertEquals ( task , commandTask )
equals_equalInstances2_shouldBeTrue ( ) { com . vaadin . v7 . data . util . filter . Between b1 = new com . vaadin . v7 . data . util . filter . Between ( null , null , null ) ; com . vaadin . v7 . data . util . filter . Between b2 = new com . vaadin . v7 . data . util . filter . Between ( null , null , null ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == obj ) { return true ; } else if ( obj instanceof com . vaadin . client . metadata . Property ) { com . vaadin . client . metadata . Property other = ( ( com . vaadin . client . metadata . Property ) ( obj ) ) ; return getSignature ( ) . equals ( other . getSignature ( ) ) ; } else { return false ; } }
org . junit . Assert . assertTrue ( b1 . equals ( b2 ) )
type4_slaps ( ) { org . jnbis . api . model . Nist decoded = decode ( org . jnbis . AnsiReferencesTest . FILES [ 2 ] ) ; commonAssert ( decoded ) ; "<AssertPlaceHolder>" ; } getHiResGrayscaleFingerprints ( ) { return hiResolutionGrayscaleFingerprints ; }
org . junit . Assert . assertEquals ( 4 , decoded . getHiResGrayscaleFingerprints ( ) . size ( ) )
shouldNotMatchIfFilesMissing ( ) { net . ripe . rpki . commons . crypto . cms . manifest . ManifestCms mft = net . ripe . rpki . commons . crypto . cms . manifest . ManifestCmsTest . getRootManifestCms ( ) ; java . util . Map < java . lang . String , byte [ ] > emptyFiles = java . util . Collections . emptyMap ( ) ; "<AssertPlaceHolder>" ; } matchesFiles ( java . util . Map ) { if ( hashes . keySet ( ) . equals ( filesToMatch . keySet ( ) ) ) { for ( java . util . Map . Entry < java . lang . String , byte [ ] > entry : hashes . entrySet ( ) ) { java . lang . String fileName = entry . getKey ( ) ; byte [ ] contentToMatch = filesToMatch . get ( fileName ) ; if ( ! ( verifyFileContents ( fileName , contentToMatch ) ) ) { return false ; } } return true ; } else { return false ; } }
org . junit . Assert . assertFalse ( mft . matchesFiles ( emptyFiles ) )
testGetStrokeMap ( ) { java . awt . Image image = new java . awt . image . BufferedImage ( 100 , 100 , java . awt . image . BufferedImage . TYPE_INT_RGB ) ; java . awt . Graphics2D g2d = ( ( java . awt . Graphics2D ) ( image . getGraphics ( ) ) ) ; org . openscience . cdk . renderer . visitor . AWTDrawVisitor visitor = new org . openscience . cdk . renderer . visitor . AWTDrawVisitor ( g2d ) ; "<AssertPlaceHolder>" ; } getStrokeMap ( ) { return strokeMap ; }
org . junit . Assert . assertNotNull ( visitor . getStrokeMap ( ) )
deserializersTestsTree ( ) { final org . apache . tinkerpop . gremlin . tinkergraph . structure . TinkerGraph tg = org . apache . tinkerpop . gremlin . tinkergraph . structure . TinkerFactory . createModern ( ) ; final org . apache . tinkerpop . gremlin . structure . io . GraphWriter writer = getWriter ( defaultMapperV2d0 ) ; final org . apache . tinkerpop . gremlin . structure . io . GraphReader reader = getReader ( defaultMapperV2d0 ) ; final org . apache . tinkerpop . gremlin . process . traversal . step . util . Tree t = tg . traversal ( ) . V ( ) . out ( ) . out ( ) . tree ( ) . next ( ) ; try ( final java . io . ByteArrayOutputStream out = new java . io . ByteArrayOutputStream ( ) ) { writer . writeObject ( out , t ) ; final java . lang . String json = out . toString ( ) ; final org . apache . tinkerpop . gremlin . process . traversal . step . util . Tree treeRead = ( ( org . apache . tinkerpop . gremlin . process . traversal . step . util . Tree ) ( reader . readObject ( new java . io . ByteArrayInputStream ( json . getBytes ( ) ) , java . lang . Object . class ) ) ) ; "<AssertPlaceHolder>" ; } catch ( java . io . IOException e ) { e . printStackTrace ( ) ; org . junit . Assert . fail ( ( "Should<sp>not<sp>have<sp>thrown<sp>exception:<sp>" + ( e . getMessage ( ) ) ) ) ; } } readObject ( org . apache . tinkerpop . gremlin . spark . structure . io . gryo . kryoshim . unshaded . UnshadedInputAdapter , java . lang . Class ) { return unshadedKryo . readObject ( input . getUnshadedInput ( ) , type ) ; }
org . junit . Assert . assertEquals ( t , treeRead )
testIndexed ( ) { java . util . List < org . apache . lucene . index . Term > terms = com . google . common . collect . ImmutableList . copyOf ( new com . greplin . lucene . index . TermsForField ( this . reader , "notStored" ) ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( com . google . common . collect . ImmutableList . of ( new org . apache . lucene . index . Term ( "notStored" , "a" ) , new org . apache . lucene . index . Term ( "notStored" , "b" ) ) , terms )
allLegalIdsMayBeUsed ( ) { java . lang . String [ ] ids = new java . lang . String [ ] { "aaaaaaa" , "0000000" , "a1b2c3d" , "-------" , "_______" , "-_0-ad_" } ; int count = 0 ; for ( java . lang . String id : ids ) { net . fortytwo . smsn . brain . model . entities . Atom atom = topicGraph . createAtomWithProperties ( filter , id ) ; atom . setTitle ( ( "atom<sp>#" + ( ++ count ) ) ) ; } for ( int i = 0 ; i < ( ids . length ) ; i ++ ) { net . fortytwo . smsn . brain . model . entities . Atom atom = topicGraph . getAtomById ( ids [ i ] ) . get ( ) ; "<AssertPlaceHolder>" ; } } getTitle ( ) { return title ; }
org . junit . Assert . assertEquals ( ( "atom<sp>#" + ( i + 1 ) ) , atom . getTitle ( ) )
testExecutionExceptionNonNested ( ) { java . lang . Exception exIn = new org . eurekastreams . commons . exceptions . ExecutionException ( ) ; java . lang . Exception exOut = coreForbidNestingExceptionTest ( exIn ) ; "<AssertPlaceHolder>" ; } coreForbidNestingExceptionTest ( java . lang . Exception ) { org . eurekastreams . server . persistence . mappers . cache . Transformer < java . lang . Exception , java . lang . Exception > sut = new org . eurekastreams . commons . server . ExceptionSanitizer ( ) ; java . lang . Exception outputException = sut . transform ( inputException ) ; org . junit . Assert . assertNull ( outputException . getCause ( ) ) ; return outputException ; }
org . junit . Assert . assertSame ( exIn , exOut )
getCounter ( ) { net . centro . rtb . monitoringcenter . MetricCollector metricCollector = net . centro . rtb . monitoringcenter . MonitoringCenter . getMetricCollector ( net . centro . rtb . monitoringcenter . MonitoringCenterTest . class ) ; net . centro . rtb . monitoringcenter . Counter testCounter = new net . centro . rtb . monitoringcenter . Counter ( ) ; metricCollector . registerMetric ( testCounter , "testCounter" ) ; testCounter . inc ( ) ; "<AssertPlaceHolder>" ; } getCount ( ) { return mainDelegate . getCount ( ) ; }
org . junit . Assert . assertEquals ( 0 , metricCollector . getCounter ( "testCounter" ) . getCount ( ) )
removeProductTest ( ) { System . out . print ( "-><sp>removeProduct()<sp>-<sp>" ) ; ua . com . alexcoffee . model . category . Category category = ua . com . alexcoffee . model . category . Category . getBuilder ( ) . build ( ) ; ua . com . alexcoffee . model . product . Product product = new ua . com . alexcoffee . model . product . Product ( ) ; category . addProduct ( product ) ; category . addProducts ( getTenProducts ( ) ) ; category . removeProduct ( product ) ; "<AssertPlaceHolder>" ; System . out . println ( "OK!" ) ; } getProducts ( ) { return this . products ; }
org . junit . Assert . assertEquals ( category . getProducts ( ) . size ( ) , 10 )
testQueryListMultiple ( ) { authRule . createGrantAuthorization ( Resources . BATCH , "*" , "user" , Permissions . READ ) ; authRule . createGrantAuthorization ( Resources . BATCH , batch1 . getId ( ) , "user" , Permissions . READ ) ; authRule . enableAuthorization ( "user" ) ; java . util . List < org . camunda . bpm . engine . batch . BatchStatistics > batches = engineRule . getManagementService ( ) . createBatchStatisticsQuery ( ) . list ( ) ; authRule . disableAuthorization ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return ( ( ( historicProcessInstanceIds . size ( ) ) + ( historicDecisionInstanceIds . size ( ) ) ) + ( historicCaseInstanceIds . size ( ) ) ) + ( historicBatchIds . size ( ) ) ; }
org . junit . Assert . assertEquals ( 2 , batches . size ( ) )
service19PutWithHeaderApplicationJsonContentTypeAndStringBodyWithNullBody ( ) { final com . azure . common . entities . HttpBinJSON result = createService ( com . azure . common . implementation . RestProxyTests . Service19 . class ) . putWithHeaderApplicationJsonContentTypeAndStringBody ( null ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( "" , result . data )
shouldRejectVersionMisMatchIPv4 ( ) { bli . setIpVersion ( IpVersion . IPV6 ) ; bli . setCidrBlock ( "192.168.3.51/24" ) ; org . openstack . atlas . api . validation . results . ValidatorResult result = bv . validate ( bli , org . openstack . atlas . api . mgmt . validation . validators . POST ) ; "<AssertPlaceHolder>" ; } resultMessage ( org . openstack . atlas . api . validation . results . ValidatorResult , java . lang . Enum ) { java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; if ( ! ( result . passedValidation ( ) ) ) { java . util . List < org . openstack . atlas . api . validation . results . ExpectationResult > ers = result . getValidationResults ( ) ; sb . append ( java . lang . String . format ( "ON<sp>%s<sp>result.withMessage([" , ctx . toString ( ) ) ) ; for ( org . openstack . atlas . api . validation . results . ExpectationResult er : ers ) { sb . append ( java . lang . String . format ( "%s" , er . getMessage ( ) ) ) ; sb . append ( "])" ) ; } } else { sb . append ( java . lang . String . format ( "On<sp>%s<sp>All<sp>Expectations<sp>PASSED\n" , ctx . toString ( ) ) ) ; } return sb . toString ( ) ; }
org . junit . Assert . assertFalse ( resultMessage ( result , org . openstack . atlas . api . mgmt . validation . validators . POST ) , result . passedValidation ( ) )
testSampleIndexDBAdaptor ( ) { java . util . List < java . util . List < org . opencb . biodata . models . core . Region > > regionLists = java . util . Arrays . asList ( null , java . util . Arrays . asList ( new org . opencb . biodata . models . core . Region ( "1" , 1000 , 300000 ) ) ) ; for ( java . util . List < org . opencb . biodata . models . core . Region > regions : regionLists ) { org . apache . commons . lang3 . time . StopWatch stopWatch = org . apache . commons . lang3 . time . StopWatch . createStarted ( ) ; long actualCount = ( ( org . opencb . opencga . storage . hadoop . variant . HadoopVariantStorageEngine ) ( variantStorageEngine ) ) . getSampleIndexDBAdaptor ( ) . count ( regions , "S_1" , "NA12877" , java . util . Arrays . asList ( "0/1" , "1/1" ) ) ; org . opencb . commons . datastore . core . Query query = new org . opencb . commons . datastore . core . Query ( VariantQueryParam . STUDY . key ( ) , "S_1" ) . append ( VariantQueryParam . SAMPLE . key ( ) , "NA12877" ) ; if ( regions != null ) { query . append ( VariantQueryParam . REGION . key ( ) , regions ) ; } System . out . println ( ( "Count<sp>indexTable<sp>" + ( ( stopWatch . getTime ( TimeUnit . MILLISECONDS ) ) / 1000.0 ) ) ) ; System . out . println ( ( "Count<sp>=<sp>" + actualCount ) ) ; stopWatch = org . apache . commons . lang3 . time . StopWatch . createStarted ( ) ; long expectedCount = dbAdaptor . count ( query ) . first ( ) ; System . out . println ( ( "Count<sp>variants<sp>" + ( ( stopWatch . getTime ( TimeUnit . MILLISECONDS ) ) / 1000.0 ) ) ) ; System . out . println ( ( "Count<sp>=<sp>" + expectedCount ) ) ; System . out . println ( "-----------------------------------" ) ; "<AssertPlaceHolder>" ; } } getTime ( java . util . Date ) { java . text . SimpleDateFormat sdf = new java . text . SimpleDateFormat ( org . opencb . opencga . core . common . TimeUtils . yyyyMMddHHmmss ) ; return sdf . format ( date ) ; }
org . junit . Assert . assertEquals ( expectedCount , actualCount )
testEqualsHashCodeConsistency ( ) { org . pentaho . di . cluster . SlaveServer slave = new org . pentaho . di . cluster . SlaveServer ( ) ; slave . setName ( "slave" ) ; org . pentaho . di . utils . TestUtils . checkEqualsHashCodeConsistency ( slave , slave ) ; org . pentaho . di . cluster . SlaveServer slaveSame = new org . pentaho . di . cluster . SlaveServer ( ) ; slaveSame . setName ( "slave" ) ; "<AssertPlaceHolder>" ; org . pentaho . di . utils . TestUtils . checkEqualsHashCodeConsistency ( slave , slaveSame ) ; org . pentaho . di . cluster . SlaveServer slaveCaps = new org . pentaho . di . cluster . SlaveServer ( ) ; slaveCaps . setName ( "SLAVE" ) ; org . pentaho . di . utils . TestUtils . checkEqualsHashCodeConsistency ( slave , slaveCaps ) ; org . pentaho . di . cluster . SlaveServer slaveOther = new org . pentaho . di . cluster . SlaveServer ( ) ; slaveOther . setName ( "something<sp>else" ) ; org . pentaho . di . utils . TestUtils . checkEqualsHashCodeConsistency ( slave , slaveOther ) ; } equals ( java . lang . Object ) { if ( ( obj == null ) || ( ( name ) == null ) ) { return false ; } return name . equals ( ( ( org . pentaho . di . partition . PartitionSchema ) ( obj ) ) . name ) ; }
org . junit . Assert . assertTrue ( slave . equals ( slaveSame ) )
testSubsituteSql ( ) { java . util . Map < java . lang . String , java . lang . String > variables = new java . util . HashMap ( ) ; variables . put ( "level" , "4" ) ; variables . put ( "id" , "abc" ) ; java . lang . String sql = "select<sp>*<sp>from<sp>datavalue<sp>where<sp>level=${level}<sp>and<sp>id='${id}'" ; java . lang . String expected = "select<sp>*<sp>from<sp>datavalue<sp>where<sp>level=4<sp>and<sp>id='abc'" ; java . lang . String actual = org . hisp . dhis . sqlview . SqlViewUtils . substituteSqlVariables ( sql , variables ) ; "<AssertPlaceHolder>" ; } substituteSqlVariables ( java . lang . String , java . util . Map ) { java . lang . String sqlQuery = sql ; if ( variables != null ) { for ( java . lang . String param : variables . keySet ( ) ) { if ( ( param != null ) && ( org . hisp . dhis . sqlview . SqlView . isValidQueryParam ( param ) ) ) { final java . lang . String regex = ( "\\$\\{(" + param ) + ")\\}" ; final java . lang . String value = variables . get ( param ) ; if ( ( value != null ) && ( org . hisp . dhis . sqlview . SqlView . isValidQueryValue ( value ) ) ) { sqlQuery = sqlQuery . replaceAll ( regex , value ) ; } } } } return sqlQuery ; }
org . junit . Assert . assertEquals ( expected , actual )
testCipherPerf ( ) { byte [ ] keyBytes = new java . security . SecureRandom ( ) . generateSeed ( 16 ) ; javax . crypto . spec . SecretKeySpec key = new javax . crypto . spec . SecretKeySpec ( keyBytes , "AES" ) ; javax . crypto . Cipher encCipher = javax . crypto . Cipher . getInstance ( "AES/ECB/PKCS5Padding" ) ; javax . crypto . Cipher decCipher = javax . crypto . Cipher . getInstance ( "AES/ECB/PKCS5Padding" ) ; encCipher . init ( Cipher . ENCRYPT_MODE , key ) ; decCipher . init ( Cipher . DECRYPT_MODE , key ) ; java . lang . String expected = "Hello<sp>World!!" ; while ( ( expected . length ( ) ) < 100 ) expected += "<sp>123456789" ; net . openhft . chronicle . bytes . Bytes bytes = net . openhft . chronicle . bytes . Bytes . allocateDirect ( expected . getBytes ( ) ) ; net . openhft . chronicle . bytes . Bytes enc = net . openhft . chronicle . bytes . Bytes . allocateElasticDirect ( ) ; net . openhft . chronicle . bytes . Bytes dec = net . openhft . chronicle . bytes . Bytes . allocateElasticDirect ( ) ; net . openhft . chronicle . core . util . Histogram hist = new net . openhft . chronicle . core . util . Histogram ( ) ; for ( int t = 1 ; t <= 4 ; t ++ ) { for ( int i = 0 ; i < ( t * 100000 ) ; i ++ ) { enc . clear ( ) ; dec . clear ( ) ; long start = java . lang . System . nanoTime ( ) ; bytes . cipher ( encCipher , enc ) ; enc . cipher ( decCipher , dec ) ; long time = ( java . lang . System . nanoTime ( ) ) - start ; hist . sampleNanos ( time ) ; } "<AssertPlaceHolder>" ; System . out . println ( ( "Encrypt/Decrypt<sp>took<sp>" + ( hist . toMicrosFormat ( ) ) ) ) ; } bytes . release ( ) ; enc . release ( ) ; dec . release ( ) ; } toString ( ) { try { return net . openhft . chronicle . bytes . BytesInternal . toString ( this ) ; } catch ( java . lang . Exception e ) { return e . toString ( ) ; } }
org . junit . Assert . assertEquals ( expected , dec . toString ( ) )
convertToShortNull ( ) { java . lang . Short out = converter . toShort ( null ) ; "<AssertPlaceHolder>" ; } toShort ( java . lang . Long ) { if ( value == null ) { return null ; } if ( ( value > ( Short . MAX_VALUE ) ) || ( value < ( Short . MIN_VALUE ) ) ) { throw new io . atlasmap . api . AtlasConversionException ( java . lang . String . format ( "Long<sp>%s<sp>is<sp>greater<sp>than<sp>Short.MAX_VALUE<sp>or<sp>less<sp>than<sp>Short.MIN_VALUE" , value ) ) ; } return value . shortValue ( ) ; }
org . junit . Assert . assertNull ( out )
testPlainCurveKeys ( ) { byte [ ] [ ] serverKeyPair = new zmq . io . mechanism . curve . Curve ( ) . keypair ( ) ; byte [ ] serverPublicKey = serverKeyPair [ 0 ] ; byte [ ] serverSecretKey = serverKeyPair [ 1 ] ; byte [ ] [ ] clientKeyPair = new zmq . io . mechanism . curve . Curve ( ) . keypair ( ) ; byte [ ] clientPublicKey = clientKeyPair [ 0 ] ; byte [ ] clientSecretKey = clientKeyPair [ 1 ] ; zmq . Ctx context = zmq . ZMQ . createContext ( ) ; zmq . SocketBase server = context . createSocket ( ZMQ . ZMQ_DEALER ) ; zmq . ZMQ . setSocketOption ( server , ZMQ . ZMQ_CURVE_SERVER , true ) ; zmq . ZMQ . setSocketOption ( server , ZMQ . ZMQ_CURVE_SECRETKEY , serverSecretKey ) ; server . bind ( connectionString ) ; zmq . SocketBase client = context . createSocket ( ZMQ . ZMQ_DEALER ) ; zmq . ZMQ . setSocketOption ( client , ZMQ . ZMQ_CURVE_SERVERKEY , serverPublicKey ) ; zmq . ZMQ . setSocketOption ( client , ZMQ . ZMQ_CURVE_PUBLICKEY , clientPublicKey ) ; zmq . ZMQ . setSocketOption ( client , ZMQ . ZMQ_CURVE_SECRETKEY , clientSecretKey ) ; client . connect ( connectionString ) ; byte [ ] testBytes = "hello-world" . getBytes ( ) ; zmq . ZMQ . send ( client , testBytes , 0 ) ; byte [ ] recv = zmq . ZMQ . recv ( server , 0 ) . data ( ) ; "<AssertPlaceHolder>" ; server . close ( ) ; client . close ( ) ; context . terminate ( ) ; } is ( int ) { return ( get ( ) ) == err ; }
org . junit . Assert . assertThat ( recv , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( testBytes ) ) )
testSerialization ( ) { org . jfree . chart . urls . StandardCategoryURLGenerator g1 = new org . jfree . chart . urls . StandardCategoryURLGenerator ( "index.html?" ) ; org . jfree . chart . urls . StandardCategoryURLGenerator g2 = ( ( org . jfree . chart . urls . StandardCategoryURLGenerator ) ( org . jfree . chart . TestUtilities . serialised ( g1 ) ) ) ; "<AssertPlaceHolder>" ; } serialised ( java . lang . Object ) { java . lang . Object result = null ; java . io . ByteArrayOutputStream buffer = new java . io . ByteArrayOutputStream ( ) ; java . io . ObjectOutput out ; try { out = new java . io . ObjectOutputStream ( buffer ) ; out . writeObject ( original ) ; out . close ( ) ; java . io . ObjectInput in = new java . io . ObjectInputStream ( new java . io . ByteArrayInputStream ( buffer . toByteArray ( ) ) ) ; result = in . readObject ( ) ; in . close ( ) ; } catch ( java . io . IOException e ) { throw new java . lang . RuntimeException ( e ) ; } catch ( java . lang . ClassNotFoundException e ) { throw new java . lang . RuntimeException ( e ) ; } return result ; }
org . junit . Assert . assertEquals ( g1 , g2 )
testGetColumnRowVector ( ) { org . nd4j . linalg . api . ndarray . INDArray arr = org . nd4j . linalg . factory . Nd4j . create ( 1 , 4 ) ; org . nd4j . linalg . api . ndarray . INDArray col = arr . getColumn ( 0 ) ; System . out . println ( org . nd4j . linalg . Arrays . toString ( col . shape ( ) ) ) ; "<AssertPlaceHolder>" ; } shape ( ) { return sameDiff . shape ( this ) ; }
org . junit . Assert . assertArrayEquals ( new long [ ] { 1 , 1 } , col . shape ( ) )
download ( ) { await ( io . datakernel . csp . ChannelSupplier . of ( wrapUtf8 ( io . global . fs . GlobalFsTest . SIMPLE_CONTENT ) ) . streamTo ( await ( firstAliceAdapter . upload ( io . global . fs . GlobalFsTest . FILENAME ) ) ) ) ; byte [ ] data = await ( await ( firstAliceAdapter . download ( io . global . fs . GlobalFsTest . FILENAME ) ) . toCollector ( io . datakernel . bytebuf . ByteBufQueue . collector ( ) ) ) . asArray ( ) ; "<AssertPlaceHolder>" ; } asArray ( ) { java . lang . Object [ ] result = new java . lang . Object [ scheme . rawIndices . length ] ; getInto ( result ) ; return result ; }
org . junit . Assert . assertArrayEquals ( io . global . fs . GlobalFsTest . SIMPLE_CONTENT . getBytes ( io . global . fs . UTF_8 ) , data )
testOldGunMethodCompatibility ( ) { pl . jgwozdz . brickcommand . brick . ev3 . CounterSequence . getDefault ( ) . reset ( ) ; byte [ ] newMessage = new pl . jgwozdz . brickcommand . brick . ev3 . TextEV3Command ( "Mailbox<sp>1" , "This<sp>is<sp>a<sp>message" ) . getAllBytes ( ) ; byte [ ] oldMessage = new pl . jgwozdz . brickcommand . brick . ev3 . TextEV3CommandTest . OldEV3MessageBuilder ( ) . createMessage ( "Mailbox<sp>1" , "This<sp>is<sp>a<sp>message" ) ; "<AssertPlaceHolder>" ; } createMessage ( java . lang . String , java . lang . String ) { byte [ ] bytes = ( text + "
org . junit . Assert . assertArrayEquals ( oldMessage , newMessage )
testLogin ( ) { com . iluwatar . pageobject . pages . AlbumListPage albumListPage = loginPage . enterUsername ( "admin" ) . enterPassword ( "password" ) . login ( ) ; albumListPage . navigateToPage ( ) ; "<AssertPlaceHolder>" ; } isAt ( ) { return "Album<sp>Page" . equals ( page . getTitleText ( ) ) ; }
org . junit . Assert . assertTrue ( albumListPage . isAt ( ) )
deveObterValorUnitarioTributavelComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe310 . classes . nota . NFNotaInfoItemProduto produto = new com . fincatto . documentofiscal . nfe310 . 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 ( ) )
shouldAutotypeIntegerProperties ( ) { final org . apache . tinkerpop . gremlin . structure . Vertex v = graph . addVertex ( ) ; v . property ( VertexProperty . Cardinality . single , "integer" , 33 ) ; final java . lang . Integer age = v . value ( "integer" ) ; "<AssertPlaceHolder>" ; } value ( java . lang . String ) { return this . element . value ( key ) ; }
org . junit . Assert . assertEquals ( java . lang . Integer . valueOf ( 33 ) , age )
test ( ) { com . querydsl . core . types . dsl . NumberExpression < java . math . BigDecimal > sum = QMoney . money . sum ( ) ; "<AssertPlaceHolder>" ; } sum ( ) { query ( ) . from ( cat ) . select ( cat . kittens . size ( ) . sum ( ) ) . parse ( ) ; }
org . junit . Assert . assertNotNull ( sum )
testQueryUsingNameAndStartAndEndWithLTOperatorNoMatch ( ) { org . openhab . core . persistence . FilterCriteria criteria = new org . openhab . core . persistence . FilterCriteria ( ) ; criteria . setOperator ( Operator . LT ) ; criteria . setState ( getFirstItemState ( ) ) ; criteria . setItemName ( getItemName ( ) ) ; criteria . setBeginDate ( org . openhab . persistence . dynamodb . internal . AbstractTwoItemIntegrationTest . beforeStore ) ; criteria . setEndDate ( org . openhab . persistence . dynamodb . internal . AbstractTwoItemIntegrationTest . afterStore2 ) ; java . lang . Iterable < org . openhab . core . persistence . HistoricItem > iterable = BaseIntegrationTest . service . query ( criteria ) ; java . util . Iterator < org . openhab . core . persistence . HistoricItem > iterator = iterable . iterator ( ) ; "<AssertPlaceHolder>" ; } hasNext ( ) { return inner . hasNext ( ) ; }
org . junit . Assert . assertFalse ( iterator . hasNext ( ) )
testSyntacticVariations ( ) { org . apache . commons . jexl3 . JexlScript script = org . apache . commons . jexl3 . JEXL . createScript ( "sum(TOTAL)<sp>-<sp>partial.sum()<sp>+<sp>partial['sub'].avg()<sp>-<sp>sum(partial.sub)" ) ; java . util . Set < java . util . List < java . lang . String > > vars = script . getVariables ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return size ; }
org . junit . Assert . assertTrue ( ( ( vars . size ( ) ) == 3 ) )
testTypeDescriptorsIterables ( ) { org . apache . beam . sdk . values . TypeDescriptor < java . lang . Iterable < java . lang . String > > descriptor = org . apache . beam . sdk . values . TypeDescriptors . iterables ( org . apache . beam . sdk . values . TypeDescriptors . strings ( ) ) ; "<AssertPlaceHolder>" ; } strings ( ) { return new org . apache . beam . sdk . values . TypeDescriptor < java . lang . String > ( ) { } ; }
org . junit . Assert . assertEquals ( descriptor , new org . apache . beam . sdk . values . TypeDescriptor < java . lang . Iterable < java . lang . String > > ( ) { } )
testGetEffectiveMinorVersion ( ) { final com . ibm . ws . container . service . metadata . MetaDataService mds = context . mock ( com . ibm . ws . container . service . metadata . MetaDataService . class ) ; final com . ibm . websphere . csi . J2EENameFactory jnf = context . mock ( com . ibm . websphere . csi . J2EENameFactory . class ) ; com . ibm . ws . webcontainer . osgi . webapp . WebAppConfiguration webAppConfig = new com . ibm . ws . webcontainer . osgi . webapp . WebAppConfiguration ( null , "name" ) ; com . ibm . ws . webcontainer31 . osgi . webapp . WebApp31 webApp = new com . ibm . ws . webcontainer31 . osgi . webapp . WebApp31 ( webAppConfig , null , null , mds , jnf , null ) ; webApp . withinContextInitOfProgAddListener = true ; boolean caughtUnsupportedOperationException = false ; try { webApp . getEffectiveMinorVersion ( ) ; } catch ( java . lang . UnsupportedOperationException uoe ) { caughtUnsupportedOperationException = true ; } "<AssertPlaceHolder>" ; com . ibm . ws . threadContext . ComponentMetaDataAccessorImpl . getComponentMetaDataAccessor ( ) . endContext ( ) ; } getEffectiveMinorVersion ( ) { return context . getEffectiveMinorVersion ( ) ; }
org . junit . Assert . assertTrue ( caughtUnsupportedOperationException )
testGetStat ( ) { try { me . haosdent . cgroup . subsystem . MemoryTest . one . getMemory ( ) . getPhysicalUsage ( ) ; } catch ( java . io . IOException e ) { me . haosdent . cgroup . subsystem . MemoryTest . LOG . error ( "Set<sp>usage_in_bytes<sp>failed." , e ) ; "<AssertPlaceHolder>" ; } } getPhysicalUsage ( ) { java . lang . String result = shell . cgget ( group . getName ( ) , me . haosdent . cgroup . subsystem . Memory . PROP_MEMORY_USAGE_IN_BYTES ) ; return java . lang . Long . parseLong ( result ) ; }
org . junit . Assert . assertTrue ( false )
shouldCountCustomMethodWithBefore ( ) { java . lang . String documentId = randomNumeric ( 5 ) ; org . springframework . data . elasticsearch . entities . SampleEntity sampleEntity = new org . springframework . data . elasticsearch . entities . SampleEntity ( ) ; sampleEntity . setId ( documentId ) ; sampleEntity . setType ( "test" ) ; sampleEntity . setRate ( 10 ) ; sampleEntity . setMessage ( "some<sp>message" ) ; repository . save ( sampleEntity ) ; documentId = randomNumeric ( 5 ) ; org . springframework . data . elasticsearch . entities . SampleEntity sampleEntity2 = new org . springframework . data . elasticsearch . entities . SampleEntity ( ) ; sampleEntity2 . setId ( documentId ) ; sampleEntity2 . setType ( "test" ) ; sampleEntity2 . setRate ( 20 ) ; sampleEntity2 . setMessage ( "some<sp>message" ) ; repository . save ( sampleEntity2 ) ; long count = repository . countByRateBefore ( 10 ) ; "<AssertPlaceHolder>" ; } is ( java . lang . Object ) { queryCriteria . add ( new org . springframework . data . elasticsearch . core . query . Criteria . CriteriaEntry ( org . springframework . data . elasticsearch . core . query . Criteria . OperationKey . EQUALS , o ) ) ; return this ; }
org . junit . Assert . assertThat ( count , is ( equalTo ( 1L ) ) )
readBean_hasBindings_singleEventOnLoad ( ) { binder . forField ( nameField ) . bind ( Person :: getFirstName , Person :: setFirstName ) ; binder . addStatusChangeListener ( this :: statusChanged ) ; "<AssertPlaceHolder>" ; binder . readBean ( item ) ; verifyEvent ( ) ; } get ( ) { return com . vaadin . flow . dom . impl . BasicTextElementStateProvider . INSTANCE ; }
org . junit . Assert . assertNull ( event . get ( ) )
testGetFallback ( ) { org . orbisgis . legend . thematic . recode . RecodedPoint ra = getRecodedPoint ( ) ; org . orbisgis . legend . thematic . PointParameters fb = ra . getFallbackParameters ( ) ; org . orbisgis . legend . thematic . PointParameters t = new org . orbisgis . legend . thematic . PointParameters ( new org . orbisgis . legend . thematic . Color ( 51 , 85 , 103 ) , 1.0 , 0.4 , "" , new org . orbisgis . legend . thematic . Color ( 51 , 85 , 102 ) , 0.9 , 5.0 , 4.0 , "CIRCLE" ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( o instanceof org . orbisgis . legend . thematic . PointParameters ) { org . orbisgis . legend . thematic . PointParameters other = ( ( org . orbisgis . legend . thematic . PointParameters ) ( o ) ) ; boolean sup = super . equals ( other ) ; return ( ( sup && ( this . wkn . equals ( other . wkn ) ) ) && ( this . height . equals ( other . height ) ) ) && ( this . width . equals ( other . width ) ) ; } else { return false ; } }
org . junit . Assert . assertTrue ( t . equals ( fb ) )
whenEvenNumberTwoInStreamThenResultTrue ( ) { vkaretko . EvenNumber number = new vkaretko . EvenNumber ( ) ; try ( java . io . ByteArrayInputStream stream = new java . io . ByteArrayInputStream ( "2" . getBytes ( ) ) ) { "<AssertPlaceHolder>" ; } catch ( java . io . IOException ioe ) { ioe . printStackTrace ( ) ; } } isNumber ( java . io . InputStream ) { boolean result = false ; java . util . Scanner sc = new java . util . Scanner ( in ) ; while ( sc . hasNextInt ( ) ) { if ( ( ( sc . nextInt ( ) ) % 2 ) == 0 ) { result = true ; } } return result ; }
org . junit . Assert . assertThat ( number . isNumber ( stream ) , org . hamcrest . core . Is . is ( true ) )
testGetPartition_configPartitionsChanged ( ) { java . util . Map < java . lang . String , java . util . List < com . taobao . metamorphosis . cluster . Partition > > map = new java . util . HashMap < java . lang . String , java . util . List < com . taobao . metamorphosis . cluster . Partition > > ( ) ; map . put ( com . taobao . metamorphosis . client . extension . producer . OrderedMessagePartitionSelectorUnitTest . testTopic , java . util . Arrays . asList ( new com . taobao . metamorphosis . cluster . Partition ( "1-0" ) , new com . taobao . metamorphosis . cluster . Partition ( "1-1" ) , new com . taobao . metamorphosis . cluster . Partition ( "2-0" ) ) ) ; this . selector . setConfigPartitions ( map ) ; com . taobao . metamorphosis . Message message = this . createDefaultMessage ( ) ; com . taobao . metamorphosis . cluster . Partition partition = this . selector . getPartition ( message . getTopic ( ) , java . util . Arrays . asList ( new com . taobao . metamorphosis . cluster . Partition ( "0-0" ) , new com . taobao . metamorphosis . cluster . Partition ( "1-0" ) , new com . taobao . metamorphosis . cluster . Partition ( "2-0" ) ) , message ) ; "<AssertPlaceHolder>" ; } getTopic ( ) { return topic ; }
org . junit . Assert . assertEquals ( new com . taobao . metamorphosis . cluster . Partition ( "0-0" ) , partition )
xmlFileWellFormedWithFailIfNoFileTest ( ) { java . lang . String xmlFilePath = getClass ( ) . getResource ( "xml-sample.xml" ) . getPath ( ) ; boolean wellFormed = org . pentaho . di . core . row . ValueDataUtil . isXMLFileWellFormed ( new org . pentaho . di . core . row . value . ValueMetaString ( ) , xmlFilePath , true ) ; "<AssertPlaceHolder>" ; } isXMLFileWellFormed ( org . pentaho . di . core . row . ValueMetaInterface , java . lang . Object , boolean ) { if ( dataA == null ) { return false ; } java . lang . String filename = dataA . toString ( ) ; org . apache . commons . vfs2 . FileObject file = null ; try { file = org . pentaho . di . core . vfs . KettleVFS . getFileObject ( filename ) ; org . pentaho . di . core . row . ValueDataUtil . throwsErrorOnFileNotFound ( file ) ; return org . pentaho . di . core . xml . XMLCheck . isXMLFileWellFormed ( file ) ; } catch ( org . pentaho . di . core . exception . KettleFileNotFoundException e ) { if ( failIfNoFile ) { throw e ; } org . pentaho . di . core . row . ValueDataUtil . log . debug ( e . getMessage ( ) ) ; } catch ( java . lang . Exception e ) { org . pentaho . di . core . row . ValueDataUtil . log . debug ( e . getMessage ( ) ) ; } finally { org . apache . commons . io . IOUtils . closeQuietly ( file ) ; } return false ; }
org . junit . Assert . assertTrue ( wellFormed )
testRequestWithInvalidAuthorization ( ) { javax . servlet . http . HttpServletRequest request = org . mockito . Mockito . mock ( javax . servlet . http . HttpServletRequest . class ) ; javax . servlet . http . HttpServletResponse response = org . mockito . Mockito . mock ( javax . servlet . http . HttpServletResponse . class ) ; final org . apache . commons . codec . binary . Base64 base64 = new org . apache . commons . codec . binary . Base64 ( 0 ) ; java . lang . String credentials = "bjones:invalidpassword" ; org . mockito . Mockito . when ( request . getHeader ( HttpConstants . AUTHORIZATION_HEADER ) ) . thenReturn ( base64 . encodeToString ( credentials . getBytes ( ) ) ) ; "<AssertPlaceHolder>" ; org . mockito . Mockito . verify ( response ) . setHeader ( org . apache . hadoop . security . authentication . server . WWW_AUTHENTICATE , HttpConstants . BASIC ) ; org . mockito . Mockito . verify ( response ) . setStatus ( HttpServletResponse . SC_UNAUTHORIZED ) ; } authenticate ( java . net . URL , org . apache . hadoop . security . authentication . client . AuthenticatedURL$Token ) { if ( ! ( hasDelegationToken ( url ) ) ) { super . authenticate ( url , token ) ; } }
org . junit . Assert . assertNull ( handler . authenticate ( request , response ) )
testSetTextAndSelection ( ) { org . eclipse . rap . rwt . testfixture . internal . Fixture . fakePhase ( PhaseId . PROCESS_ACTION ) ; combo . add ( "test" ) ; combo . add ( "test1" ) ; combo . add ( "test2" ) ; combo . addVerifyListener ( new org . eclipse . swt . events . VerifyListener ( ) { @ org . eclipse . swt . widgets . Override public void verifyText ( org . eclipse . swt . events . VerifyEvent event ) { event . text = ( event . text ) + "2" ; } } ) ; combo . setText ( "test" ) ; "<AssertPlaceHolder>" ; } getSelectionIndex ( ) { checkWidget ( ) ; int result = - 1 ; if ( cellSelectionEnabled ) { if ( ( selectedCells . size ( ) ) != 0 ) { result = selectedCells . get ( 0 ) . y ; } } else { if ( ( selectedItems . size ( ) ) != 0 ) { result = items . indexOf ( selectedItems . get ( 0 ) ) ; } } return result ; }
org . junit . Assert . assertEquals ( 2 , combo . getSelectionIndex ( ) )
rootNodeShouldHaveProperType ( ) { javax . jcr . Node rootNode = session . getRootNode ( ) ; javax . jcr . nodetype . NodeType rootNodePrimaryType = rootNode . getPrimaryNodeType ( ) ; javax . jcr . nodetype . NodeType dnaRootType = session . nodeTypeManager ( ) . getNodeType ( ModeShapeLexicon . ROOT ) ; "<AssertPlaceHolder>" ; } getName ( ) { return name ; }
org . junit . Assert . assertThat ( rootNodePrimaryType . getName ( ) , org . hamcrest . core . Is . is ( dnaRootType . getName ( ) ) )
testEquivalence ( ) { byte [ ] a = new byte [ ] { 0 , 3 , 4 , 42 , 2 , 2 } ; byte [ ] b = new byte [ ] { 3 , 4 , 42 } ; org . apache . kylin . common . hll . HyperLogLogPlusCounter ha = new org . apache . kylin . common . hll . HyperLogLogPlusCounter ( ) ; org . apache . kylin . common . hll . HyperLogLogPlusCounter hb = new org . apache . kylin . common . hll . HyperLogLogPlusCounter ( ) ; ha . add ( a , 1 , 3 ) ; hb . add ( b ) ; "<AssertPlaceHolder>" ; } getCountEstimate ( ) { return value ; }
org . junit . Assert . assertTrue ( ( ( ha . getCountEstimate ( ) ) == ( hb . getCountEstimate ( ) ) ) )
testSerializeDeserialize ( ) { final org . eclipse . rdf4j . model . IRI smartUri = org . apache . rya . indexing . smarturi . SmartUriAdapter . serializeUriEntity ( org . apache . rya . indexing . mongo . MongoDbSmartUriIT . BOB_ENTITY ) ; final org . apache . rya . indexing . entity . model . Entity resultEntity = org . apache . rya . indexing . smarturi . SmartUriAdapter . deserializeUriEntity ( smartUri ) ; "<AssertPlaceHolder>" ; } getSubject ( ) { return subject ; }
org . junit . Assert . assertEquals ( org . apache . rya . indexing . mongo . MongoDbSmartUriIT . BOB_ENTITY . getSubject ( ) , resultEntity . getSubject ( ) )
testSpecificSerializeFromClassSeveralTimes ( ) { final org . apache . flink . api . java . tuple . Tuple3 < java . lang . Class < ? extends org . apache . avro . specific . SpecificRecord > , org . apache . avro . specific . SpecificRecord , org . apache . flink . types . Row > testData = org . apache . flink . formats . avro . utils . AvroTestUtils . getSpecificTestData ( ) ; final org . apache . flink . formats . avro . AvroRowSerializationSchema serializationSchema = new org . apache . flink . formats . avro . AvroRowSerializationSchema ( testData . f0 ) ; final org . apache . flink . formats . avro . AvroRowDeserializationSchema deserializationSchema = new org . apache . flink . formats . avro . AvroRowDeserializationSchema ( testData . f0 ) ; serializationSchema . serialize ( testData . f2 ) ; serializationSchema . serialize ( testData . f2 ) ; final byte [ ] bytes = serializationSchema . serialize ( testData . f2 ) ; final org . apache . flink . types . Row actual = deserializationSchema . deserialize ( bytes ) ; "<AssertPlaceHolder>" ; } deserialize ( org . apache . flink . core . memory . DataInputView ) { final int size = source . readInt ( ) ; final java . util . ArrayList < T > list = new java . util . ArrayList ( size ) ; for ( int i = 0 ; i < size ; i ++ ) { list . add ( elementSerializer . deserialize ( source ) ) ; } return list ; }
org . junit . Assert . assertEquals ( testData . f2 , actual )
testSqlgGraphVertices ( ) { java . util . List < org . umlg . sqlg . structure . RecordId > recordIds = new java . util . ArrayList ( ) ; for ( int i = 0 ; i < 10 ; i ++ ) { org . apache . tinkerpop . gremlin . structure . Vertex v = this . sqlgGraph . addVertex ( T . label , "A" ) ; recordIds . add ( ( ( org . umlg . sqlg . structure . RecordId ) ( v . id ( ) ) ) ) ; } this . sqlgGraph . tx ( ) . commit ( ) ; java . util . List < org . apache . tinkerpop . gremlin . structure . Vertex > result = new java . util . ArrayList ( ) ; this . sqlgGraph . vertices ( recordIds . toArray ( ) ) . forEachRemaining ( result :: add ) ; "<AssertPlaceHolder>" ; } size ( ) { return this . cache . size ( ) ; }
org . junit . Assert . assertEquals ( 10 , result . size ( ) )
shouldInitializeTrafficSenderAndUpdateRCVectorsMultipleTimes ( ) { eu . smartenit . sbox . main . NetworkTrafficSenderTest . logger . info ( "--Testing<sp>traffic<sp>sender<sp>initialize.<sp>--" ) ; eu . smartenit . sbox . ntm . NetworkTrafficManager ntm = new eu . smartenit . sbox . ntm . NetworkTrafficManager ( ) ; ntm . initialize ( NetworkTrafficManagerDTMMode . TRAFFIC_SENDER ) ; verify ( postRequestedFor ( urlMatching ( "127.0.0.1" 0 ) ) . withHeader ( "127.0.0.1" 4 , equalTo ( "application/json;<sp>charset=UTF-8" ) ) . withHeader ( "Accept" , equalTo ( "application/json;<sp>q=0.9,*/*;q=0.8" ) ) ) ; eu . smartenit . sbox . main . NetworkTrafficSenderTest . logger . info ( "SDN<sp>Controller<sp>received<sp>configuration<sp>data." ) ; "<AssertPlaceHolder>" ; eu . smartenit . sbox . main . NetworkTrafficSenderTest . logger . info ( "Initializing<sp>inter-sbox-server<sp>with<sp>ntm." ) ; new eu . smartenit . sbox . interfaces . intersbox . server . InterSBoxServer ( eu . smartenit . sbox . commons . SBoxProperties . INTER_SBOX_PORT , ntm ) ; java . lang . Thread . sleep ( 2000 ) ; eu . smartenit . sbox . db . dto . CVector cVector = new eu . smartenit . sbox . db . dto . CVector ( ) ; cVector . setSourceAsNumber ( 100 ) ; cVector . addVectorValueForTunnelEndPrefix ( new eu . smartenit . sbox . db . dto . NetworkAddressIPv4 ( "127.0.0.1" 1 , 24 ) , 500L ) ; eu . smartenit . sbox . db . dto . RVector rVector = new eu . smartenit . sbox . db . dto . RVector ( ) ; rVector . setSourceAsNumber ( 100 ) ; rVector . addVectorValueForTunnelEndPrefix ( new eu . smartenit . sbox . db . dto . NetworkAddressIPv4 ( "127.0.0.1" 1 , 24 ) , 1000L ) ; eu . smartenit . sbox . main . NetworkTrafficSenderTest . logger . info ( "Sending<sp>r<sp>and<sp>c<sp>vectors<sp>through<sp>inter-sbox<sp>client." ) ; for ( int i = 0 ; i < 10 ; i ++ ) { eu . smartenit . sbox . interfaces . intersbox . client . InterSBoxClient client = new eu . smartenit . sbox . interfaces . intersbox . client . InterSBoxClient ( ) ; client . send ( "127.0.0.1" , SBoxProperties . INTER_SBOX_PORT , cVector , rVector ) ; java . lang . Thread . sleep ( 200 ) ; } verify ( 1 , postRequestedFor ( urlEqualTo ( "127.0.0.1" 0 ) ) ) ; verify ( 10 , postRequestedFor ( urlEqualTo ( "127.0.0.1" 3 ) ) ) ; eu . smartenit . sbox . main . NetworkTrafficSenderTest . logger . info ( ( "Verified<sp>that<sp>SDN<sp>controller<sp>received<sp>1<sp>config<sp>data<sp>and<sp>10<sp>updates<sp>" + "127.0.0.1" 2 ) ) ; eu . smartenit . sbox . main . NetworkTrafficSenderTest . logger . info ( "--------------------------" ) ; } initialize ( eu . smartenit . sbox . ntm . NetworkTrafficManagerDTMMode ) { eu . smartenit . sbox . ntm . NetworkTrafficManager . logger . info ( "Initialising<sp>NTM<sp>component<sp>..." ) ; switch ( mode ) { case TRAFFIC_RECEIVER : dtmTrafficManager . initialize ( ) ; break ; case TRAFFIC_SENDER : dtmVectorsReceiver . initialize ( ) ; break ; case TRAFFIC_SENDER_AND_RECEIVER : dtmTrafficManager . initialize ( ) ; dtmVectorsReceiver . initialize ( ) ; } eu . smartenit . sbox . ntm . NetworkTrafficManager . logger . info ( "...<sp>NTM<sp>component<sp>initialization<sp>complete." ) ; }
org . junit . Assert . assertTrue ( true )
testBuild ( ) { java . lang . String expectedAwql = "SELECT<sp>CampaignId,<sp>CampaignName<sp>FROM<sp>CAMPAIGN_PERFORMANCE_REPORT<sp>WHERE<sp>" + "CampaignStatus<sp>=<sp>\"ENABLED\"<sp>DURING<sp>20170101,20170131" ; com . google . api . ads . adwords . lib . utils . ReportQueryInterface reportQuery = new com . google . api . ads . adwords . lib . utils . v201809 . ReportQuery . Builder ( ) . fields ( "CampaignId" , "CampaignName" ) . from ( ReportDefinitionReportType . CAMPAIGN_PERFORMANCE_REPORT ) . where ( "CampaignStatus" ) . equalTo ( "ENABLED" ) . during ( new org . joda . time . LocalDate ( 2017 , 1 , 1 ) , new org . joda . time . LocalDate ( 2017 , 1 , 31 ) ) . build ( ) ; "<AssertPlaceHolder>" ; checkUtilitiesState ( ) ; } toString ( ) { return com . google . common . base . MoreObjects . toStringHelper ( this . getClass ( ) ) . omitNullValues ( ) . add ( "currencyCode" , getCurrencyCode ( ) ) . add ( "id" , getId ( ) ) . add ( "name" , getName ( ) ) . add ( "primaryBillingId" , getPrimaryBillingId ( ) ) . add ( "secondaryBillingId" , getSecondaryBillingId ( ) ) . toString ( ) ; }
org . junit . Assert . assertEquals ( expectedAwql , reportQuery . toString ( ) )
testEmptyLine ( ) { replay ( lineProcessorsMock ) ; fontLoader . load ( fontRenderer , null , createInputStream ( "\n" . getBytes ( "ISO-8859-1" ) ) , "somename.fnt" , 0 , 0 , "" ) ; "<AssertPlaceHolder>" ; } createInputStream ( byte [ ] ) { java . io . InputStream in = new java . io . ByteArrayInputStream ( data ) { @ org . jglfont . format . angelcode . Override public void close ( ) throws java . io . IOException { super . close ( ) ; closeCalled = true ; } } ; return in ; }
org . junit . Assert . assertTrue ( closeCalled )
testMarshalEmptyTree ( ) { org . apache . directory . server . core . avltree . AvlTreeMarshaller < java . lang . Integer > treeMarshaller = createTreeMarshaller ( ) ; byte [ ] bites = treeMarshaller . serialize ( new org . apache . directory . server . core . avltree . AvlTreeImpl < java . lang . Integer > ( org . apache . directory . server . core . avltree . AvlTreeMarshallerTest . comparator ) ) ; org . apache . directory . server . core . avltree . AvlTree < java . lang . Integer > tree = treeMarshaller . deserialize ( bites ) ; "<AssertPlaceHolder>" ; } deserialize ( byte [ ] ) { if ( ( ( bytes == null ) || ( ( bytes . length ) != ( org . apache . directory . server . core . partition . impl . btree . jdbm . BTreeRedirectMarshaller . SIZE ) ) ) || ( ( bytes [ 0 ] ) != 1 ) ) { if ( bytes != null ) { throw new java . io . IOException ( org . apache . directory . server . i18n . I18n . err ( I18n . ERR_568 , org . apache . directory . api . util . Strings . dumpBytes ( bytes ) ) ) ; } else { throw new java . io . IOException ( org . apache . directory . server . i18n . I18n . err ( I18n . ERR_569 ) ) ; } } long recId = ( ( ( ( ( ( ( ( ( long ) ( ( bytes [ 1 ] ) & 255 ) ) << 56 ) | ( ( ( long ) ( ( bytes [ 2 ] ) & 255 ) ) << 48 ) ) | ( ( ( long ) ( ( bytes [ 3 ] ) & 255 ) ) << 40 ) ) | ( ( ( long ) ( ( bytes [ 4 ] ) & 255 ) ) << 32 ) ) | ( ( ( long ) ( ( bytes [ 5 ] ) & 255 ) ) << 24 ) ) | ( ( ( long ) ( ( bytes [ 6 ] ) & 255 ) ) << 16 ) ) | ( ( ( long ) ( ( bytes [ 7 ] ) & 255 ) ) << 8 ) ) | ( ( long ) ( ( bytes [ 8 ] ) & 255 ) ) ; return new org . apache . directory . server . core . partition . impl . btree . jdbm . BTreeRedirect ( recId ) ; }
org . junit . Assert . assertNotNull ( tree )
removeIPv4 ( ) { org . opennaas . extensions . router . capability . ip . IIPCapability ipCapability = ( ( org . opennaas . extensions . router . capability . ip . IIPCapability ) ( routerResource . getCapability ( org . opennaas . itests . helpers . InitializerTestHelper . getCapabilityInformation ( TestsConstants . IP_CAPABILITY_TYPE ) ) ) ) ; ipCapability . removeIPv4 ( org . opennaas . itests . router . helpers . ParamCreationHelper . getLogicalPort ( ) , org . opennaas . itests . router . helpers . ParamCreationHelper . getIPProtocolEndPoint ( ) ) ; org . opennaas . extensions . queuemanager . IQueueManagerCapability queueCapability = ( ( org . opennaas . extensions . queuemanager . IQueueManagerCapability ) ( routerResource . getCapability ( org . opennaas . itests . helpers . InitializerTestHelper . getCapabilityInformation ( TestsConstants . QUEUE_CAPABILIY_TYPE ) ) ) ) ; org . opennaas . core . resources . queue . QueueResponse queueResponse = ( ( org . opennaas . core . resources . queue . QueueResponse ) ( queueCapability . execute ( ) ) ) ; "<AssertPlaceHolder>" ; } isOk ( ) { for ( org . opennaas . core . resources . action . ActionResponse action : responses ) { if ( ( action . getStatus ( ) ) == ( org . opennaas . core . resources . action . ActionResponse . STATUS . ERROR ) ) return false ; } return ( getConfirmResponse ( ) . getStatus ( ) . equals ( STATUS . OK ) ) && ( getRefreshResponse ( ) . getStatus ( ) . equals ( STATUS . OK ) ) ; }
org . junit . Assert . assertTrue ( queueResponse . isOk ( ) )
shouldAddPITToTheBootClassPath ( ) { final java . lang . String actual = getGeneratedManifestAttribute ( JarCreatingJarFinder . BOOT_CLASSPATH ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == obj ) { return true ; } if ( obj == null ) { return false ; } if ( ( getClass ( ) ) != ( obj . getClass ( ) ) ) { return false ; } final org . pitest . mutationtest . report . html . PackageSummaryData other = ( ( org . pitest . mutationtest . report . html . PackageSummaryData ) ( obj ) ) ; if ( ( this . packageName ) == null ) { if ( ( other . packageName ) != null ) { return false ; } } else if ( ! ( this . packageName . equals ( other . packageName ) ) ) { return false ; } return true ; }
org . junit . Assert . assertTrue ( ( ! ( actual . equals ( "" ) ) ) )
testIsBuildingFalseSomethingElseIs ( ) { com . sonymobile . tools . gerrit . gerritevents . dto . events . PatchsetCreated event = com . sonyericsson . hudson . plugins . gerrit . trigger . mock . Setup . createPatchsetCreated ( ) ; com . sonyericsson . hudson . plugins . gerrit . trigger . gerritnotifier . model . BuildMemory instance = new com . sonyericsson . hudson . plugins . gerrit . trigger . gerritnotifier . model . BuildMemory ( ) ; com . sonymobile . tools . gerrit . gerritevents . dto . events . PatchsetCreated event2 = com . sonyericsson . hudson . plugins . gerrit . trigger . mock . Setup . createPatchsetCreated ( ) ; event2 . getChange ( ) . setNumber ( ( ( event . getChange ( ) . getNumber ( ) ) + 34 ) ) ; instance . started ( event2 , build ) ; "<AssertPlaceHolder>" ; } isBuilding ( com . sonymobile . tools . gerrit . gerritevents . dto . events . GerritTriggeredEvent ) { com . sonyericsson . hudson . plugins . gerrit . trigger . gerritnotifier . model . BuildMemory . MemoryImprint pb = memory . get ( event ) ; return pb != null ; }
org . junit . Assert . assertFalse ( instance . isBuilding ( event ) )
testEmptyCommands ( ) { java . io . File tmpRoot = com . addthis . basis . util . LessFiles . createTempDir ( ) ; java . lang . System . setProperty ( "SPAWN_DATA_DIR" , ( tmpRoot + "/tmp/spawn/data" ) ) ; java . lang . System . setProperty ( "SPAWN_LOG_DIR" , ( tmpRoot + "/tmp/spawn/log/events" ) ) ; try ( com . addthis . hydra . job . spawn . Spawn spawn = com . addthis . codec . config . Configs . newDefault ( com . addthis . hydra . job . spawn . Spawn . class ) ) { "<AssertPlaceHolder>" ; } finally { com . addthis . basis . util . LessFiles . deleteDir ( tmpRoot ) ; } } getJobCommandManager ( ) { return jobCommandManager ; }
org . junit . Assert . assertEquals ( 0 , spawn . getJobCommandManager ( ) . size ( ) )
testGetBoolean02 ( ) { org . dresdenocl . modelinstancetype . types . IModelInstanceBoolean modelInstanceBoolean ; modelInstanceBoolean = org . dresdenocl . modelinstancetype . types . base . BasisJavaModelInstanceFactory . createModelInstanceBoolean ( false ) ; "<AssertPlaceHolder>" ; } getBoolean ( ) { return booleanEDataType ; }
org . junit . Assert . assertFalse ( modelInstanceBoolean . getBoolean ( ) )
testDynamicQueryByPrimaryKeyMissing ( ) { com . liferay . portal . kernel . dao . orm . DynamicQuery dynamicQuery = com . liferay . portal . kernel . dao . orm . DynamicQueryFactoryUtil . forClass ( com . liferay . wiki . model . WikiPageResource . class , _dynamicQueryClassLoader ) ; dynamicQuery . add ( com . liferay . portal . kernel . dao . orm . RestrictionsFactoryUtil . eq ( "resourcePrimKey" , com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ) ) ; java . util . List < com . liferay . wiki . model . WikiPageResource > result = _persistence . findWithDynamicQuery ( dynamicQuery ) ; "<AssertPlaceHolder>" ; } size ( ) { if ( ( _workflowTaskAssignees ) != null ) { return _workflowTaskAssignees . size ( ) ; } return _kaleoTaskAssignmentInstanceLocalService . getKaleoTaskAssignmentInstancesCount ( _kaleoTaskInstanceToken . getKaleoTaskInstanceTokenId ( ) ) ; }
org . junit . Assert . assertEquals ( 0 , result . size ( ) )
test_total_size ( ) { int SIZE = 100 ; com . philvarner . clamavj . test . ArbitraryInputStream is = new com . philvarner . clamavj . test . ArbitraryInputStream ( SIZE ) ; is . read ( new byte [ SIZE ] , 0 , SIZE ) ; "<AssertPlaceHolder>" ; } read ( byte [ ] , int , int ) { if ( ( bytes . length ) < ( offset + length ) ) throw new java . lang . IllegalArgumentException ( "bytes.length<sp><<sp>offset<sp>+<sp>length" ) ; if ( ( totalSize ) == ( currentOffset ) ) return - 1 ; if ( ( totalSize ) < 0 ) { } else if ( ( ( totalSize ) - ( currentOffset ) ) < length ) { length = ( totalSize ) - ( currentOffset ) ; currentOffset = ( currentOffset ) + length ; } else { currentOffset = ( currentOffset ) + length ; } for ( int i = offset ; i < ( offset + length ) ; i ++ ) bytes [ i ] = 1 ; return length ; }
org . junit . Assert . assertEquals ( ( - 1 ) , is . read ( new byte [ SIZE ] , 0 , 1 ) )
testWithoutHtmlStylesheetOption ( ) { java . nio . file . Path htmlReportPath = java . nio . file . Paths . get ( java . lang . System . getProperty ( "user.dir" ) , "target" , ( ( japicmp . output . xml . XmlOutputGeneratorTest . class . getSimpleName ( ) ) + "_without.html" ) ) ; japicmp . config . Options options = japicmp . config . Options . newDefault ( ) ; options . setHtmlOutputFile ( japicmp . util . Optional . of ( htmlReportPath . toString ( ) ) ) ; generateHtmlReport ( options ) ; boolean foundStyleSheet = false ; java . util . List < java . lang . String > lines = java . nio . file . Files . readAllLines ( htmlReportPath , java . nio . charset . Charset . forName ( "UTF-8" ) ) ; for ( java . lang . String line : lines ) { if ( line . contains ( "font-family:<sp>Verdana;" ) ) { foundStyleSheet = true ; } } "<AssertPlaceHolder>" ; } generateHtmlReport ( japicmp . config . Options ) { java . util . List < japicmp . model . JApiClass > jApiClasses = new java . util . ArrayList ( ) ; japicmp . cmp . JarArchiveComparatorOptions jarArchiveComparatorOptions = japicmp . cmp . JarArchiveComparatorOptions . of ( options ) ; japicmp . model . JApiClassType classType = new japicmp . model . JApiClassType ( japicmp . util . Optional . < japicmp . model . JApiClassType . ClassType > absent ( ) , japicmp . util . Optional . < japicmp . model . JApiClassType . ClassType > absent ( ) , japicmp . model . JApiChangeStatus . REMOVED ) ; jApiClasses . add ( new japicmp . model . JApiClass ( new japicmp . cmp . JarArchiveComparator ( jarArchiveComparatorOptions ) , "japicmp.Test" , japicmp . util . Optional . < javassist . CtClass > absent ( ) , japicmp . util . Optional . < javassist . CtClass > absent ( ) , japicmp . model . JApiChangeStatus . NEW , classType ) ) ; japicmp . output . xml . XmlOutputGeneratorOptions xmlOutputGeneratorOptions = new japicmp . output . xml . XmlOutputGeneratorOptions ( ) ; xmlOutputGeneratorOptions . setCreateSchemaFile ( true ) ; japicmp . output . xml . XmlOutputGenerator generator = new japicmp . output . xml . XmlOutputGenerator ( jApiClasses , options , xmlOutputGeneratorOptions ) ; japicmp . output . xml . XmlOutput xmlOutput = generator . generate ( ) ; japicmp . output . xml . XmlOutputGenerator . writeToFiles ( options , xmlOutput ) ; }
org . junit . Assert . assertThat ( foundStyleSheet , org . hamcrest . core . Is . is ( true ) )
testMessageBuildersAreAddedWhenUsingFactoryMethodsAll ( ) { messages . info ( "This<sp>is<sp>a<sp>%s" , "message" ) ; messages . error ( "This<sp>is<sp>a<sp>message" ) ; messages . error ( "This<sp>is<sp>a<sp>%s" , "message" ) ; messages . fatal ( "This<sp>is<sp>a<sp>message" ) ; messages . fatal ( "This<sp>is<sp>a<sp>%s" , "message" ) ; messages . warn ( "This<sp>is<sp>a<sp>message" ) ; messages . warn ( "This<sp>is<sp>a<sp>%s" , "message" ) ; "<AssertPlaceHolder>" ; } getAll ( ) { java . util . Set < org . jboss . seam . international . status . Message > result = new java . util . LinkedHashSet < org . jboss . seam . international . status . Message > ( ) ; synchronized ( builders ) { for ( org . jboss . seam . international . status . MessageBuilder builder : builders ) { messages . add ( builder . build ( ) ) ; } builders . clear ( ) ; } synchronized ( messages ) { result . addAll ( messages ) ; } return result ; }
org . junit . Assert . assertEquals ( 7 , messages . getAll ( ) . size ( ) )
getAllQueryUrl ( ) { org . hisp . dhis . query . Query query = queryService . getQueryFromUrl ( org . hisp . dhis . dataelement . DataElement . class , com . google . common . collect . Lists . < java . lang . String > newArrayList ( ) , com . google . common . collect . Lists . < org . hisp . dhis . query . Order > newArrayList ( ) ) ; "<AssertPlaceHolder>" ; } query ( org . hisp . dhis . query . Query ) { validateQuery ( query ) ; java . util . List < T > list = runQuery ( query ) ; list = runSorter ( query , list ) ; return org . hisp . dhis . common . PagerUtils . pageCollection ( list , query . getFirstResult ( ) , query . getMaxResults ( ) ) ; }
org . junit . Assert . assertEquals ( 6 , queryService . query ( query ) . size ( ) )
entry_hashCodeForNullKeyAndValue ( ) { com . gs . collections . api . map . MutableMap < java . lang . Integer , java . lang . String > map = this . newMapWithKeyValue ( null , null ) ; Map . Entry < java . lang . Integer , java . lang . String > entry = com . gs . collections . impl . utility . Iterate . getFirst ( map . entrySet ( ) ) ; "<AssertPlaceHolder>" ; } hashCode ( ) { final com . gs . collections . impl . Counter counter = new com . gs . collections . impl . Counter ( ) ; this . forEachWithOccurrences ( new com . gs . collections . api . block . procedure . primitive . ObjectIntProcedure < T > ( ) { public void value ( T each , int count ) { counter . add ( ( ( each == null ? 0 : each . hashCode ( ) ) ^ count ) ) ; } } ) ; return counter . getCount ( ) ; }
org . junit . Assert . assertEquals ( 0 , entry . hashCode ( ) )
testZoekIdBijAnummerMeerdereGevonden ( ) { final java . lang . Integer persoonId = persoonRepository . zoekIdBijAnummer ( new nl . bzk . brp . model . algemeen . attribuuttype . kern . AdministratienummerAttribuut ( 999999999L ) ) ; "<AssertPlaceHolder>" ; } zoekIdBijAnummer ( nl . bzk . brp . model . algemeen . attribuuttype . kern . AdministratienummerAttribuut ) { final javax . persistence . TypedQuery < java . lang . Integer > tQuery = em . createQuery ( ( ( nl . bzk . brp . dataaccess . repository . jpa . PersoonJpaRepository . SELECT_ID_FROM_PERSOON_MODEL_PERSOON ) + "<sp>WHERE<sp>persoon.identificatienummers.administratienummer<sp>=<sp>:administratienummer" ) , nl . bzk . brp . dataaccess . repository . jpa . Integer . class ) ; tQuery . setParameter ( "administratienummer" , anr ) ; try { return tQuery . getSingleResult ( ) ; } catch ( final javax . persistence . NoResultException e ) { return null ; } catch ( final javax . persistence . NonUniqueResultException e ) { final java . lang . String foutMelding = "Meerdere<sp>personen<sp>gevonden<sp>met<sp>A-nummer:<sp>" + anr ; nl . bzk . brp . dataaccess . repository . jpa . PersoonJpaRepository . LOGGER . warn ( foutMelding ) ; throw new nl . bzk . brp . dataaccess . exceptie . NietUniekeAnummerExceptie ( foutMelding , e ) ; } }
org . junit . Assert . assertNull ( persoonId )
testMaakentityConvertorVoorvoegsel ( ) { nl . bzk . migratiebrp . test . brpnaarlo3 . adapter . ConverterContext ctx = createContext ( nl . bzk . migratiebrp . test . brpnaarlo3 . adapter . entity . IstStapelVoorkomenConverterTest . MINIMAAL ) ; converter . convertInhoudelijk ( ctx , IstStapelVoorkomenConverter . HEADER_VOORVOEGSEL , voorvoegsel ) ; converter . maakEntity ( ctx ) ; nl . bzk . migratiebrp . synchronisatie . dal . domein . brp . kern . entity . StapelVoorkomen stapelVoorkomen = ctx . getStapel ( java . lang . Integer . parseInt ( volgnummer ) ) . getStapelvoorkomens ( ) . iterator ( ) . next ( ) ; "<AssertPlaceHolder>" ; } getVoorvoegsel ( ) { return voorvoegsel ; }
org . junit . Assert . assertEquals ( voorvoegsel , stapelVoorkomen . getVoorvoegsel ( ) )
testCallerWithHigherMinorVersionIncompatible ( ) { joynr . types . Version caller = new joynr . types . Version ( 1 , 2 ) ; joynr . types . Version provider = new joynr . types . Version ( 1 , 0 ) ; boolean result = subject . check ( caller , provider ) ; "<AssertPlaceHolder>" ; } check ( joynr . types . Version , joynr . types . Version ) { if ( ( caller == null ) || ( provider == null ) ) { throw new java . lang . IllegalArgumentException ( java . lang . String . format ( "Both<sp>caller<sp>(%s)<sp>and<sp>provider<sp>(%s)<sp>must<sp>be<sp>non-null." , caller , provider ) ) ; } if ( ( ( ( ( caller . getMajorVersion ( ) ) == null ) || ( ( caller . getMinorVersion ( ) ) == null ) ) || ( ( provider . getMajorVersion ( ) ) == null ) ) || ( ( provider . getMinorVersion ( ) ) == null ) ) { throw new java . lang . IllegalArgumentException ( java . lang . String . format ( "Neither<sp>major<sp>nor<sp>minor<sp>version<sp>values<sp>can<sp>be<sp>null<sp>in<sp>either<sp>caller<sp>%s<sp>or<sp>provider<sp>%s." , caller , provider ) ) ; } int callerMajor = caller . getMajorVersion ( ) ; int callerMinor = caller . getMinorVersion ( ) ; int providerMajor = provider . getMajorVersion ( ) ; int providerMinor = provider . getMinorVersion ( ) ; return ( callerMajor == providerMajor ) && ( callerMinor <= providerMinor ) ; }
org . junit . Assert . assertFalse ( result )
shouldReturnBoundaryForOpenBrace ( ) { edu . stanford . bmir . protege . web . shared . entity . EntityNameCharType type = edu . stanford . bmir . protege . web . shared . entity . EntityNameCharType . getType ( 0 , '{' , 1 ) ; "<AssertPlaceHolder>" ; } getType ( int , char , int ) { if ( java . lang . Character . isUpperCase ( ch ) ) { return edu . stanford . bmir . protege . web . shared . entity . EntityNameCharType . UPPER_CASE_LETTER ; } else if ( java . lang . Character . isLowerCase ( ch ) ) { return edu . stanford . bmir . protege . web . shared . entity . EntityNameCharType . LETTER ; } else if ( java . lang . Character . isDigit ( ch ) ) { return edu . stanford . bmir . protege . web . shared . entity . EntityNameCharType . DIGIT ; } else if ( ( index == 0 ) && ( ch == ( edu . stanford . bmir . protege . web . shared . entity . EntityNameCharType . SINGLE_QUOTE ) ) ) { return edu . stanford . bmir . protege . web . shared . entity . EntityNameCharType . ESCAPING_QUOTE ; } else if ( ( index == ( length - 1 ) ) && ( ch == ( edu . stanford . bmir . protege . web . shared . entity . EntityNameCharType . SINGLE_QUOTE ) ) ) { return edu . stanford . bmir . protege . web . shared . entity . EntityNameCharType . ESCAPING_QUOTE ; } else if ( ch == '-' ) { return edu . stanford . bmir . protege . web . shared . entity . EntityNameCharType . LETTER ; } else if ( ch == ( edu . stanford . bmir . protege . web . shared . entity . EntityNameCharType . SINGLE_QUOTE ) ) { return edu . stanford . bmir . protege . web . shared . entity . EntityNameCharType . LETTER ; } else if ( ch == '<sp>' ) { return edu . stanford . bmir . protege . web . shared . entity . EntityNameCharType . BOUNDARY ; } else if ( ( 33 <= ch ) && ( ch <= 47 ) ) { return edu . stanford . bmir . protege . web . shared . entity . EntityNameCharType . BOUNDARY ; } else if ( ( 58 <= ch ) && ( ch <= 64 ) ) { return edu . stanford . bmir . protege . web . shared . entity . EntityNameCharType . BOUNDARY ; } else if ( ( 91 <= ch ) && ( ch <= 96 ) ) { return edu . stanford . bmir . protege . web . shared . entity . EntityNameCharType . BOUNDARY ; } else if ( ( 123 <= ch ) && ( ch <= 126 ) ) { return edu . stanford . bmir . protege . web . shared . entity . EntityNameCharType . BOUNDARY ; } else if ( ch == '\t' ) { return edu . stanford . bmir . protege . web . shared . entity . EntityNameCharType . BOUNDARY ; } else if ( ch == '\n' ) { return edu . stanford . bmir . protege . web . shared . entity . EntityNameCharType . BOUNDARY ; } else { return edu . stanford . bmir . protege . web . shared . entity . EntityNameCharType . LETTER ; } }
org . junit . Assert . assertEquals ( EntityNameCharType . BOUNDARY , type )
testSetDotSizeNumListKO ( ) { final java . util . List < java . util . Optional < java . lang . Double > > vals = java . util . Arrays . asList ( java . util . Optional . of ( arr1 . getDotSizeNum ( ) ) , java . util . Optional . of ( arr2 . getDotSizeNum ( ) ) ) ; group . setDotSizeNumList ( null ) ; "<AssertPlaceHolder>" ; } getDotSizeNum ( ) { return firstIArrowable ( ) . map ( ( sh ) -> sh . getDotSizeNum ( ) ) . orElse ( Double . NaN ) ; }
org . junit . Assert . assertEquals ( vals , java . util . Arrays . asList ( java . util . Optional . of ( arr1 . getDotSizeNum ( ) ) , java . util . Optional . of ( arr2 . getDotSizeNum ( ) ) ) )
defaultConstructorTest ( ) { org . openscience . cdk . group . BondDiscretePartitionRefiner refiner = new org . openscience . cdk . group . BondDiscretePartitionRefiner ( ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertNotNull ( refiner )
testCloneWithDefType ( ) { org . springframework . data . solr . core . query . Query source = new org . springframework . data . solr . core . query . SimpleQuery ( new org . springframework . data . solr . core . query . Criteria ( "field_1" ) . is ( "value_1" ) ) ; source . setDefType ( "defType" ) ; org . springframework . data . solr . core . query . Query destination = org . springframework . data . solr . core . query . SimpleQuery . fromQuery ( source ) ; "<AssertPlaceHolder>" ; } getDefType ( ) { return ( this . defType ) != null ? this . defType : "" ; }
org . junit . Assert . assertEquals ( source . getDefType ( ) , destination . getDefType ( ) )
testEmptyString ( ) { "<AssertPlaceHolder>" ; } unescape ( java . lang . String ) { boolean escaping = false ; java . lang . StringBuilder newString = new java . lang . StringBuilder ( ) ; for ( char c : escaped . toCharArray ( ) ) { if ( ! escaping ) { if ( c == ( py4j . StringUtil . ESCAPE_CHAR ) ) { escaping = true ; } else { newString . append ( c ) ; } } else { if ( c == 'n' ) { newString . append ( '\n' ) ; } else if ( c == 'r' ) { newString . append ( '\r' ) ; } else { newString . append ( c ) ; } escaping = false ; } } return newString . toString ( ) ; }
org . junit . Assert . assertEquals ( "" , py4j . StringUtil . unescape ( "" ) )
onCheckRunnable ( ) { android . widget . CheckBox checkbox = new android . widget . CheckBox ( new android . app . Activity ( ) ) ; checkbox . setId ( android . R . id . button1 ) ; com . github . kevinsawicki . wishlist . ViewFinder finder = new com . github . kevinsawicki . wishlist . ViewFinder ( checkbox ) ; final java . util . concurrent . atomic . AtomicBoolean run = new java . util . concurrent . atomic . AtomicBoolean ( false ) ; finder . onCheck ( android . R . id . button1 , new java . lang . Runnable ( ) { public void run ( ) { run . set ( true ) ; } } ) ; checkbox . performClick ( ) ; "<AssertPlaceHolder>" ; } run ( ) { final float densityDpi = delegate . getContext ( ) . getResources ( ) . getDisplayMetrics ( ) . densityDpi ; final android . graphics . Rect r = new android . graphics . Rect ( ) ; delegate . getHitRect ( r ) ; r . top -= com . github . kevinsawicki . wishlist . ViewUtils . transformToDensityPixel ( top , densityDpi ) ; r . left -= com . github . kevinsawicki . wishlist . ViewUtils . transformToDensityPixel ( left , densityDpi ) ; r . bottom += com . github . kevinsawicki . wishlist . ViewUtils . transformToDensityPixel ( bottom , densityDpi ) ; r . right += com . github . kevinsawicki . wishlist . ViewUtils . transformToDensityPixel ( right , densityDpi ) ; parent . setTouchDelegate ( new android . view . TouchDelegate ( r , delegate ) ) ; }
org . junit . Assert . assertTrue ( run . get ( ) )
test_a$_ax ( ) { org . antlr . v4 . runtime . atn . PredictionContext a1 = a ( false ) ; org . antlr . v4 . runtime . atn . PredictionContext x = x ( false ) ; org . antlr . v4 . runtime . atn . PredictionContext a2 = createSingleton ( x , 1 ) ; org . antlr . v4 . runtime . atn . PredictionContext r = contextCache . join ( a1 , a2 ) ; System . out . println ( org . antlr . v4 . test . tool . TestGraphNodes . toDOTString ( r ) ) ; java . lang . String expecting = "digraph<sp>G<sp>{\n" + ( ( ( ( "rankdir=LR;\n" + "<sp>s0[label=\"0\"];\n" ) + "<sp>s1[label=\"*\"];\n" ) + "<sp>s0->s1[label=\"1\"];\n" ) + "}\n" ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( expecting , org . antlr . v4 . test . tool . TestGraphNodes . toDOTString ( r ) )
testBatchWriteException ( ) { java . util . List < com . amazonaws . mobileconnectors . dynamodbv2 . dynamodbmapper . NumberSetAttributeClass > objs = new java . util . ArrayList < com . amazonaws . mobileconnectors . dynamodbv2 . dynamodbmapper . NumberSetAttributeClass > ( ) ; for ( int i = 0 ; i < 40 ; i ++ ) { com . amazonaws . mobileconnectors . dynamodbv2 . dynamodbmapper . NumberSetAttributeClass obj = getUniqueNumericObject ( ) ; objs . add ( obj ) ; } java . util . List < com . amazonaws . mobileconnectors . dynamodbv2 . dynamodbmapper . DynamoDBMapper . FailedBatch > failedBatches = mapper . batchSave ( objs ) ; for ( com . amazonaws . mobileconnectors . dynamodbv2 . dynamodbmapper . NumberSetAttributeClass obj : objs ) { com . amazonaws . mobileconnectors . dynamodbv2 . dynamodbmapper . NumberSetAttributeClass loaded = mapper . load ( com . amazonaws . mobileconnectors . dynamodbv2 . dynamodbmapper . NumberSetAttributeClass . class , obj . getKey ( ) ) ; "<AssertPlaceHolder>" ; } } getKey ( ) { return key ; }
org . junit . Assert . assertEquals ( obj , loaded )
non_character_type_returns_no_specimen ( ) { java . lang . Object result = this . characterGenerator . create ( com . flextrade . jfixture . builders . Integer . class , null ) ; "<AssertPlaceHolder>" ; } create ( java . lang . Object , com . flextrade . jfixture . SpecimenContext ) { if ( ! ( request instanceof com . flextrade . jfixture . utility . SpecimenType ) ) { return new com . flextrade . jfixture . NoSpecimen ( ) ; } com . flextrade . jfixture . utility . SpecimenType type = ( ( com . flextrade . jfixture . utility . SpecimenType ) ( request ) ) ; if ( ! ( org . joda . time . base . BaseDateTime . class . isAssignableFrom ( type . getRawType ( ) ) ) ) { return new com . flextrade . jfixture . NoSpecimen ( ) ; } try { java . util . Date date = ( ( java . util . Date ) ( context . resolve ( java . util . Date . class ) ) ) ; long instant = date . getTime ( ) ; org . joda . time . DateTimeZone timeZone = ( ( org . joda . time . DateTimeZone ) ( context . resolve ( org . joda . time . DateTimeZone . class ) ) ) ; return type . getRawType ( ) . getDeclaredConstructor ( long . class , org . joda . time . DateTimeZone . class ) . newInstance ( instant , timeZone ) ; } catch ( java . lang . Exception e ) { e . printStackTrace ( ) ; return new com . flextrade . jfixture . NoSpecimen ( ) ; } }
org . junit . Assert . assertEquals ( new com . flextrade . jfixture . NoSpecimen ( ) , result )
testSubset ( ) { com . tek271 . reverseProxy . utils . PropertiesFile propertiesFile = new com . tek271 . reverseProxy . utils . PropertiesFile ( com . tek271 . reverseProxy . utils . PropertiesFileTest . FILE ) ; com . tek271 . reverseProxy . utils . PropertiesFile subset = propertiesFile . subset ( "mapping" ) ; "<AssertPlaceHolder>" ; } getProperties ( ) { return props ; }
org . junit . Assert . assertEquals ( 5 , subset . getProperties ( ) . size ( ) )
shouldMakeRecurrence ( ) { com . calendarfx . model . Entry < java . lang . String > recurrence = new com . calendarfx . model . Entry ( ) ; recurrence . getProperties ( ) . put ( "com.calendarfx.recurrence.source" , entry ) ; "<AssertPlaceHolder>" ; } isRecurrence ( ) { return ( recurrence ) == null ? _recurrence : recurrence . get ( ) ; }
org . junit . Assert . assertThat ( recurrence . isRecurrence ( ) , org . hamcrest . Matchers . is ( true ) )
testEqualArtifacts ( ) { org . eclipse . tycho . core . osgitools . targetplatform . DefaultDependencyArtifacts tp = new org . eclipse . tycho . core . osgitools . targetplatform . DefaultDependencyArtifacts ( ) ; org . eclipse . tycho . ArtifactKey key = new org . eclipse . tycho . DefaultArtifactKey ( "type" , "id" , "version" ) ; java . io . File location = new java . io . File ( "location" ) ; tp . addArtifactFile ( key , location , asSet ( "a" ) ) ; tp . addArtifactFile ( key , location , asSet ( "a" ) ) ; "<AssertPlaceHolder>" ; } getArtifacts ( ) { return new java . util . ArrayList ( artifacts . values ( ) ) ; }
org . junit . Assert . assertEquals ( 1 , tp . getArtifacts ( ) . size ( ) )
testGetResourceFileWithTrailingSlash ( ) { org . apache . catalina . WebResource webResource = resourceRoot . getResource ( ( ( getMount ( ) ) + "/d1/d1-f1.txt/" ) ) ; "<AssertPlaceHolder>" ; } exists ( ) { return war . exists ( ) ; }
org . junit . Assert . assertFalse ( webResource . exists ( ) )
testMatchExactlyStatusErr ( ) { queriesString = "type=node&enabled=true&status=established&path=node_id=node01,port_id=port01" ; target = new org . o3project . odenos . core . component . network . flow . query . BasicFlowQuery ( queriesString ) ; target . parse ( ) ; java . util . List < org . o3project . odenos . core . component . network . flow . basic . BasicFlowMatch > matches = null ; java . util . List < java . lang . String > path = null ; java . util . Map < java . lang . String , java . util . List < org . o3project . odenos . core . component . network . flow . basic . FlowAction > > edgeAction = null ; java . util . Map < java . lang . String , java . lang . String > flowAttributes = new java . util . HashMap < java . lang . String , java . lang . String > ( ) ; org . o3project . odenos . core . component . network . flow . basic . BasicFlow flow = new org . o3project . odenos . core . component . network . flow . basic . BasicFlow ( "1" , "" , "" , true , "" , "established" , matches , path , edgeAction , flowAttributes ) ; org . o3project . odenos . core . component . network . flow . basic . BasicFlowMatch match1 = new org . o3project . odenos . core . component . network . flow . basic . BasicFlowMatch ( "node1" , "port1" ) ; org . o3project . odenos . core . component . network . flow . basic . BasicFlowMatch match2 = new org . o3project . odenos . core . component . network . flow . basic . BasicFlowMatch ( "node1" , "port2" ) ; org . o3project . odenos . core . component . network . flow . basic . BasicFlowMatch match3 = new org . o3project . odenos . core . component . network . flow . basic . BasicFlowMatch ( "node2" , "port1" ) ; org . o3project . odenos . core . component . network . flow . basic . BasicFlowMatch match4 = new org . o3project . odenos . core . component . network . flow . basic . BasicFlowMatch ( "node2" , "port2" ) ; flow . addMatch ( match1 ) ; flow . addMatch ( match2 ) ; flow . addMatch ( match3 ) ; flow . addMatch ( match4 ) ; "<AssertPlaceHolder>" ; } matchExactly ( org . o3project . odenos . core . component . network . flow . basic . FlowAction ) { if ( ( target == null ) || ( ! ( target . getType ( ) . equals ( org . o3project . odenos . core . component . network . flow . ofpflow . OFPFlowActionCopyTtlOut . class . getSimpleName ( ) ) ) ) ) { return false ; } return true ; }
org . junit . Assert . assertThat ( target . matchExactly ( flow ) , org . hamcrest . CoreMatchers . is ( false ) )
testEnableResponseBuffering ( ) { boolean result ; result = writer . enableResponseBuffering ( ) ; "<AssertPlaceHolder>" ; } enableResponseBuffering ( ) { return false ; }
org . junit . Assert . assertFalse ( result )
testIsSelected_Throws_Exception_When_COM_Returns_One ( ) { when ( rawPattern . getCurrentIsSelected ( any ( ) ) ) . thenReturn ( 1 ) ; mmarquee . automation . pattern . SelectionItem item = new mmarquee . automation . pattern . SelectionItem ( element ) ; item . rawPattern = rawPattern ; boolean selected = item . isSelected ( ) ; "<AssertPlaceHolder>" ; } isSelected ( ) { com . sun . jna . ptr . IntByReference ibr = new com . sun . jna . ptr . IntByReference ( ) ; final int res = this . getPattern ( ) . getCurrentIsSelected ( ibr ) ; if ( res != 0 ) { throw new mmarquee . automation . AutomationException ( res ) ; } return ( ibr . getValue ( ) ) == 1 ; }
org . junit . Assert . assertFalse ( selected )
testBadHMACExactLength ( ) { byte [ ] plaintext = org . cryptonode . jncryptor . AES256JNCryptorInputStreamTest . getRandomBytes ( 256 ) ; final java . lang . String password = "Testing1234" ; org . cryptonode . jncryptor . JNCryptor cryptor = new org . cryptonode . jncryptor . AES256JNCryptor ( ) ; byte [ ] data = cryptor . encryptData ( plaintext , password . toCharArray ( ) ) ; data [ ( ( data . length ) - 1 ) ] = ( ( byte ) ( ( data [ ( ( data . length ) - 1 ) ] ) + 1 ) ) ; java . io . InputStream in = new org . cryptonode . jncryptor . AES256JNCryptorInputStream ( new java . io . ByteArrayInputStream ( data ) , password . toCharArray ( ) ) ; try { byte [ ] result = new byte [ plaintext . length ] ; int read = in . read ( result ) ; "<AssertPlaceHolder>" ; } finally { in . close ( ) ; } } read ( byte [ ] ) { return read ( b , 0 , b . length ) ; }
org . junit . Assert . assertEquals ( result . length , read )
testInitiate_IAtomContainerSet_ArrayList_ArrayList ( ) { org . openscience . cdk . reaction . IReactionMechanism mechanism = new org . openscience . cdk . reaction . mechanism . HeterolyticCleavageMechanism ( ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertNotNull ( mechanism )
chain6 ( ) { final java . util . List < java . lang . Comparable > result = com . github . underscore . U . chain ( com . github . underscore . U . chain ( com . github . underscore . U . class . getDeclaredMethods ( ) ) . reduce ( new com . github . underscore . BiFunction < java . util . List < java . lang . String > , java . lang . reflect . Method , java . util . List < java . lang . String > > ( ) { public java . util . List < java . lang . String > apply ( final java . util . List < java . lang . String > accum , final java . lang . reflect . Method method ) { accum . add ( method . getName ( ) ) ; return accum ; } } , new java . util . ArrayList < java . lang . String > ( ) ) . item ( ) ) . reject ( new com . github . underscore . Predicate < java . lang . String > ( ) { public boolean test ( final java . lang . String name ) { return name . contains ( "$" ) ; } } ) . uniq ( ) . sort ( ) . first ( 4 ) . value ( ) ; "<AssertPlaceHolder>" ; } size ( ) { final int result = com . github . underscore . U . size ( asList ( 1 , 2 , 3 , 4 ) ) ; org . junit . Assert . assertEquals ( 4 , result ) ; final int resultObj = new com . github . underscore . U ( asList ( 1 , 2 , 3 , 4 ) ) . size ( ) ; org . junit . Assert . assertEquals ( 4 , resultObj ) ; final int resultChain = com . github . underscore . U . chain ( asList ( 1 , 2 , 3 , 4 ) ) . size ( ) ; org . junit . Assert . assertEquals ( 4 , resultChain ) ; final int [ ] array = new int [ ] { 1 , 2 , 3 , 4 , 5 , 6 } ; java . lang . Iterable < java . lang . Integer > iterable = new java . lang . Iterable < java . lang . Integer > ( ) { public com . github . underscore . Iterator < java . lang . Integer > iterator ( ) { return new com . github . underscore . Iterator < java . lang . Integer > ( ) { private int index ; public boolean hasNext ( ) { return ( array . length ) > ( index ) ; } public com . github . underscore . Integer next ( ) { return array [ ( ( index ) ++ ) ] ; } public void remove ( ) { } } ; } } ; org . junit . Assert . assertEquals ( 6 , com . github . underscore . U . size ( iterable ) ) ; org . junit . Assert . assertEquals ( 5 , com . github . underscore . U . size ( new java . lang . Integer [ ] { 5 , 4 , 3 , 2 , 1 } ) ) ; org . junit . Assert . assertEquals ( 5 , com . github . underscore . U . size ( 5 , 4 , 3 , 2 , 1 ) ) ; }
org . junit . Assert . assertEquals ( 4 , result . size ( ) )
testFindUsageStatistics_inexistingTarget ( ) { java . util . List < net . roboconf . core . model . runtime . TargetUsageItem > items = this . resource . findUsageStatistics ( "4" ) ; "<AssertPlaceHolder>" ; } size ( ) { return this . map . size ( ) ; }
org . junit . Assert . assertEquals ( 0 , items . size ( ) )
testPropSpecOnPatternWithThis ( ) { java . lang . String rule = "package<sp>org.drools.compiler.integrationtests\n" + ( ( ( ( ( ( ( ( ( ( ( ( ( ( "declare<sp>A\n" + "<sp>@propertyReactive\n" ) + "B" 3 ) + "B" 6 ) + "B" 7 ) + "<sp>@propertyReactive\n" ) + "<sp>a<sp>:<sp>A\n" ) + "B" 6 ) + "rule<sp>R1\n" ) + "when\n" ) + "B" 5 ) + "<sp>$a<sp>:<sp>A(this<sp>==<sp>$b.a);\n" ) + "B" 0 ) + "B" 1 ) + "B" 6 ) ; org . kie . api . KieBase kbase = loadKnowledgeBaseFromString ( rule ) ; org . kie . api . runtime . KieSession ksession = kbase . newKieSession ( ) ; org . kie . api . definition . type . FactType factTypeA = kbase . getFactType ( "org.drools.compiler.integrationtests" , "B" 2 ) ; java . lang . Object factA = factTypeA . newInstance ( ) ; factTypeA . set ( factA , "B" 4 , 1 ) ; ksession . insert ( factA ) ; org . kie . api . definition . type . FactType factTypeB = kbase . getFactType ( "org.drools.compiler.integrationtests" , "B" ) ; java . lang . Object factB = factTypeB . newInstance ( ) ; factTypeB . set ( factB , "a" , factA ) ; ksession . insert ( factB ) ; int rules = ksession . fireAllRules ( ) ; "<AssertPlaceHolder>" ; } fireAllRules ( ) { return 0 ; }
org . junit . Assert . assertEquals ( 1 , rules )
suggestAsJSONReturnsEmptyListOnExceptions ( ) { when ( this . query . execute ( ) ) . thenThrow ( new org . xwiki . query . QueryException ( "" , this . query , null ) ) ; org . json . JSONObject response = new org . json . JSONObject ( this . component . suggestAsJSON ( "dOe" , 200 , "view" , org . phenotips . data . rest . internal . DefaultPatientsSuggestionsResourceImplTest . ID , "asc" ) ) ; org . json . JSONArray suggestions = response . getJSONArray ( "matchedPatients" ) ; "<AssertPlaceHolder>" ; } suggestAsJSON ( java . lang . String , int , java . lang . String , java . lang . String , java . lang . String ) { if ( org . apache . commons . lang3 . StringUtils . isEmpty ( input ) ) { throw new javax . ws . rs . WebApplicationException ( Response . Status . BAD_REQUEST ) ; } java . util . List < org . phenotips . data . Patient > patients = getMatchingPatients ( input . toLowerCase ( ) , orderField , order , maxResults , org . xwiki . security . authorization . Right . toRight ( requiredPermission ) ) ; org . json . JSONArray results = new org . json . JSONArray ( ) ; for ( org . phenotips . data . Patient patient : patients ) { results . put ( getPatientJSON ( patient ) ) ; } org . json . JSONObject jsonResult = new org . json . JSONObject ( ) ; jsonResult . put ( "matchedPatients" , results ) ; return jsonResult . toString ( ) ; }
org . junit . Assert . assertEquals ( 0 , suggestions . length ( ) )
testIssue1142 ( ) { final int [ ] res = new int [ ] { 0 } ; org . robovm . rt . lambdas . Issue1142Test . foo ( ( java . lang . Integer i ) -> res [ 0 ] = i ) ; "<AssertPlaceHolder>" ; } foo ( int ) { super . foo ( i ) ; }
org . junit . Assert . assertEquals ( 10 , res [ 0 ] )
testMultifactorAddMatchingCredentials ( ) { final org . jasig . cas . authentication . principal . Principal firstPrincipal = new org . jasig . cas . authentication . principal . DefaultPrincipalFactory ( ) . createPrincipal ( "casuser" ) ; final org . jasig . cas . authentication . Authentication firstAuthentication = mock ( org . jasig . cas . authentication . Authentication . class ) ; when ( firstAuthentication . getPrincipal ( ) ) . thenReturn ( firstPrincipal ) ; final org . jasig . cas . authentication . principal . Principal secondPrincipal = new org . jasig . cas . authentication . principal . DefaultPrincipalFactory ( ) . createPrincipal ( "casuser" ) ; final org . jasig . cas . authentication . Authentication secondAuthentication = mock ( org . jasig . cas . authentication . Authentication . class ) ; when ( secondAuthentication . getPrincipal ( ) ) . thenReturn ( secondPrincipal ) ; final net . unicon . cas . mfa . authentication . principal . MultiFactorCredentials c = new net . unicon . cas . mfa . authentication . principal . MultiFactorCredentials ( ) ; c . addAuthenticationToChain ( firstAuthentication ) ; c . addAuthenticationToChain ( secondAuthentication ) ; "<AssertPlaceHolder>" ; } countChainedAuthentications ( ) { return this . chainedAuthentication . size ( ) ; }
org . junit . Assert . assertEquals ( 2 , c . countChainedAuthentications ( ) )
test ( ) { System . out . println ( "---------Erstelle<sp>Job" ) ; org . kapott . hbci . GV . HBCIJob job = handler . newJob ( "value" 4 ) ; org . kapott . hbci . structures . Konto acc = new org . kapott . hbci . structures . Konto ( ) ; acc . blz = params . getProperty ( "value" 5 ) ; acc . number = params . getProperty ( "target_number" ) ; acc . name = "Kurt<sp>Mustermann" ; acc . bic = params . getProperty ( "target_bic" ) ; acc . iban = params . getProperty ( "---------Erstelle<sp>Job" 2 ) ; int source_acc_idx = java . lang . Integer . parseInt ( params . getProperty ( "source_account_idx" ) ) ; job . setParam ( "value" 1 , passport . getAccounts ( ) [ source_acc_idx ] ) ; job . setParam ( "---------Erstelle<sp>Job" 4 , acc ) ; java . lang . String value = params . getProperty ( "value" ) ; if ( value == null ) value = "value" 7 ; job . setParam ( "value" 8 , new org . kapott . hbci . structures . Value ( java . lang . Integer . parseInt ( value ) , "EUR" ) ) ; job . setParam ( "usage" , "value" 2 ) ; job . setParam ( "---------Erstelle<sp>Job" 1 , params . getProperty ( "---------Erstelle<sp>Job" 1 ) ) ; job . setParam ( "value" 0 , "value" 3 ) ; job . setParam ( "turnus" , "value" 9 ) ; job . setParam ( "---------Erstelle<sp>Job" 3 , "value" 9 ) ; System . out . println ( "value" 6 ) ; job . addToQueue ( ) ; org . kapott . hbci . status . HBCIExecStatus ret = handler . execute ( ) ; org . kapott . hbci . GV_Result . HBCIJobResult res = job . getJobResult ( ) ; System . out . println ( ( "----------Result:<sp>" + ( res . toString ( ) ) ) ) ; "<AssertPlaceHolder>" ; } isOK ( ) { return ( ( ( globStatus . getStatusCode ( ) ) != ( org . kapott . hbci . status . HBCIStatus . STATUS_ERR ) ) && ( ( jobStatus . getStatusCode ( ) ) != ( org . kapott . hbci . status . HBCIStatus . STATUS_ERR ) ) ) && ( ( ( globStatus . getStatusCode ( ) ) != ( org . kapott . hbci . status . HBCIStatus . STATUS_UNKNOWN ) ) || ( ( jobStatus . getStatusCode ( ) ) != ( org . kapott . hbci . status . HBCIStatus . STATUS_UNKNOWN ) ) ) ; }
org . junit . Assert . assertEquals ( "---------Erstelle<sp>Job" 0 , true , res . isOK ( ) )
shouldEncryptAndDecrypt ( ) { doHandShake ( ) ; network . thunder . core . etc . RandomDataMessage testMessage = new network . thunder . core . etc . RandomDataMessage ( ) ; channel1 . writeOutbound ( testMessage ) ; channel2 . writeInbound ( channel1 . readOutbound ( ) ) ; network . thunder . core . etc . RandomDataMessage decryptedMessage = ( ( network . thunder . core . etc . RandomDataMessage ) ( channel2 . readInbound ( ) ) ) ; "<AssertPlaceHolder>" ; } doHandShake ( ) { channel2 . writeInbound ( channel1 . readOutbound ( ) ) ; channel1 . writeInbound ( channel2 . readOutbound ( ) ) ; }
org . junit . Assert . assertEquals ( decryptedMessage , testMessage )
convert200MBValue ( ) { java . lang . String newSize = org . eclipse . che . ide . util . Bytes . toHumanSize ( "200MB" ) ; "<AssertPlaceHolder>" ; } toHumanSize ( java . lang . String ) { return org . eclipse . che . ide . util . Bytes . toHumanSize ( org . eclipse . che . ide . util . Bytes . fromHumanSize ( humanSize ) ) ; }
org . junit . Assert . assertEquals ( "200MB" , newSize )
whenLongPolling_ShouldObserveItemsFromVisibilityRules ( ) { new java . lang . Thread ( ( ) -> { try { java . lang . Thread . sleep ( org . eclipse . smarthome . io . rest . sitemap . internal . SitemapResourceTest . STATE_UPDATE_WAIT_TIME ) ; visibilityRuleItem . setState ( new org . eclipse . smarthome . core . library . types . DecimalType ( BigDecimal . ONE ) ) ; } catch ( e ) { } } ) . start ( ) ; when ( headers . getRequestHeader ( org . eclipse . smarthome . io . rest . sitemap . internal . SitemapResourceTest . HTTP_HEADER_X_ATMOSPHERE_TRANSPORT ) ) . thenReturn ( java . util . Collections . emptyList ( ) ) ; javax . ws . rs . core . Response response = sitemapResource . getPageData ( headers , null , org . eclipse . smarthome . io . rest . sitemap . internal . SitemapResourceTest . SITEMAP_MODEL_NAME , org . eclipse . smarthome . io . rest . sitemap . internal . SitemapResourceTest . SITEMAP_NAME , null ) ; org . eclipse . smarthome . io . rest . sitemap . internal . PageDTO pageDTO = ( ( org . eclipse . smarthome . io . rest . sitemap . internal . PageDTO ) ( response . getEntity ( ) ) ) ; "<AssertPlaceHolder>" ; } getPageData ( javax . ws . rs . core . HttpHeaders , java . lang . String , java . lang . String , java . lang . String , java . lang . String ) { final java . util . Locale locale = localeService . getLocale ( language ) ; logger . debug ( "Received<sp>HTTP<sp>GET<sp>request<sp>from<sp>IP<sp>{}<sp>at<sp>'{}'" , request . getRemoteAddr ( ) , uriInfo . getPath ( ) ) ; if ( subscriptionId != null ) { try { subscriptions . setPageId ( subscriptionId , sitemapname , pageId ) ; } catch ( java . lang . IllegalArgumentException e ) { return org . eclipse . smarthome . io . rest . JSONResponse . createErrorResponse ( Response . Status . BAD_REQUEST , e . getMessage ( ) ) ; } } boolean timeout = false ; if ( ( headers . getRequestHeader ( "X-Atmosphere-Transport" ) ) != null ) { timeout = blockUnlessChangeOccurs ( sitemapname , pageId ) ; } org . eclipse . smarthome . io . rest . sitemap . internal . PageDTO responseObject = getPageBean ( sitemapname , pageId , uriInfo . getBaseUriBuilder ( ) . build ( ) , locale , timeout ) ; return javax . ws . rs . core . Response . ok ( responseObject ) . build ( ) ; }
org . junit . Assert . assertThat ( pageDTO . timeout , org . hamcrest . CoreMatchers . is ( false ) )
updateClassifierInvalidACL ( ) { when ( accessListEntries . getAce ( ) ) . thenReturn ( java . util . Collections . emptyList ( ) ) ; java . util . List < org . opendaylight . sfc . util . openflow . writer . FlowDetails > flowList = theUpdateProcessor . processClassifier ( sffClassifier , acl , newRsp ) ; "<AssertPlaceHolder>" ; } processClassifier ( org . opendaylight . yang . gen . v1 . urn . cisco . params . xml . ns . yang . sfc . scf . rev140701 . service . function . classifiers . service . function . classifier . SclServiceFunctionForwarder , org . opendaylight . yang . gen . v1 . urn . ietf . params . xml . ns . yang . ietf . access . control . list . rev160218 . access . lists . Acl , boolean ) { addClassifier = addClassifierScenario ; java . util . Optional < org . opendaylight . yang . gen . v1 . urn . cisco . params . xml . ns . yang . sfc . sff . rev140701 . service . function . forwarders . ServiceFunctionForwarder > sff = java . util . Optional . of ( new org . opendaylight . yang . gen . v1 . urn . cisco . params . xml . ns . yang . sfc . common . rev151017 . SffName ( theClassifier . getName ( ) ) ) . map ( SfcProviderServiceForwarderAPI :: readServiceFunctionForwarder ) ; java . util . Optional < java . lang . String > itfName = classifierHandler . getInterfaceNameFromClassifier ( theClassifier ) ; if ( ( ! ( sff . isPresent ( ) ) ) || ( ! ( itfName . isPresent ( ) ) ) ) { org . opendaylight . sfc . scfofrenderer . processors . OpenflowClassifierProcessor . LOG . error ( ( "createdServiceFunctionClassifier:<sp>" + "Cannot<sp>install<sp>ACL<sp>rules<sp>in<sp>classifier.<sp>SFF<sp>exists?<sp>{};<sp>Interface<sp>exists?<sp>{}" ) , sff . isPresent ( ) , itfName . isPresent ( ) ) ; return java . util . Collections . emptyList ( ) ; } if ( classifierHandler . usesLogicalInterfaces ( sff . get ( ) ) ) { if ( addClassifierScenario ) { org . opendaylight . sfc . scfofrenderer . logicalclassifier . ClassifierGeniusIntegration . performGeniusServiceBinding ( tx , itfName . get ( ) ) ; org . opendaylight . sfc . scfofrenderer . processors . OpenflowClassifierProcessor . LOG . info ( "processClassifier<sp>-<sp>Bound<sp>interface<sp>{}" , itfName . get ( ) ) ; } else { org . opendaylight . sfc . scfofrenderer . logicalclassifier . ClassifierGeniusIntegration . performGeniusServiceUnbinding ( tx , itfName . get ( ) ) ; org . opendaylight . sfc . scfofrenderer . processors . OpenflowClassifierProcessor . LOG . info ( "processClassifier<sp>-<sp>Unbound<sp>interface<sp>{}" , itfName . get ( ) ) ; } } return theAcl . getAccessListEntries ( ) . getAce ( ) . stream ( ) . map ( ( theAce ) -> processAce ( itfName , sff . get ( ) , theClassifier . getName ( ) , theAcl . getAclName ( ) , theAce ) ) . reduce ( new java . util . ArrayList ( ) , ( dstList , theList ) -> java . util . stream . Stream . concat ( dstList . stream ( ) , theList . stream ( ) ) . collect ( java . util . stream . Collectors . toList ( ) ) ) ; }
org . junit . Assert . assertTrue ( flowList . isEmpty ( ) )
testCompareName ( ) { int x = new net . rrm . ehour . sort . ProjectAssignmentComparator ( ProjectAssignmentComparator . ASSIGNMENT_COMPARE_NAME ) . compare ( net . rrm . ehour . domain . ProjectAssignmentObjectMother . createProjectAssignment ( 2 ) , net . rrm . ehour . domain . ProjectAssignmentObjectMother . createProjectAssignment ( 1 ) ) ; "<AssertPlaceHolder>" ; } createProjectAssignment ( int [ ] ) { net . rrm . ehour . domain . ProjectAssignment prjAsg ; net . rrm . ehour . domain . Project prj ; net . rrm . ehour . domain . Customer cust ; net . rrm . ehour . domain . User user ; int customerId ; int userId ; int projectId ; int assignmentId ; int baseId = baseIds [ 0 ] ; customerId = baseId ; userId = baseId ; projectId = baseId * 10 ; assignmentId = baseId * 100 ; if ( ( baseIds . length ) >= 2 ) { customerId = baseIds [ 1 ] ; userId = customerId ; } if ( ( baseIds . length ) >= 3 ) { userId = baseIds [ 2 ] ; } if ( ( baseIds . length ) >= 4 ) { projectId = baseIds [ 3 ] ; } if ( ( baseIds . length ) >= 5 ) { assignmentId = baseIds [ 4 ] ; } cust = net . rrm . ehour . domain . CustomerObjectMother . createCustomer ( customerId ) ; prj = net . rrm . ehour . domain . ProjectObjectMother . createProject ( projectId , cust ) ; prjAsg = new net . rrm . ehour . domain . ProjectAssignment ( ) ; prjAsg . setProject ( prj ) ; prjAsg . setAssignmentId ( assignmentId ) ; user = net . rrm . ehour . domain . UserObjectMother . createUser ( ) ; user . setUserId ( userId ) ; prjAsg . setAssignmentType ( new net . rrm . ehour . domain . ProjectAssignmentType ( net . rrm . ehour . util . EhourConstants . ASSIGNMENT_DATE ) ) ; prjAsg . setUser ( user ) ; prjAsg . setActive ( true ) ; return prjAsg ; }
org . junit . Assert . assertTrue ( ( x > 0 ) )
testStrategies ( ) { eu . verdelhan . ta4j . indicators . statistics . PeriodicalGrowthRateIndicator gri = new eu . verdelhan . ta4j . indicators . statistics . PeriodicalGrowthRateIndicator ( this . closePrice , 5 ) ; eu . verdelhan . ta4j . Rule buyingRule = new eu . verdelhan . ta4j . trading . rules . CrossedUpIndicatorRule ( gri , eu . verdelhan . ta4j . Decimal . ZERO ) ; eu . verdelhan . ta4j . Rule sellingRule = new eu . verdelhan . ta4j . trading . rules . CrossedDownIndicatorRule ( gri , eu . verdelhan . ta4j . Decimal . ZERO ) ; eu . verdelhan . ta4j . Strategy strategy = new eu . verdelhan . ta4j . BaseStrategy ( buyingRule , sellingRule ) ; int result = seriesManager . run ( strategy ) . getTradeCount ( ) ; int expResult = 3 ; "<AssertPlaceHolder>" ; } getTradeCount ( ) { org . junit . Assert . assertEquals ( 0 , emptyRecord . getTradeCount ( ) ) ; org . junit . Assert . assertEquals ( 1 , openedRecord . getTradeCount ( ) ) ; org . junit . Assert . assertEquals ( 2 , closedRecord . getTradeCount ( ) ) ; }
org . junit . Assert . assertEquals ( expResult , result )
goAway_tooManyPings ( ) { final java . util . concurrent . atomic . AtomicBoolean run = new java . util . concurrent . atomic . AtomicBoolean ( ) ; tooManyPingsRunnable = new java . lang . Runnable ( ) { @ io . grpc . okhttp . Override public void run ( ) { run . set ( true ) ; } } ; initTransport ( ) ; frameHandler ( ) . goAway ( 0 , ErrorCode . ENHANCE_YOUR_CALM , okio . ByteString . encodeUtf8 ( "too_many_pings" ) ) ; "<AssertPlaceHolder>" ; shutdownAndVerify ( ) ; } get ( ) { return io . grpc . okhttp . OkHttpProtocolNegotiator . NEGOTIATOR ; }
org . junit . Assert . assertTrue ( run . get ( ) )
test_validDomains ( ) { "<AssertPlaceHolder>" ; } isValidDomainName ( java . lang . String ) { java . util . regex . Pattern p = java . util . regex . Pattern . compile ( fr . treeptik . cloudunit . utils . DomainUtils . DOMAIN_NAME_PATTERN ) ; java . util . regex . Matcher m = p . matcher ( domainName ) ; return m . matches ( ) ; }
org . junit . Assert . assertEquals ( expected , fr . treeptik . cloudunit . utils . DomainUtils . isValidDomainName ( domain ) )
empty ( ) { com . sap . prd . mobile . ios . mios . xcodeprojreader . BuildConfigurationList configList = new com . sap . prd . mobile . ios . mios . xcodeprojreader . BuildConfigurationList ( com . sap . prd . mobile . ios . mios . xcodeprojreader . ProjectFileTest . load ( ) ) ; "<AssertPlaceHolder>" ; } getBuildConfigurations ( ) { return new com . sap . prd . mobile . ios . mios . xcodeprojreader . ReferenceArray < com . sap . prd . mobile . ios . mios . xcodeprojreader . BuildConfiguration > ( getProjectFile ( ) , getDict ( ) . getOrCreateAndSetArray ( "buildConfigurations" ) , new com . sap . prd . mobile . ios . mios . xcodeprojreader . ElementFactory < com . sap . prd . mobile . ios . mios . xcodeprojreader . BuildConfiguration > ( ) { @ com . sap . prd . mobile . ios . mios . xcodeprojreader . Override public com . sap . prd . mobile . ios . mios . xcodeprojreader . BuildConfiguration create ( com . sap . prd . mobile . ios . mios . xcodeprojreader . ProjectFile projectFile , com . sap . prd . mobile . ios . mios . xcodeprojreader . Dict dict ) { return new com . sap . prd . mobile . ios . mios . xcodeprojreader . BuildConfiguration ( projectFile , dict ) ; } } ) ; }
org . junit . Assert . assertEquals ( 0 , configList . getBuildConfigurations ( ) . size ( ) )
assertExecuteForMultipleStatementsSuccessWithDML ( ) { java . sql . Statement statement1 = getStatement ( ) ; java . sql . Statement statement2 = getStatement ( ) ; when ( statement1 . execute ( org . apache . shardingsphere . shardingjdbc . executor . StatementExecutorTest . DML_SQL ) ) . thenReturn ( false ) ; when ( statement2 . execute ( org . apache . shardingsphere . shardingjdbc . executor . StatementExecutorTest . DML_SQL ) ) . thenReturn ( false ) ; setExecuteGroups ( java . util . Arrays . asList ( statement1 , statement2 ) , SQLType . DML ) ; "<AssertPlaceHolder>" ; verify ( statement1 ) . execute ( org . apache . shardingsphere . shardingjdbc . executor . StatementExecutorTest . DML_SQL ) ; verify ( statement2 ) . execute ( org . apache . shardingsphere . shardingjdbc . executor . StatementExecutorTest . DML_SQL ) ; } execute ( ) { return execute ( new org . apache . shardingsphere . shardingjdbc . executor . StatementExecutor . Executor ( ) { @ org . apache . shardingsphere . shardingjdbc . executor . Override public boolean execute ( final java . sql . Statement statement , final java . lang . String sql ) throws java . sql . SQLException { return statement . execute ( sql ) ; } } ) ; }
org . junit . Assert . assertFalse ( actual . execute ( ) )