input
stringlengths
28
18.7k
output
stringlengths
39
1.69k
ODataTYPE_ODATA_COLLECTION ( ) { java . lang . String odatacolName = "odataCol" ; java . lang . String webDavColName = "davCol" ; java . lang . String svcColName = "svcCol" ; com . fujitsu . dc . core . model . DavCmp odataCol = com . fujitsu . dc . test . unit . core . bar . BarFileContentsTest . newDavCmp ( com . fujitsu . dc . test . unit . core . bar . BarFileContentsTest . ODATA_COL_NAME ) ; com . fujitsu . dc . core . model . DavCmp webDavCol = com . fujitsu . dc . test . unit . core . bar . BarFileContentsTest . newDavCmp ( com . fujitsu . dc . test . unit . core . bar . BarFileContentsTest . WEBDAV_COL_NAME ) ; com . fujitsu . dc . core . model . DavCmp svcCol = com . fujitsu . dc . test . unit . core . bar . BarFileContentsTest . newDavCmp ( com . fujitsu . dc . test . unit . core . bar . BarFileContentsTest . SVC_COL_NAME ) ; java . util . Map < java . lang . String , com . fujitsu . dc . core . model . DavCmp > odataCols = new java . util . HashMap < java . lang . String , com . fujitsu . dc . core . model . DavCmp > ( ) ; java . util . Map < java . lang . String , com . fujitsu . dc . core . model . DavCmp > webDavCols = new java . util . HashMap < java . lang . String , com . fujitsu . dc . core . model . DavCmp > ( ) ; java . util . Map < java . lang . String , com . fujitsu . dc . core . model . DavCmp > svcCols = new java . util . HashMap < java . lang . String , com . fujitsu . dc . core . model . DavCmp > ( ) ; java . lang . String entryName = "bar/90_contents/odataCol/90_data/entityType/1.json" ; java . lang . String key = "bar/90_contents/" + odatacolName ; odataCols . put ( key , odataCol ) ; key = "bar/90_contents/" + webDavColName ; webDavCols . put ( key , webDavCol ) ; key = "bar/90_contents/" + svcColName ; svcCols . put ( key , svcCol ) ; java . util . Map < java . lang . String , java . lang . String > davFileMap = new java . util . HashMap < java . lang . String , java . lang . String > ( ) ; com . fujitsu . dc . test . unit . core . bar . BarFileContentsTest . TestBarRunner testBarRunner = new com . fujitsu . dc . test . unit . core . bar . BarFileContentsTest . TestBarRunner ( ) ; int res = testBarRunner . getEntryType ( entryName , odataCols , webDavCols , svcCols , davFileMap ) ; "<AssertPlaceHolder>" ; } getEntryType ( java . lang . String , java . util . Map , java . util . Map , java . util . Map , java . util . Map ) { if ( odataCols . containsKey ( entryName ) ) { return com . fujitsu . dc . core . bar . BarFileReadRunner . TYPE_ODATA_COLLECTION ; } else if ( webdavCols . containsKey ( entryName ) ) { return com . fujitsu . dc . core . bar . BarFileReadRunner . TYPE_WEBDAV_COLLECTION ; } else if ( serviceCols . containsKey ( entryName ) ) { return com . fujitsu . dc . core . bar . BarFileReadRunner . TYPE_SERVICE_COLLECTION ; } else if ( davFiles . containsKey ( entryName ) ) { return com . fujitsu . dc . core . bar . BarFileReadRunner . TYPE_DAV_FILE ; } for ( java . util . Map . Entry < java . lang . String , com . fujitsu . dc . core . model . DavCmp > entry : odataCols . entrySet ( ) ) { java . lang . String odataColPath = entry . getKey ( ) ; if ( entryName . startsWith ( odataColPath ) ) { return com . fujitsu . dc . core . bar . BarFileReadRunner . TYPE_ODATA_COLLECTION ; } } for ( java . util . Map . Entry < java . lang . String , com . fujitsu . dc . core . model . DavCmp > entry : serviceCols . entrySet ( ) ) { java . lang . String serviceColPath = entry . getKey ( ) ; if ( entryName . startsWith ( serviceColPath ) ) { return com . fujitsu . dc . core . bar . BarFileReadRunner . TYPE_SVC_FILE ; } } return com . fujitsu . dc . core . bar . BarFileReadRunner . TYPE_MISMATCH ; }
org . junit . Assert . assertEquals ( 1 , res )
secondCall ( ) { "<AssertPlaceHolder>" ; } getMessages ( ) { return messages ; }
org . junit . Assert . assertEquals ( 1 , bean . getMessages ( ) . size ( ) )
testAdaptNull ( ) { "<AssertPlaceHolder>" ; } adapt ( org . apache . commons . functor . Function ) { return null == function ? null : new org . apache . commons . functor . adapter . IgnoreLeftFunction < L , R , T > ( function ) ; }
org . junit . Assert . assertNull ( org . apache . commons . functor . adapter . IgnoreLeftFunction . adapt ( null ) )
testDSDeletionResponse ( ) { java . lang . String base64 = "bwAAAAMAB291dGNvbWVzAAdzdWNjZXNzAAZyZXN1bHRvAAAAAQANc2VydmVyLWdyb3Vwc28AAAAC\n" + ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "ABFtYWluLXNlcnZlci1ncm91cG8AAAACAApzZXJ2ZXItdHdvbwAAAAIABGhvc3RzAAVsb2NhbAAI\n" + "cmVzcG9uc2VvAAAAAgAHb3V0Y29tZXMABmZhaWxlZAATZmFpbHVyZS1kZXNjcmlwdGlvbnMAqE5v\n" ) + "cmVzcG9uc2VvAAAAAgAHb3V0Y29tZXMABmZhaWxlZAATZmFpbHVyZS1kZXNjcmlwdGlvbnMAqE5v\n" 3 ) + "cmVzcG9uc2VvAAAAAgAHb3V0Y29tZXMABmZhaWxlZAATZmFpbHVyZS1kZXNjcmlwdGlvbnMAqE5v\n" 6 ) + "cmVzcG9uc2VvAAAAAgAHb3V0Y29tZXMABmZhaWxlZAATZmFpbHVyZS1kZXNjcmlwdGlvbnMAqE5v\n" 2 ) + "dmVyLW9uZW8AAAACAARob3N0cwAFbG9jYWwACHJlc3BvbnNlbwAAAAIAB291dGNvbWVzAAZmYWls\n" ) + "cmVzcG9uc2VvAAAAAgAHb3V0Y29tZXMABmZhaWxlZAATZmFpbHVyZS1kZXNjcmlwdGlvbnMAqE5v\n" 9 ) + "cyBbCiAgICAoImhvc3QiID0+ICJsb2NhbCIpLAogICAgKCJzZXJ2ZXIiID0+ICJzZXJ2ZXItb25l\n" ) + "IiksCiAgICAoInN1YnN5c3RlbSIgPT4gImRhdGFzb3VyY2VzIiksCiAgICAoImRhdGEtc291cmNl\n" ) + "cmVzcG9uc2VvAAAAAgAHb3V0Y29tZXMABmZhaWxlZAATZmFpbHVyZS1kZXNjcmlwdGlvbnMAqE5v\n" 8 ) + "dGhyZWVvAAAAAgAEaG9zdHMABWxvY2FsAAhyZXNwb25zZW8AAAACAAdvdXRjb21lcwAGZmFpbGVk\n" ) + "ABNmYWlsdXJlLWRlc2NyaXB0aW9ucwB0b3JnLmpib3NzLm1zYy5zZXJ2aWNlLkR1cGxpY2F0ZVNl\n" ) + "cmVzcG9uc2VvAAAAAgAHb3V0Y29tZXMABmZhaWxlZAATZmFpbHVyZS1kZXNjcmlwdGlvbnMAqE5v\n" 5 ) + "TXlEUyBpcyBhbHJlYWR5IHJlZ2lzdGVyZWQAFmNvbXBlbnNhdGluZy1vcGVyYXRpb25vAAAACgAJ\n" ) + "cmVzcG9uc2VvAAAAAgAHb3V0Y29tZXMABmZhaWxlZAATZmFpbHVyZS1kZXNjcmlwdGlvbnMAqE5v\n" 4 ) + "c3RlbXMAC2RhdGFzb3VyY2VzcAALZGF0YS1zb3VyY2VzAA1kYXRhYmFzZS9NeURTAA5jb25uZWN0\n" ) + "cmVzcG9uc2VvAAAAAgAHb3V0Y29tZXMABmZhaWxlZAATZmFpbHVyZS1kZXNjcmlwdGlvbnMAqE5v\n" 7 ) + "cmVzcG9uc2VvAAAAAgAHb3V0Y29tZXMABmZhaWxlZAATZmFpbHVyZS1kZXNjcmlwdGlvbnMAqE5v\n" 1 ) + "cmVzcG9uc2VvAAAAAgAHb3V0Y29tZXMABmZhaWxlZAATZmFpbHVyZS1kZXNjcmlwdGlvbnMAqE5v\n" 0 ) ; org . jboss . dmr . client . ModelNode modelNode = null ; try { modelNode = org . jboss . dmr . client . ModelNode . fromBase64 ( base64 ) ; } catch ( java . lang . Throwable e ) { e . printStackTrace ( ) ; } "<AssertPlaceHolder>" ; } fromBase64 ( java . lang . String ) { org . jboss . dmr . client . ModelNode node = new org . jboss . dmr . client . ModelNode ( ) ; try { node . readExternal ( new org . jboss . dmr . client . DataInput ( org . jboss . dmr . client . Base64 . decode ( encoded ) ) ) ; } catch ( java . io . IOException e ) { throw new java . lang . IllegalArgumentException ( e ) ; } return node ; }
org . junit . Assert . assertNotNull ( modelNode )
test_recompileExpression ( ) { final org . adempiere . ad . expression . api . ILogicExpression expression = compile ( "(@a@='5'|@b@!@c@)&@d@>3<sp>|<sp>@x@<'10'&@y@!@z@" , true ) ; final org . adempiere . ad . expression . api . ILogicExpression expressionRecompiled = recompile ( expression , true ) ; "<AssertPlaceHolder>" ; } recompile ( org . adempiere . ad . expression . api . ILogicExpression , boolean ) { final java . lang . String expressionStr = expression . getFormatedExpressionString ( ) ; compiler . setUseOperatorPrecedence ( useOperatorPrecendence ) ; return compiler . compile ( expressionStr ) ; }
org . junit . Assert . assertEquals ( expression , expressionRecompiled )
testGetAttribute ( ) { cern . c2mon . shared . common . datatag . address . JMXHardwareAddress addr1 = new cern . c2mon . shared . common . datatag . address . impl . JMXHardwareAddressImpl ( "java.lang:type=Runtime" , "java.vm.version" ) ; "<AssertPlaceHolder>" ; } getAttribute ( ) { return this . attribute ; }
org . junit . Assert . assertEquals ( "java.vm.version" , addr1 . getAttribute ( ) )
importFromPostgreSQL ( ) { java . util . List < com . change_vision . astah . extension . plugin . dbreverse . reverser . model . TableInfo > dummyInfo = new java . util . ArrayList < com . change_vision . astah . extension . plugin . dbreverse . reverser . model . TableInfo > ( ) ; when ( reader . getTables ( null , "PUBLIC" ) ) . thenReturn ( dummyInfo ) ; when ( reader . getRelationships ( dummyInfo ) ) . thenReturn ( new java . util . ArrayList < com . change_vision . astah . extension . plugin . dbreverse . reverser . model . ERRelationshipInfo > ( ) ) ; com . change_vision . astah . extension . plugin . dbreverse . reverser . ImportToProject importer = new com . change_vision . astah . extension . plugin . dbreverse . reverser . ImportToProject ( reader ) ; boolean imported = importer . doImport ( DatabaseTypes . POSTGRES . getType ( ) , "PUBLIC" ) ; "<AssertPlaceHolder>" ; } getType ( ) { return type ; }
org . junit . Assert . assertThat ( imported , org . hamcrest . CoreMatchers . is ( true ) )
testFlowWithInputsAsString ( ) { java . net . URI resource = getClass ( ) . getResource ( "/corrupted/inputs_type_string_flow.sl" ) . toURI ( ) ; io . cloudslang . lang . compiler . modeller . result . ExecutableModellingResult result = compiler . preCompileSource ( io . cloudslang . lang . compiler . SlangSource . fromFile ( resource ) ) ; "<AssertPlaceHolder>" ; exception . expect ( io . cloudslang . lang . compiler . RuntimeException . class ) ; exception . expectMessage ( ( "For<sp>flow<sp>\'inputs_type_string_flow\'<sp>syntax<sp>is<sp>illegal.\n" + ( "Under<sp>property:<sp>'inputs'<sp>there<sp>should<sp>be<sp>a<sp>list<sp>of<sp>values,<sp>" + "but<sp>instead<sp>there<sp>is<sp>a<sp>string." ) ) ) ; throw result . getErrors ( ) . get ( 0 ) ; } getErrors ( ) { return errors ; }
org . junit . Assert . assertTrue ( ( ( result . getErrors ( ) . size ( ) ) > 0 ) )
testGetClassMappings ( ) { java . util . List < com . github . dozermapper . core . metadata . ClassMappingMetadata > metadata = mapMetadata . getClassMappings ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return classMappings . size ( ) ; }
org . junit . Assert . assertTrue ( ( ( metadata . size ( ) ) == 4 ) )
testSize ( ) { org . apache . tajo . datum . Datum d = org . apache . tajo . datum . DatumFactory . createInt4 ( 5 ) ; "<AssertPlaceHolder>" ; } size ( ) { return casesMap . size ( ) ; }
org . junit . Assert . assertEquals ( 4 , d . size ( ) )
testNoEncryptionWAL ( ) { org . apache . accumulo . core . spi . crypto . CryptoService cs = org . apache . accumulo . core . crypto . CryptoServiceFactory . newDefaultInstance ( ) ; byte [ ] encryptedBytes = encrypt ( cs , Scope . WAL , org . apache . accumulo . core . crypto . CryptoTest . CRYPTO_OFF_CONF ) ; java . lang . String stringifiedBytes = java . util . Arrays . toString ( encryptedBytes ) ; java . lang . String stringifiedMarkerBytes = getStringifiedBytes ( "U+1F47B" . getBytes ( ) , org . apache . accumulo . core . crypto . CryptoTest . MARKER_STRING , org . apache . accumulo . core . crypto . CryptoTest . MARKER_INT ) ; "<AssertPlaceHolder>" ; decrypt ( encryptedBytes , Scope . WAL , org . apache . accumulo . core . crypto . CryptoTest . CRYPTO_OFF_CONF ) ; } getStringifiedBytes ( byte [ ] , java . lang . String , int ) { java . io . ByteArrayOutputStream out = new java . io . ByteArrayOutputStream ( ) ; java . io . DataOutputStream dataOut = new java . io . DataOutputStream ( out ) ; if ( params != null ) { dataOut . writeInt ( params . length ) ; dataOut . write ( params ) ; } dataOut . writeUTF ( s ) ; dataOut . writeInt ( i ) ; dataOut . close ( ) ; byte [ ] stringMarkerBytes = out . toByteArray ( ) ; return java . util . Arrays . toString ( stringMarkerBytes ) ; }
org . junit . Assert . assertEquals ( stringifiedBytes , stringifiedMarkerBytes )
testAddFacetOptions ( ) { org . springframework . data . solr . core . query . FacetOptions facetOptions = new org . springframework . data . solr . core . query . FacetOptions ( "field_1" , "field_2" ) ; org . springframework . data . solr . core . query . FacetQuery query = new org . springframework . data . solr . core . query . SimpleFacetQuery ( ) . setFacetOptions ( facetOptions ) ; "<AssertPlaceHolder>" ; } getFacetOptions ( ) { return this . facetOptions ; }
org . junit . Assert . assertEquals ( facetOptions , query . getFacetOptions ( ) )
testToWidgetValue ( ) { java . util . Date date = new java . util . Date ( ) ; java . lang . String dateStr = converter . toWidgetValue ( date ) ; final java . lang . String expected = new java . text . SimpleDateFormat ( "dd/MM/yyyy<sp>HH:mm" ) . format ( date ) ; "<AssertPlaceHolder>" ; } toWidgetValue ( java . util . Date ) { return org . jbpm . workbench . common . client . util . DateUtils . getDateTimeStr ( date ) ; }
org . junit . Assert . assertEquals ( expected , dateStr )
getLogAppendersByApplicationTokenTest ( ) { org . kaaproject . kaa . common . dto . logs . LogAppenderDto appenderDto = createLogAppender ( null , null ) ; java . util . List < org . kaaproject . kaa . common . dto . logs . LogAppenderDto > found = client . getLogAppendersByAppToken ( appenderDto . getApplicationToken ( ) ) ; "<AssertPlaceHolder>" ; } getApplicationToken ( ) { return applicationToken ; }
org . junit . Assert . assertEquals ( 1 , found . size ( ) )
whenInitializeUnmodifiableSetWithDoubleBrace_containsElements ( ) { java . util . Set < java . lang . String > countries = java . util . stream . Stream . of ( "India" , "USSR" , "USA" ) . collect ( collectingAndThen ( toSet ( ) , Collections :: unmodifiableSet ) ) ; "<AssertPlaceHolder>" ; } contains ( java . lang . Object ) { if ( o instanceof java . lang . String ) { return cookieMap . containsKey ( o ) ; } if ( o instanceof javax . servlet . http . Cookie ) { return cookieMap . containsValue ( o ) ; } return false ; }
org . junit . Assert . assertTrue ( countries . contains ( "India" ) )
responseMessageOnErrorShouldDispatchPauseEvent ( ) { com . willwinder . universalgcodesender . connection . Connection connection = mock ( com . willwinder . universalgcodesender . connection . Connection . class ) ; instance . setConnection ( connection ) ; com . willwinder . universalgcodesender . listeners . SerialCommunicatorListener serialCommunicatorListener = mock ( com . willwinder . universalgcodesender . listeners . SerialCommunicatorListener . class ) ; instance . addCommandEventListener ( serialCommunicatorListener ) ; asl . add ( new com . willwinder . universalgcodesender . types . GcodeCommand ( "G0" ) ) ; asl . add ( new com . willwinder . universalgcodesender . types . GcodeCommand ( "G0" ) ) ; instance . streamCommands ( ) ; instance . responseMessage ( "error" ) ; "<AssertPlaceHolder>" ; verify ( serialCommunicatorListener , times ( 1 ) ) . communicatorPausedOnError ( ) ; } isPaused ( ) { return ( ( this . controller ) != null ) && ( this . controller . isPaused ( ) ) ; }
org . junit . Assert . assertTrue ( instance . isPaused ( ) )
testNeedsRollingUpdateReadinessDelay ( ) { a . getSpec ( ) . getTemplate ( ) . getSpec ( ) . getContainers ( ) . get ( 0 ) . getReadinessProbe ( ) . setInitialDelaySeconds ( ( ( a . getSpec ( ) . getTemplate ( ) . getSpec ( ) . getContainers ( ) . get ( 0 ) . getReadinessProbe ( ) . getInitialDelaySeconds ( ) ) + 1 ) ) ; "<AssertPlaceHolder>" ; } needsRollingUpdate ( io . strimzi . operator . cluster . operator . resource . StatefulSetDiff ) { if ( diff . changesLabels ( ) ) { io . strimzi . operator . cluster . operator . resource . KafkaSetOperator . log . debug ( "Changed<sp>labels<sp>=><sp>needs<sp>rolling<sp>update" ) ; return true ; } if ( diff . changesSpecTemplate ( ) ) { io . strimzi . operator . cluster . operator . resource . KafkaSetOperator . log . debug ( "Changed<sp>template<sp>spec<sp>=><sp>needs<sp>rolling<sp>update" ) ; return true ; } if ( diff . changesVolumeClaimTemplates ( ) ) { io . strimzi . operator . cluster . operator . resource . KafkaSetOperator . log . debug ( "Changed<sp>volume<sp>claim<sp>template<sp>=><sp>needs<sp>rolling<sp>update" ) ; return true ; } return false ; }
org . junit . Assert . assertTrue ( io . strimzi . operator . cluster . operator . resource . KafkaSetOperator . needsRollingUpdate ( diff ( ) ) )
testCreateShoppingCartOrder ( ) { try { java . lang . String orderId = runFlowAndGetPayload ( "create-shopping-cart-order" ) ; "<AssertPlaceHolder>" ; java . lang . Integer . parseInt ( orderId ) ; upsertOnTestRunMessage ( "orderId" , orderId ) ; } catch ( java . lang . Exception e ) { org . junit . Assert . fail ( org . mule . modules . tests . ConnectorTestUtils . getStackTrace ( e ) ) ; } }
org . junit . Assert . assertNotNull ( orderId )
testIsTransformationPossiblePath_shouldFindPath ( ) { org . openengsb . core . ekb . api . transformation . TransformationDescription description = getDescriptionForModelAToModelB ( ) ; org . openengsb . core . ekb . graph . orient . OrientModelGraphTest . graph . addTransformation ( description ) ; org . openengsb . core . ekb . api . transformation . TransformationDescription description2 = getDescriptionForModelBToModelC ( ) ; org . openengsb . core . ekb . graph . orient . OrientModelGraphTest . graph . addTransformation ( description2 ) ; boolean possible = org . openengsb . core . ekb . graph . orient . OrientModelGraphTest . graph . isTransformationPossible ( org . openengsb . core . ekb . graph . orient . OrientModelGraphTest . getModelADescription ( ) , org . openengsb . core . ekb . graph . orient . OrientModelGraphTest . getModelBDescription ( ) , null ) ; "<AssertPlaceHolder>" ; } getModelBDescription ( ) { return new org . openengsb . core . api . model . ModelDescription ( org . openengsb . core . ekb . graph . orient . models . ModelB . class , new org . osgi . framework . Version ( 1 , 0 , 0 ) . toString ( ) ) ; }
org . junit . Assert . assertThat ( possible , org . hamcrest . CoreMatchers . is ( true ) )
testGetAll ( ) { java . util . List < org . yes . cart . domain . dto . EtypeDTO > list = dtoEtypeService . getAll ( ) ; "<AssertPlaceHolder>" ; } getAll ( ) { return this . shopDao . findAll ( ) ; }
org . junit . Assert . assertFalse ( list . isEmpty ( ) )
decodeStateNode_node ( ) { com . vaadin . client . flow . StateTree tree = new com . vaadin . client . flow . StateTree ( null ) ; com . vaadin . client . flow . StateNode node = new com . vaadin . client . flow . StateNode ( 43 , tree ) ; tree . registerNode ( node ) ; elemental . js . dom . JsElement element = new elemental . js . dom . JsElement ( ) { } ; node . setDomNode ( element ) ; elemental . json . JsonArray json = com . vaadin . flow . internal . JsonUtils . createArray ( elemental . json . Json . create ( JsonCodec . NODE_TYPE ) , elemental . json . Json . create ( node . getId ( ) ) ) ; com . vaadin . client . flow . StateNode decoded = com . vaadin . client . flow . util . ClientJsonCodec . decodeStateNode ( tree , json ) ; "<AssertPlaceHolder>" ; } decodeStateNode ( com . vaadin . client . flow . StateTree , elemental . json . JsonValue ) { if ( ( json . getType ( ) ) == ( elemental . json . JsonType . ARRAY ) ) { elemental . json . JsonArray array = ( ( elemental . json . JsonArray ) ( json ) ) ; int typeId = ( ( int ) ( array . getNumber ( 0 ) ) ) ; switch ( typeId ) { case com . vaadin . flow . internal . JsonCodec . NODE_TYPE : { int nodeId = ( ( int ) ( array . getNumber ( 1 ) ) ) ; return tree . getNode ( nodeId ) ; } case com . vaadin . flow . internal . JsonCodec . ARRAY_TYPE : case com . vaadin . flow . internal . JsonCodec . RETURN_CHANNEL_TYPE : return null ; default : throw new java . lang . IllegalArgumentException ( ( "Unsupported<sp>complex<sp>type<sp>in<sp>" + ( array . toJson ( ) ) ) ) ; } } else { return null ; } }
org . junit . Assert . assertSame ( node , decoded )
testFrom39 ( ) { java . net . URL url = getClass ( ) . getResource ( "Prd-5245-from39.prpt" ) ; org . pentaho . reporting . engine . classic . core . MasterReport report = ( ( org . pentaho . reporting . engine . classic . core . MasterReport ) ( new org . pentaho . reporting . libraries . resourceloader . ResourceManager ( ) . createDirectly ( url , org . pentaho . reporting . engine . classic . core . MasterReport . class ) . getResource ( ) ) ) ; final java . io . ByteArrayOutputStream boutFast = new java . io . ByteArrayOutputStream ( ) ; final java . io . ByteArrayOutputStream boutSlow = new java . io . ByteArrayOutputStream ( ) ; org . pentaho . reporting . engine . classic . core . modules . output . fast . html . FastHtmlReportUtil . processStreamHtml ( report , boutFast ) ; org . pentaho . reporting . engine . classic . core . modules . output . table . html . HtmlReportUtil . createStreamHTML ( report , boutSlow ) ; java . lang . String htmlFast = boutFast . toString ( "UTF-8" ) ; java . lang . String htmlSlow = boutSlow . toString ( "UTF-8" ) ; "<AssertPlaceHolder>" ; } toString ( boolean ) { return builder . toString ( compact ) ; }
org . junit . Assert . assertEquals ( htmlSlow , htmlFast )
testCommandLine ( com . github . horrorho . liquiddonkey . settings . Property , java . lang . String , java . lang . String ) { java . lang . String [ ] args = in . split ( "\\s" ) ; java . util . Properties properties = com . github . horrorho . liquiddonkey . settings . commandline . CommandLinePropertiesFactory . create ( ) . from ( null , options , args ) ; java . lang . String value = ( properties . containsKey ( property . toString ( ) ) ) ? ( ( java . lang . String ) ( properties . get ( property . toString ( ) ) ) ) : null ; "<AssertPlaceHolder>" ; } toString ( ) { java . util . Map < java . lang . String , java . lang . String > attributesHex = hex ( attributes ) ; java . util . Map < java . lang . Integer , java . util . Map < java . lang . String , java . lang . String > > classKeysHex = classKeys . entrySet ( ) . stream ( ) . collect ( java . util . stream . Collectors . toMap ( java . util . Map . Entry :: getKey , ( e ) -> hex ( e . getValue ( ) ) ) ) ; return ( ( ( ( ( ( ( ( "KeyBag{" + "classKeys=" ) + classKeysHex ) + ",<sp>attributes=" ) + attributesHex ) + ",<sp>uuid=" ) + ( uuid ) ) + ",<sp>type=" ) + ( type ) ) + '}' ; }
org . junit . Assert . assertThat ( value , org . hamcrest . CoreMatchers . is ( expected ) )
testHeaderHeightWithCustomUserFont ( ) { tree = new org . eclipse . swt . widgets . Tree ( shell , org . eclipse . swt . SWT . SINGLE ) ; tree . setHeaderVisible ( true ) ; int headerHeight = tree . getHeaderHeight ( ) ; tree . setFont ( new org . eclipse . swt . graphics . Font ( display , "Arial" , 30 , org . eclipse . swt . SWT . NORMAL ) ) ; "<AssertPlaceHolder>" ; } getHeaderHeight ( ) { checkWidget ( ) ; if ( ! ( layoutCache . hasHeaderHeight ( ) ) ) { layoutCache . headerHeight = computeHeaderHeight ( ) ; } return layoutCache . headerHeight ; }
org . junit . Assert . assertTrue ( ( headerHeight < ( tree . getHeaderHeight ( ) ) ) )
drupalEditionAction_instance_supportPlacementExecution ( ) { dk . i2m . converge . plugins . drupal . DrupalEditionAction action = new dk . i2m . converge . plugins . drupal . DrupalEditionAction ( ) ; boolean supportsPlacement = action . isSupportPlacementExecute ( ) ; "<AssertPlaceHolder>" ; } isSupportPlacementExecute ( ) { return false ; }
org . junit . Assert . assertTrue ( supportsPlacement )
get_A$Request_HeaderInjection1 ( ) { com . m3 . curly . com . m3 . curly . Request request = new com . m3 . curly . com . m3 . curly . Request ( "http://localhost:8811/" ) ; request . setHeader ( "H1" , "dummy\n<sp>H2:<sp>evil" ) ; com . m3 . curly . com . m3 . curly . Response response = com . m3 . curly . com . m3 . curly . HTTP . get ( request ) ; "<AssertPlaceHolder>" ; } getStatus ( ) { return status ; }
org . junit . Assert . assertThat ( response . getStatus ( ) , is ( 200 ) )
test_until_end ( int , int , int , int , int , int , int , int , int ) { org . threeten . extra . chrono . DiscordianDate start = org . threeten . extra . chrono . DiscordianDate . of ( year1 , month1 , dom1 ) ; org . threeten . extra . chrono . DiscordianDate end = org . threeten . extra . chrono . DiscordianDate . of ( year2 , month2 , dom2 ) ; java . time . chrono . ChronoPeriod period = DiscordianChronology . INSTANCE . period ( yearPeriod , monthPeriod , domPeriod ) ; "<AssertPlaceHolder>" ; } until ( java . time . chrono . ChronoLocalDate ) { org . threeten . extra . chrono . PaxDate end = org . threeten . extra . chrono . PaxDate . from ( endDateExclusive ) ; int years = java . lang . Math . toIntExact ( yearsUntil ( end ) ) ; org . threeten . extra . chrono . PaxDate sameYearEnd = this . plusYears ( years ) ; int months = ( ( int ) ( sameYearEnd . monthsUntil ( end ) ) ) ; int days = ( ( int ) ( sameYearEnd . plusMonths ( months ) . daysUntil ( end ) ) ) ; return getChronology ( ) . period ( years , months , days ) ; }
org . junit . Assert . assertEquals ( period , start . until ( end ) )
testRetrievingOwnerDoesNotFailWhenFileDoesNotExist ( ) { org . apache . hadoop . fs . Path testdirectory = new org . apache . hadoop . fs . Path ( "/testDirectory123454565" ) ; java . lang . String owner = fs . getOwnerForPath ( testdirectory ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( "" , owner )
testOptionalInject ( ) { com . google . inject . Injector injector = org . apache . druid . initialization . Initialization . makeInjectorWithModules ( org . apache . druid . guice . GuiceInjectors . makeStartupInjector ( ) , com . google . common . collect . ImmutableList . of ( new com . google . inject . Module ( ) { @ org . apache . druid . client . cache . Override public void configure ( com . google . inject . Binder binder ) { org . apache . druid . guice . JsonConfigProvider . bindInstance ( binder , com . google . inject . Key . get ( org . apache . druid . server . DruidNode . class , org . apache . druid . guice . annotations . Self . class ) , new org . apache . druid . server . DruidNode ( "test-inject" , null , false , null , null , true , false ) ) ; } } ) ) ; org . apache . druid . client . cache . CacheMonitor monitor = injector . getInstance ( org . apache . druid . client . cache . CacheMonitor . class ) ; "<AssertPlaceHolder>" ; } get ( java . lang . String , java . lang . String ) { return get ( bucket , path , 0 ) ; }
org . junit . Assert . assertNull ( monitor . cache )
getAllTenants ( ) { runTX ( new java . util . concurrent . Callable < java . lang . Void > ( ) { @ org . oscm . tenant . dao . Override public org . oscm . tenant . dao . Void call ( ) throws org . oscm . tenant . dao . Exception { bean . addTenant ( org . oscm . tenant . assembler . TenantAssembler . toVOTenant ( tenant1 ) ) ; bean . addTenant ( org . oscm . tenant . assembler . TenantAssembler . toVOTenant ( tenant2 ) ) ; bean . addTenant ( org . oscm . tenant . assembler . TenantAssembler . toVOTenant ( tenant3 ) ) ; bean . addTenant ( org . oscm . tenant . assembler . TenantAssembler . toVOTenant ( tenant4 ) ) ; return null ; } } ) ; final java . util . List < org . oscm . domobjects . Tenant > tenants = runTX ( new java . util . concurrent . Callable < java . util . List < org . oscm . domobjects . Tenant > > ( ) { @ org . oscm . tenant . dao . Override public java . util . List < org . oscm . domobjects . Tenant > call ( ) throws org . oscm . internal . types . exception . NonUniqueBusinessKeyException { return tenantDao . getAllTenants ( ) ; } } ) ; "<AssertPlaceHolder>" ; } size ( ) { return categoriesForMarketplace . size ( ) ; }
org . junit . Assert . assertTrue ( ( ( tenants . size ( ) ) == 4 ) )
isNotebookPublicTest ( ) { org . apache . zeppelin . conf . ZeppelinConfiguration conf = new org . apache . zeppelin . conf . ZeppelinConfiguration ( this . getClass ( ) . getResource ( "/zeppelin-site.xml" ) ) ; boolean isIt = conf . isNotebokPublic ( ) ; "<AssertPlaceHolder>" ; } isNotebokPublic ( ) { return getBoolean ( org . apache . zeppelin . conf . ZeppelinConfiguration . ConfVars . ZEPPELIN_NOTEBOOK_PUBLIC ) ; }
org . junit . Assert . assertTrue ( isIt )
testApplication ( ) { try { com . datatorrent . api . LocalMode lma = com . datatorrent . api . LocalMode . newInstance ( ) ; org . apache . hadoop . conf . Configuration conf = new org . apache . hadoop . conf . Configuration ( false ) ; conf . set ( "dat.0" 1 , org . apache . apex . examples . JdbcIngest . JdbcPollerApplicationTest . URL ) ; conf . set ( "dat.0" 4 , org . apache . apex . examples . JdbcIngest . JdbcPollerApplicationTest . DB_DRIVER ) ; conf . setInt ( "dat.0" 3 , 2 ) ; conf . set ( "dt.application.PollJdbcToHDFSApp.operator.JdbcPoller.prop.key" , "ACCOUNT_NO" ) ; conf . set ( "dt.application.PollJdbcToHDFSApp.operator.JdbcPoller.prop.columnsExpression" , "ACCOUNT_NO,NAME,AMOUNT" ) ; conf . set ( "dt.application.PollJdbcToHDFSApp.operator.JdbcPoller.prop.tableName" , org . apache . apex . examples . JdbcIngest . JdbcPollerApplicationTest . TABLE_NAME ) ; conf . set ( "dt.application.PollJdbcToHDFSApp.operator.JdbcPoller.port.outputPort.attr.TUPLE_CLASS" , "org.apache.apex.examples.JdbcIngest.PojoEvent" ) ; conf . set ( "dt.application.PollJdbcToHDFSApp.operator.Writer.filePath" , org . apache . apex . examples . JdbcIngest . JdbcPollerApplicationTest . OUTPUT_DIR_NAME ) ; lma . prepareDAG ( new org . apache . apex . examples . JdbcIngest . JdbcPollerApplication ( ) , conf ) ; com . datatorrent . api . LocalMode . Controller lc = lma . getController ( ) ; lc . runAsync ( ) ; java . lang . Thread . sleep ( 45000 ) ; java . lang . String [ ] extensions = new java . lang . String [ ] { "dat.0" , "dat.0" 2 } ; java . util . Collection < java . io . File > list = org . apache . commons . io . FileUtils . listFiles ( new java . io . File ( org . apache . apex . examples . JdbcIngest . JdbcPollerApplicationTest . OUTPUT_DIR_NAME ) , extensions , false ) ; int recordsCount = 0 ; for ( java . io . File file : list ) { recordsCount += org . apache . commons . io . FileUtils . readLines ( file ) . size ( ) ; } "<AssertPlaceHolder>" ; } catch ( javax . validation . ConstraintViolationException e ) { org . junit . Assert . fail ( ( "constraint<sp>violations:<sp>" + ( e . getConstraintViolations ( ) ) ) ) ; } } size ( ) { return q . size ( ) ; }
org . junit . Assert . assertEquals ( "dat.0" 0 , 10 , recordsCount )
testGetItem ( ) { com . eclipsesource . tabris . widgets . swipe . SwipeItem item = mock ( com . eclipsesource . tabris . widgets . swipe . SwipeItem . class ) ; swipeItemHolder . addItem ( 0 , item ) ; com . eclipsesource . tabris . widgets . swipe . SwipeItem actualItem = swipeItemHolder . getItem ( 0 ) ; "<AssertPlaceHolder>" ; } getItem ( int ) { return items . get ( getKey ( index ) ) ; }
org . junit . Assert . assertSame ( item , actualItem )
assertClose ( ) { setCachedSingleXADataSourceMap ( "ds1" ) ; xaShardingTransactionManager . close ( ) ; java . util . Map < java . lang . String , org . apache . shardingsphere . transaction . xa . jta . datasource . SingleXADataSource > cachedSingleXADataSourceMap = getCachedSingleXADataSourceMap ( ) ; verify ( xaTransactionManager ) . removeRecoveryResource ( anyString ( ) , any ( javax . sql . XADataSource . class ) ) ; "<AssertPlaceHolder>" ; } removeRecoveryResource ( java . lang . String , javax . sql . XADataSource ) { }
org . junit . Assert . assertThat ( cachedSingleXADataSourceMap . size ( ) , org . hamcrest . CoreMatchers . is ( 0 ) )
deveObterIndicaodrContribuinteCTeComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe310 . classes . cadastro . NFRetornoConsultaCadastroSituacaoCadastral retorno = new com . fincatto . documentofiscal . nfe310 . classes . cadastro . NFRetornoConsultaCadastroSituacaoCadastral ( ) ; retorno . setIndicaodrContribuinteCTe ( NFIndicadorContribuinteCTe . CREDENCIADO ) ; "<AssertPlaceHolder>" ; } getIndicaodrContribuinteCTe ( ) { return this . indicaodrContribuinteCTe ; }
org . junit . Assert . assertEquals ( NFIndicadorContribuinteCTe . CREDENCIADO , retorno . getIndicaodrContribuinteCTe ( ) )
test ( ) { final uk . ac . ed . ph . jqtiplus . running . ItemSessionController itemSessionController = createItemSessionController ( true ) ; final uk . ac . ed . ph . jqtiplus . state . ItemSessionState itemSessionState = itemSessionController . getItemSessionState ( ) ; "<AssertPlaceHolder>" ; final java . util . Date timestamp = new java . util . Date ( ) ; itemSessionController . initialize ( timestamp ) ; itemSessionController . performTemplateProcessing ( timestamp ) ; } getTemplateValues ( ) { return java . util . Collections . unmodifiableMap ( templateValues ) ; }
org . junit . Assert . assertTrue ( itemSessionState . getTemplateValues ( ) . isEmpty ( ) )
testListeners ( ) { org . osgi . framework . ServiceRegistration < javax . servlet . Servlet > registerService = registerServlet ( ) ; org . ops4j . pax . web . itest . common . AbstractWhiteboardR6IntegrationTest . MyServletRequestListener listener = new org . ops4j . pax . web . itest . common . AbstractWhiteboardR6IntegrationTest . MyServletRequestListener ( ) ; java . util . Dictionary < java . lang . String , java . lang . String > properties = new java . util . Hashtable ( ) ; properties . put ( "osgi.http.whiteboard.listener" , "true" ) ; org . osgi . framework . ServiceRegistration < javax . servlet . ServletRequestListener > listenerService = bundleContext . registerService ( javax . servlet . ServletRequestListener . class , listener , properties ) ; org . ops4j . pax . web . itest . base . client . HttpTestClientFactory . createDefaultTestClient ( ) . withResponseAssertion ( "Response<sp>must<sp>contain<sp>'Servlet<sp>name:<sp>value'" , ( resp ) -> resp . contains ( "Servlet<sp>name:<sp>value" ) ) . doGETandExecuteTest ( "http://127.0.0.1:8181/myservlet" ) ; "<AssertPlaceHolder>" ; listenerService . unregister ( ) ; registerService . unregister ( ) ; } gotEvent ( ) { return event ; }
org . junit . Assert . assertThat ( listener . gotEvent ( ) , org . hamcrest . CoreMatchers . is ( true ) )
testGetTagsForResource ( ) { loadPatientResource ( ) ; java . util . List < org . hl7 . fhir . instance . model . AtomCategory > tags = testClient . getTagsForResource ( org . hl7 . fhir . instance . model . Patient . class , testPatientId ) ; "<AssertPlaceHolder>" ; unloadPatientResource ( ) ; } getTagsForResource ( java . lang . Class , java . lang . String ) { org . hl7 . fhir . instance . model . AtomFeed result = null ; try { result = org . hl7 . fhir . client . ClientUtils . issueGetFeedRequest ( resourceAddress . resolveGetTagsForResource ( resource , id ) , getPreferredResourceFormat ( ) , proxy ) ; } catch ( java . lang . Exception e ) { handleException ( "An<sp>error<sp>has<sp>occurred<sp>while<sp>trying<sp>to<sp>read<sp>this<sp>version<sp>of<sp>the<sp>resource" , e ) ; } return result . getTags ( ) ; }
org . junit . Assert . assertTrue ( ( ( tags != null ) && ( ( tags . size ( ) ) > 0 ) ) )
pathUtilTest15 ( ) { java . io . File [ ] roots = java . io . File . listRoots ( ) ; java . io . File basePath = new java . io . File ( ( ( ( ( roots [ 0 ] ) + "some" ) + ( java . io . File . separatorChar ) ) + "dir3" ) ) ; java . io . File relativePath = new java . io . File ( ( ( ( ( ( ( roots [ 0 ] ) + "some" ) + ( java . io . File . separatorChar ) ) + "dir" ) + ( java . io . File . separatorChar ) ) + "dir2" ) ) ; java . lang . String path = org . jf . util . PathUtil . getRelativeFileInternal ( basePath , relativePath ) ; "<AssertPlaceHolder>" ; } getRelativeFileInternal ( java . io . File , java . io . File ) { java . util . ArrayList < java . lang . String > basePath = org . jf . util . PathUtil . getPathComponents ( canonicalBaseFile ) ; java . util . ArrayList < java . lang . String > pathToRelativize = org . jf . util . PathUtil . getPathComponents ( canonicalFileToRelativize ) ; if ( ! ( basePath . get ( 0 ) . equals ( pathToRelativize . get ( 0 ) ) ) ) { return canonicalFileToRelativize . getPath ( ) ; } int commonDirs ; java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; for ( commonDirs = 1 ; ( commonDirs < ( basePath . size ( ) ) ) && ( commonDirs < ( pathToRelativize . size ( ) ) ) ; commonDirs ++ ) { if ( ! ( basePath . get ( commonDirs ) . equals ( pathToRelativize . get ( commonDirs ) ) ) ) { break ; } } boolean first = true ; for ( int i = commonDirs ; i < ( basePath . size ( ) ) ; i ++ ) { if ( ! first ) { sb . append ( File . separatorChar ) ; } else { first = false ; } sb . append ( ".." ) ; } first = true ; for ( int i = commonDirs ; i < ( pathToRelativize . size ( ) ) ; i ++ ) { if ( first ) { if ( ( sb . length ( ) ) != 0 ) { sb . append ( File . separatorChar ) ; } first = false ; } else { sb . append ( File . separatorChar ) ; } sb . append ( pathToRelativize . get ( i ) ) ; } if ( ( sb . length ( ) ) == 0 ) { return "." ; } return sb . toString ( ) ; }
org . junit . Assert . assertEquals ( path , ( ( ( ( ".." + ( java . io . File . separatorChar ) ) + "dir" ) + ( java . io . File . separatorChar ) ) + "dir2" ) )
getIotHubsWorks ( tests . unit . com . microsoft . azure . sdk . iot . provisioning . service . configs . SymmetricKeyAttestation ) { java . util . List < java . lang . String > expectedIotHubs = new java . util . ArrayList ( ) ; tests . unit . com . microsoft . azure . sdk . iot . provisioning . service . configs . IndividualEnrollment individualEnrollment = new tests . unit . com . microsoft . azure . sdk . iot . provisioning . service . configs . IndividualEnrollment ( "1234" , mockedAttestation ) ; tests . unit . com . microsoft . azure . sdk . iot . provisioning . service . configs . Deencapsulation . setField ( individualEnrollment , "iotHubs" , expectedIotHubs ) ; java . util . Collection < java . lang . String > actualIotHubs = individualEnrollment . getIotHubs ( ) ; "<AssertPlaceHolder>" ; } getIotHubs ( ) { return this . iotHubs ; }
org . junit . Assert . assertEquals ( expectedIotHubs , actualIotHubs )
testPath ( ) { com . fasterxml . jackson . databind . JsonNode source = com . flipkart . zjsonpatch . JsonDiffTest . objectMapper . readTree ( "{\"profiles\":{\"abc\":[],\"def\":[{\"hello\"},{\"0world\"}]}}" ) ; com . fasterxml . jackson . databind . JsonNode patch = com . flipkart . zjsonpatch . JsonDiffTest . objectMapper . readTree ( "[{\"op\"},{\"0copy\",\"from\"},{\"0/profiles/def/0\",<sp>\"path\"},{\"0/profiles/def/0\"},{\"op\"},{\"0replace\",\"path\"},{\"0/profiles/def/0/hello\",\"value\"},{\"0world2\"}]" ) ; com . fasterxml . jackson . databind . JsonNode target = com . flipkart . zjsonpatch . JsonPatch . apply ( patch , source ) ; com . fasterxml . jackson . databind . JsonNode expected = com . flipkart . zjsonpatch . JsonDiffTest . objectMapper . readTree ( "{\"profiles\":{\"abc\":[],\"def\":[{\"hello\"},{\"0world2\"},{\"hello\"},{\"0world\"}]}}" ) ; "<AssertPlaceHolder>" ; } readTree ( java . lang . String ) { return com . flipkart . zjsonpatch . ApiTest . objectMapper . readTree ( jsonString ) ; }
org . junit . Assert . assertEquals ( target , expected )
testMagNietGeleverdWordenAfgeleidAdministratiefIndicatiesOngewijzigd ( ) { final nl . bzk . brp . model . hisvolledig . impl . kern . PersoonHisVolledigImpl persoon = nl . bzk . brp . util . testpersoonbouwers . TestPersoonAntwoordPersoon . maakAntwoordPersoon ( ) ; final nl . bzk . brp . model . operationeel . kern . AdministratieveHandelingModel administratieveHandeling = maakAdministratieveHandeling ( ) ; final nl . bzk . brp . model . operationeel . kern . ActieModel actie = maakActie ( administratieveHandeling ) ; final nl . bzk . brp . model . operationeel . kern . HisPersoonAfgeleidAdministratiefModel eersteRecord = persoon . getPersoonAfgeleidAdministratiefHistorie ( ) . getActueleRecord ( ) ; final nl . bzk . brp . model . operationeel . kern . HisPersoonAfgeleidAdministratiefModel gewijzigdeRecord = new nl . bzk . brp . model . operationeel . kern . HisPersoonAfgeleidAdministratiefModel ( persoon , administratieveHandeling , administratieveHandeling . getTijdstipRegistratie ( ) , eersteRecord . getSorteervolgorde ( ) , eersteRecord . getIndicatieOnverwerktBijhoudingsvoorstelNietIngezeteneAanwezig ( ) , eersteRecord . getTijdstipLaatsteWijzigingGBASystematiek ( ) , actie ) ; persoon . getPersoonAfgeleidAdministratiefHistorie ( ) . voegToe ( gewijzigdeRecord ) ; final nl . bzk . brp . model . hisvolledig . predikaatview . kern . PersoonHisVolledigView persoonView = new nl . bzk . brp . model . hisvolledig . predikaatview . kern . PersoonHisVolledigView ( persoon , new nl . bzk . brp . model . hisvolledig . predikaat . AdministratieveHandelingDeltaPredikaat ( nl . bzk . brp . levering . business . bepalers . LegeBerichtBepalerImplTest . ADMINISTRATIEVE_HANDELING_ID ) ) ; for ( final nl . bzk . brp . model . operationeel . kern . HisPersoonAfgeleidAdministratiefModel afgeleidAdministratief : persoonView . getPersoonAfgeleidAdministratiefHistorie ( ) ) { afgeleidAdministratief . getIndicatieOnverwerktBijhoudingsvoorstelNietIngezeteneAanwezig ( ) . setMagGeleverdWorden ( true ) ; } final boolean resultaat = bepaler . magPersoonGeleverdWorden ( persoonView ) ; "<AssertPlaceHolder>" ; } magPersoonGeleverdWorden ( nl . bzk . brp . model . hisvolledig . predikaatview . kern . PersoonHisVolledigView ) { boolean magPersoonGeleverdWorden = false ; if ( ( persoonView != null ) && ( persoonView . isMagGeleverdWorden ( ) ) ) { if ( heeftWijzigingenInIdentificerendeGroep ( persoonView ) ) { magPersoonGeleverdWorden = true ; } else if ( isAfgeleidAdministratiefInhoudelijkGewijzigd ( persoonView ) ) { magPersoonGeleverdWorden = true ; } else if ( heeftWijzigingenBuitenIdentificerendeGroep ( persoonView ) ) { magPersoonGeleverdWorden = true ; } else if ( persoonView . heeftBetrokkenhedenVoorLeveren ( ) ) { magPersoonGeleverdWorden = true ; } else if ( heeftWijzigingenDoorOnderzoek ( persoonView ) ) { magPersoonGeleverdWorden = true ; } } return magPersoonGeleverdWorden ; }
org . junit . Assert . assertThat ( resultaat , org . hamcrest . Matchers . is ( false ) )
testDeleteRowsHappy ( ) { org . sagebionetworks . repo . model . table . Row row1 = org . sagebionetworks . repo . model . dbo . dao . table . TableModelTestUtils . createDeletionRow ( 1L , null ) ; org . sagebionetworks . repo . model . table . Row row2 = org . sagebionetworks . repo . model . dbo . dao . table . TableModelTestUtils . createDeletionRow ( 2L , null ) ; rawSet = new org . sagebionetworks . repo . model . table . RawRowSet ( rawSet . getIds ( ) , "aa" , tableId , com . google . common . collect . Lists . newArrayList ( row1 , row2 ) ) ; set . setRows ( com . google . common . collect . Lists . newArrayList ( row1 , row2 ) ) ; org . sagebionetworks . repo . model . table . RowSelection rowSelection = new org . sagebionetworks . repo . model . table . RowSelection ( ) ; rowSelection . setRowIds ( com . google . common . collect . Lists . newArrayList ( 1L , 2L ) ) ; rowSelection . setEtag ( "aa" ) ; org . sagebionetworks . repo . model . table . RowReferenceSet deleteRows = manager . deleteRows ( user , tableId , rowSelection ) ; "<AssertPlaceHolder>" ; verify ( mockTruthDao ) . appendRowSetToTable ( eq ( user . getId ( ) . toString ( ) ) , eq ( tableId ) , eq ( range . getEtag ( ) ) , eq ( range . getVersionNumber ( ) ) , anyListOf ( org . sagebionetworks . repo . model . table . ColumnModel . class ) , any ( org . sagebionetworks . repo . model . table . SparseChangeSetDto . class ) , anyLong ( ) ) ; verify ( mockTableManagerSupport , times ( 1 ) ) . setTableToProcessingAndTriggerUpdate ( tableId ) ; verify ( mockTableManagerSupport ) . validateTableWriteAccess ( user , tableId ) ; } deleteRows ( org . sagebionetworks . repo . model . UserInfo , java . lang . String , org . sagebionetworks . repo . model . table . RowSelection ) { org . sagebionetworks . manager . util . Validate . required ( user , "user" ) ; org . sagebionetworks . manager . util . Validate . required ( tableId , "tableId" ) ; org . sagebionetworks . manager . util . Validate . required ( rowsToDelete , "rowsToDelete" ) ; tableManagerSupport . validateTableWriteAccess ( user , tableId ) ; java . util . List < org . sagebionetworks . repo . model . table . ColumnModel > columns = tableManagerSupport . getColumnModelsForTable ( tableId ) ; org . sagebionetworks . table . model . SparseChangeSet changeSet = new org . sagebionetworks . table . model . SparseChangeSet ( tableId , columns , rowsToDelete . getEtag ( ) ) ; for ( java . lang . Long rowId : rowsToDelete . getRowIds ( ) ) { org . sagebionetworks . table . model . SparseRow row = changeSet . addEmptyRow ( ) ; row . setRowId ( rowId ) ; } long transactionId = tableTransactionDao . startTransaction ( tableId , user . getId ( ) ) ; org . sagebionetworks . repo . model . table . RowReferenceSet result = appendRowsToTable ( user , columns , changeSet , transactionId ) ; tableManagerSupport . setTableToProcessingAndTriggerUpdate ( tableId ) ; return result ; }
org . junit . Assert . assertNotNull ( deleteRows )
testGetBigNumberWithoutConversionMask ( ) { java . lang . String value = "100.5" ; org . pentaho . di . core . row . ValueMetaInterface stringValueMeta = new org . pentaho . di . core . row . value . ValueMetaString ( "test" ) ; java . math . BigDecimal expected = new java . math . BigDecimal ( 100.5 ) ; java . math . BigDecimal result = stringValueMeta . getBigNumber ( value ) ; "<AssertPlaceHolder>" ; } getBigNumber ( java . lang . Object ) { try { return meta . getBigNumber ( object ) ; } catch ( org . pentaho . di . core . exception . KettleValueException kve ) { throw new com . infobright . etl . model . ValueConverterException ( kve ) ; } }
org . junit . Assert . assertEquals ( expected , result )
testBuild ( ) { org . lnu . is . domain . specoffer . SpecOfferWave context = new org . lnu . is . domain . specoffer . SpecOfferWave ( ) ; java . lang . String expectedQuery = "SELECT<sp>e<sp>FROM<sp>SpecOfferWave<sp>e<sp>WHERE<sp>e.status=:status<sp>AND<sp>e.crtUserGroup<sp>IN<sp>(:userGroups)<sp>" ; org . lnu . is . pagination . MultiplePagedSearch < org . lnu . is . domain . specoffer . SpecOfferWave > pagedSearch = new org . lnu . is . pagination . MultiplePagedSearch ( ) ; pagedSearch . setEntity ( context ) ; java . lang . String actualQuery = unit . build ( pagedSearch ) ; "<AssertPlaceHolder>" ; } setEntity ( T ) { this . entity = entity ; }
org . junit . Assert . assertEquals ( expectedQuery , actualQuery )
test_valid_nonTestCaseItem ( ) { java . util . Map < java . lang . String , java . lang . Object > parameters = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; parameters . put ( IBuildParametes . ITEM , PropertiesFactory . eINSTANCE . createProcessItem ( ) ) ; org . talend . core . runtime . repository . build . TestCaseBuildProviderTest . TestCaseBuildProviderTestClass provider = new org . talend . core . runtime . repository . build . TestCaseBuildProviderTest . TestCaseBuildProviderTestClass ( ) ; "<AssertPlaceHolder>" ; } valid ( org . talend . repository . items . importexport . handlers . model . ImportItem ) { boolean valid = super . valid ( importItem ) ; if ( valid ) { org . talend . core . model . repository . ERepositoryObjectType itemType = importItem . getType ( ) ; if ( ( itemType != null ) && ( checkedItemTypes . contains ( itemType ) ) ) { if ( ( ! ( org . talend . commons . CommonsPlugin . isHeadless ( ) ) ) && ( isEnableProductChecking ( ) ) ) { java . lang . String currentPerspectiveId = org . talend . core . runtime . CoreRuntimePlugin . getInstance ( ) . getActivedPerspectiveId ( ) ; java . lang . String [ ] products = itemType . getProducts ( ) ; if ( products != null ) { for ( java . lang . String product : products ) { java . lang . String perspectiveId = org . talend . core . utils . ProductUtils . getPerspectiveId ( product ) ; if ( ( currentPerspectiveId != null ) && ( currentPerspectiveId . equals ( perspectiveId ) ) ) { return true ; } } return false ; } } return true ; } } return false ; }
org . junit . Assert . assertFalse ( provider . valid ( parameters ) )
testHashCode ( ) { "<AssertPlaceHolder>" ; } hashCode ( ) { return java . util . Objects . hash ( originalStringQuery ) ; }
org . junit . Assert . assertThat ( subject . hashCode ( ) , org . hamcrest . Matchers . is ( 1 ) )
testClassWithBuilder ( ) { final java . lang . String className = uk . gov . gchq . gaffer . serialisation . util . JsonSerialisationUtilTest . ClassWithBuilder . class . getName ( ) ; final java . util . Map < java . lang . String , java . lang . String > expectedValues = new java . util . HashMap ( ) ; expectedValues . put ( "field1" , java . lang . String . class . getName ( ) ) ; final java . util . Map < java . lang . String , java . lang . String > result = uk . gov . gchq . gaffer . serialisation . util . JsonSerialisationUtil . getSerialisedFieldClasses ( className ) ; "<AssertPlaceHolder>" ; } entrySet ( ) { return multiMap . entrySet ( ) ; }
org . junit . Assert . assertEquals ( expectedValues . entrySet ( ) , result . entrySet ( ) )
in_memory_configuration_should_use_default_embedded_instance ( ) { org . infinispan . manager . EmbeddedCacheManager embeddedInstance = mock ( org . infinispan . manager . EmbeddedCacheManager . class ) ; org . infinispan . Cache cache = mock ( org . infinispan . Cache . class ) ; when ( embeddedInstance . getCache ( ) ) . thenReturn ( cache ) ; com . lordofthejars . nosqlunit . infinispan . EmbeddedInfinispanInstancesFactory . getInstance ( ) . addEmbeddedInstance ( embeddedInstance , "a" ) ; com . lordofthejars . nosqlunit . infinispan . InfinispanConfiguration configuration = com . lordofthejars . nosqlunit . infinispan . EmbeddedInfinispanConfigurationBuilder . newEmbeddedInfinispanConfiguration ( ) . build ( ) ; "<AssertPlaceHolder>" ; com . lordofthejars . nosqlunit . infinispan . EmbeddedInfinispanInstancesFactory . getInstance ( ) . removeEmbeddedInstance ( "a" ) ; } getCache ( ) { return cache ; }
org . junit . Assert . assertThat ( cache , org . hamcrest . CoreMatchers . is ( ( ( org . infinispan . Cache ) ( configuration . getCache ( ) ) ) ) )
testSetReferenceEvent ( ) { org . opengis . util . InternationalString result = calendarEra1 . getReferenceEvent ( ) ; ( ( org . geotools . temporal . reference . DefaultCalendarEra ) ( calendarEra1 ) ) . setReferenceEvent ( new org . geotools . util . SimpleInternationalString ( "new<sp>Era<sp>description" ) ) ; "<AssertPlaceHolder>" ; } getReferenceEvent ( ) { return referenceEvent ; }
org . junit . Assert . assertFalse ( calendarEra1 . getReferenceEvent ( ) . equals ( result ) )
setFetchCount ( ) { timeline . setFetchCount ( book . twju . chapter_3 . TimelineTest . NEW_FETCH_COUNT ) ; "<AssertPlaceHolder>" ; } getFetchCount ( ) { return fetchCount ; }
org . junit . Assert . assertEquals ( book . twju . chapter_3 . TimelineTest . NEW_FETCH_COUNT , timeline . getFetchCount ( ) )
testParent ( ) { org . kefirsf . bb . conf . Scope scope = new org . kefirsf . bb . conf . Scope ( ) ; org . kefirsf . bb . conf . Scope parent = new org . kefirsf . bb . conf . Scope ( ) ; scope . setParent ( parent ) ; "<AssertPlaceHolder>" ; } getParent ( ) { return parent ; }
org . junit . Assert . assertEquals ( parent , scope . getParent ( ) )
testGetWebFacetVersionToInstall_noVersionWebXml ( ) { createFile ( "src/main/webapp/WEB-INF/web.xml" , "<web-app/>" ) ; "<AssertPlaceHolder>" ; } getWebFacetVersionToInstall ( org . eclipse . core . resources . IProject ) { org . eclipse . core . resources . IFile webXml = com . google . cloud . tools . eclipse . appengine . facets . WebProjectUtil . findInWebInf ( project , new org . eclipse . core . runtime . Path ( "web.xml" ) ) ; if ( webXml == null ) { return org . eclipse . jst . j2ee . web . project . facet . WebFacetUtils . WEB_31 ; } try ( java . io . InputStream in = webXml . getContents ( ) ) { java . lang . String servletVersion = com . google . cloud . tools . eclipse . appengine . standard . java8 . AppEngineStandardJre8ProjectFacetDetector . buildDomDocument ( in ) . getDocumentElement ( ) . getAttribute ( "version" ) ; if ( "2.5" . equals ( servletVersion ) ) { return org . eclipse . jst . j2ee . web . project . facet . WebFacetUtils . WEB_25 ; } } catch ( java . io . IOException | org . eclipse . core . runtime . CoreException | javax . xml . parsers . ParserConfigurationException | org . xml . sax . SAXException ex ) { } return org . eclipse . jst . j2ee . web . project . facet . WebFacetUtils . WEB_31 ; }
org . junit . Assert . assertEquals ( WebFacetUtils . WEB_31 , com . google . cloud . tools . eclipse . appengine . standard . java8 . AppEngineStandardJre8ProjectFacetDetector . getWebFacetVersionToInstall ( project ) )
fromCodeInvalidUnknownOutputPassingOptionTests ( ) { int invalidCode = 666 ; java . lang . String expectedMessage = "code" ; try { @ com . microsoft . windowsazure . services . media . implementation . templates . playreadylicense . SuppressWarnings ( "unused" ) com . microsoft . windowsazure . services . media . implementation . templates . playreadylicense . UnknownOutputPassingOption unknownOutputPassingOptionResult = com . microsoft . windowsazure . services . media . implementation . templates . playreadylicense . UnknownOutputPassingOption . fromCode ( invalidCode ) ; org . junit . Assert . fail ( "Should<sp>throw" ) ; } catch ( java . security . InvalidParameterException e ) { "<AssertPlaceHolder>" ; } } getMessage ( ) { return "hello" ; }
org . junit . Assert . assertEquals ( e . getMessage ( ) , expectedMessage )
scanLeft_A$Object ( ) { com . m3 . scalaflavor4j . Seq < java . lang . Integer > seq = com . m3 . scalaflavor4j . Nil . apply ( ) ; com . m3 . scalaflavor4j . Seq < java . lang . Integer > actual = seq . scanLeft ( 0 ) . apply ( new com . m3 . scalaflavor4j . F2 < java . lang . Integer , java . lang . Integer , java . lang . Integer > ( ) { @ com . m3 . scalaflavor4j . Override public com . m3 . scalaflavor4j . Integer apply ( java . lang . Integer acm , java . lang . Integer i ) { return acm + i ; } } ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return ( ( resource ) == null ) || ( ( resource . getResource ( ) ) == null ) ; }
org . junit . Assert . assertThat ( actual . isEmpty ( ) , org . hamcrest . CoreMatchers . is ( true ) )
relPathToBuffer ( ) { org . apache . jackrabbit . oak . plugins . document . Path p = org . apache . jackrabbit . oak . plugins . document . Path . fromString ( "foo/bar/quux" ) ; org . apache . jackrabbit . oak . plugins . document . persistentCache . DataTypeUtil . pathToBuffer ( p , wb ) ; java . nio . ByteBuffer rb = org . apache . jackrabbit . oak . plugins . document . persistentCache . DataTypeUtilTest . readBufferFrom ( wb ) ; "<AssertPlaceHolder>" ; } pathFromBuffer ( java . nio . ByteBuffer ) { int numElements = org . h2 . mvstore . DataUtils . readVarInt ( buffer ) ; java . util . List < java . lang . String > elements = new java . util . ArrayList ( numElements ) ; for ( int i = 0 ; i < numElements ; i ++ ) { elements . add ( StringDataType . INSTANCE . read ( buffer ) ) ; } java . lang . String firstElement = elements . get ( ( ( elements . size ( ) ) - 1 ) ) ; org . apache . jackrabbit . oak . plugins . document . Path p ; if ( firstElement . isEmpty ( ) ) { p = org . apache . jackrabbit . oak . plugins . document . Path . ROOT ; } else { p = new org . apache . jackrabbit . oak . plugins . document . Path ( firstElement ) ; } for ( int i = ( elements . size ( ) ) - 2 ; i >= 0 ; i -- ) { p = new org . apache . jackrabbit . oak . plugins . document . Path ( p , elements . get ( i ) ) ; } return p ; }
org . junit . Assert . assertEquals ( p , org . apache . jackrabbit . oak . plugins . document . persistentCache . DataTypeUtil . pathFromBuffer ( rb ) )
calcHttpsProxyTest ( ) { org . powermock . api . mockito . PowerMockito . mockStatic ( com . aliyuncs . http . clients . HttpUtil . class ) ; org . mockito . BDDMockito . given ( com . aliyuncs . http . clients . HttpUtil . needProxy ( ( ( java . lang . String ) ( isNotNull ( ) ) ) , ( ( java . lang . String ) ( isNull ( ) ) ) , ( ( java . lang . String ) ( isNull ( ) ) ) ) ) . willReturn ( true ) ; org . apache . http . HttpHost proxy0 = mock ( org . apache . http . HttpHost . class ) ; org . mockito . BDDMockito . given ( com . aliyuncs . http . clients . HttpUtil . getApacheProxy ( ( ( java . lang . String ) ( isNull ( ) ) ) , ( ( java . lang . String ) ( isNull ( ) ) ) , any ( com . aliyuncs . http . clients . HttpRequest . class ) ) ) . willReturn ( proxy0 ) ; com . aliyuncs . http . clients . HttpClientConfig config = this . getMockHttpClientConfigWithFalseIgnoreSSLCerts ( ) ; com . aliyuncs . http . clients . ApacheHttpClient client = com . aliyuncs . http . clients . ApacheHttpClient . getInstance ( ) ; client . init ( config ) ; com . aliyuncs . http . clients . HttpRequest httpRequest = mock ( com . aliyuncs . http . clients . HttpRequest . class ) ; org . mockito . Mockito . when ( httpRequest . getSysUrl ( ) ) . thenReturn ( "https://www.aliyun.com" ) ; org . apache . http . HttpHost proxy = org . powermock . reflect . Whitebox . invokeMethod ( client , "calcProxy" , httpRequest ) ; "<AssertPlaceHolder>" ; } getSysUrl ( ) { return url ; }
org . junit . Assert . assertEquals ( proxy0 , proxy )
testPathJoinOnMidColumn ( ) { org . gradoop . common . model . impl . id . GradoopId v0 = org . gradoop . common . model . impl . id . GradoopId . get ( ) ; org . gradoop . common . model . impl . id . GradoopId v1 = org . gradoop . common . model . impl . id . GradoopId . get ( ) ; org . gradoop . common . model . impl . id . GradoopId v2 = org . gradoop . common . model . impl . id . GradoopId . get ( ) ; org . gradoop . common . model . impl . id . GradoopId v3 = org . gradoop . common . model . impl . id . GradoopId . get ( ) ; org . gradoop . common . model . impl . id . GradoopId v4 = org . gradoop . common . model . impl . id . GradoopId . get ( ) ; org . gradoop . common . model . impl . id . GradoopId e0 = org . gradoop . common . model . impl . id . GradoopId . get ( ) ; org . gradoop . common . model . impl . id . GradoopId e1 = org . gradoop . common . model . impl . id . GradoopId . get ( ) ; org . gradoop . common . model . impl . id . GradoopId e2 = org . gradoop . common . model . impl . id . GradoopId . get ( ) ; org . gradoop . common . model . impl . id . GradoopId e3 = org . gradoop . common . model . impl . id . GradoopId . get ( ) ; org . gradoop . flink . model . impl . operators . matching . single . cypher . pojos . Embedding left = createEmbedding ( v0 , e0 , v1 , e1 , v2 ) ; org . gradoop . flink . model . impl . operators . matching . single . cypher . pojos . Embedding right = createEmbedding ( v3 , e2 , v1 , e3 , v4 ) ; org . gradoop . flink . model . impl . operators . matching . single . cypher . operators . join . functions . MergeEmbeddings udf = new org . gradoop . flink . model . impl . operators . matching . single . cypher . operators . join . functions . MergeEmbeddings ( 5 , com . google . common . collect . Lists . newArrayList ( 2 ) , com . google . common . collect . Lists . newArrayList ( ) , com . google . common . collect . Lists . newArrayList ( ) , com . google . common . collect . Lists . newArrayList ( ) , com . google . common . collect . Lists . newArrayList ( ) ) ; java . util . List < org . gradoop . flink . model . impl . operators . matching . single . cypher . pojos . Embedding > result = new java . util . ArrayList ( ) ; udf . join ( left , right , new org . apache . flink . api . common . functions . util . ListCollector ( result ) ) ; "<AssertPlaceHolder>" ; } get ( java . lang . String ) { java . util . Objects . requireNonNull ( key ) ; return properties . get ( key ) ; }
org . junit . Assert . assertEquals ( createEmbedding ( v0 , e0 , v1 , e1 , v2 , v3 , e2 , e3 , v4 ) , result . get ( 0 ) )
testEqualsSelf ( ) { org . jfree . data . time . Day day = new org . jfree . data . time . Day ( ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( obj == ( this ) ) { return true ; } if ( ! ( obj instanceof org . jfree . data . general . TestIntervalCategoryDataset ) ) { return false ; } org . jfree . data . general . TestIntervalCategoryDataset that = ( ( org . jfree . data . general . TestIntervalCategoryDataset ) ( obj ) ) ; if ( ! ( getRowKeys ( ) . equals ( that . getRowKeys ( ) ) ) ) { return false ; } if ( ! ( getColumnKeys ( ) . equals ( that . getColumnKeys ( ) ) ) ) { return false ; } int rowCount = getRowCount ( ) ; int colCount = getColumnCount ( ) ; for ( int r = 0 ; r < rowCount ; r ++ ) { for ( int c = 0 ; c < colCount ; c ++ ) { java . lang . Number v1 = getValue ( r , c ) ; java . lang . Number v2 = that . getValue ( r , c ) ; if ( v1 == null ) { if ( v2 != null ) { return false ; } } else if ( ! ( v1 . equals ( v2 ) ) ) { return false ; } } } return true ; }
org . junit . Assert . assertTrue ( day . equals ( day ) )
testHostnameDoesNotContainWhenMatch ( ) { matcher . setHostnameDoesNotContain ( new tech . aroma . application . service . reactions . matchers . MatcherHostnameDoesNotContain ( randomString ) ) ; tech . aroma . application . service . reactions . matchers . MessageMatcher result = instance . matcherFor ( matcher ) ; "<AssertPlaceHolder>" ; } matcherFor ( tech . aroma . thrift . reactions . AromaMatcher ) { if ( ( matcher == null ) || ( matcher . isSetAll ( ) ) ) { return tech . aroma . application . service . reactions . matchers . MessageMatchers . matchesAll ( ) ; } if ( matcher . isSetApplicationIs ( ) ) { java . lang . String appId = matcher . getApplicationIs ( ) . getAppId ( ) ; checkThat ( appId ) . is ( validApplicationId ( ) ) ; return tech . aroma . application . service . reactions . matchers . MessageMatchers . applicationIs ( appId ) ; } if ( matcher . isSetApplicationIsNot ( ) ) { java . lang . String appId = matcher . getApplicationIsNot ( ) . getAppId ( ) ; checkThat ( appId ) . is ( validApplicationId ( ) ) ; return tech . aroma . application . service . reactions . matchers . MessageMatchers . applicationIsNot ( appId ) ; } if ( matcher . isSetBodyContains ( ) ) { java . lang . String substring = matcher . getBodyContains ( ) . getSubstring ( ) ; checkThat ( substring ) . usingMessage ( "Matcher<sp>substring<sp>cannot<sp>be<sp>empty" ) . is ( nonEmptyString ( ) ) ; return tech . aroma . application . service . reactions . matchers . MessageMatchers . bodyContains ( substring ) ; } if ( matcher . isSetBodyDoesNotContain ( ) ) { java . lang . String substring = matcher . getBodyDoesNotContain ( ) . getSubstring ( ) ; checkThat ( substring ) . usingMessage ( "Matcher<sp>substring<sp>cannot<sp>be<sp>empty" ) . is ( nonEmptyString ( ) ) ; return tech . aroma . application . service . reactions . matchers . MessageMatchers . bodyDoesNotContain ( substring ) ; } if ( matcher . isSetBodyIs ( ) ) { java . lang . String expectedBody = matcher . getBodyIs ( ) . getExpectedBody ( ) ; checkThat ( expectedBody ) . usingMessage ( "Expected<sp>Body<sp>cannot<sp>be<sp>empty" ) . is ( nonEmptyString ( ) ) ; return tech . aroma . application . service . reactions . matchers . MessageMatchers . bodyIs ( expectedBody ) ; } if ( matcher . isSetTitleContains ( ) ) { java . lang . String substring = matcher . getTitleContains ( ) . getSubstring ( ) ; checkThat ( substring ) . usingMessage ( "Matcher<sp>substring<sp>cannot<sp>be<sp>empty" ) . is ( nonEmptyString ( ) ) ; return tech . aroma . application . service . reactions . matchers . MessageMatchers . titleContains ( substring ) ; } if ( matcher . isSetTitleDoesNotContain ( ) ) { java . lang . String substring = matcher . getTitleDoesNotContain ( ) . getSubstring ( ) ; checkThat ( substring ) . usingMessage ( "Matcher<sp>substring<sp>cannot<sp>be<sp>empty" ) . is ( nonEmptyString ( ) ) ; return tech . aroma . application . service . reactions . matchers . MessageMatchers . not ( tech . aroma . application . service . reactions . matchers . MessageMatchers . titleContains ( substring ) ) ; } if ( matcher . isSetTitleIs ( ) ) { java . lang . String expectedTitle = matcher . getTitleIs ( ) . getExpectedTitle ( ) ; checkThat ( expectedTitle ) . usingMessage ( "Expected<sp>Message<sp>Title<sp>cannot<sp>be<sp>empty" ) . is ( nonEmptyString ( ) ) ; return tech . aroma . application . service . reactions . matchers . MessageMatchers . titleIs ( expectedTitle ) ; } if ( matcher . isSetTitleIsNot ( ) ) { java . lang . String title = matcher . getTitleIsNot ( ) . getTitle ( ) ; checkThat ( title ) . usingMessage ( "Message<sp>Title<sp>cannot<sp>be<sp>empty" ) . is ( nonEmptyString ( ) ) ; return tech . aroma . application . service . reactions . matchers . MessageMatchers . titleIsNot ( title ) ; } if ( matcher . isSetUrgencyEquals ( ) ) { java . util . Set < tech . aroma . thrift . Urgency > expectedUrgencies = sir . wellington . alchemy . collections . sets . Sets . nullToEmpty ( matcher . getUrgencyEquals ( ) . getPossibleUrgencies ( ) ) ; checkThat ( expectedUrgencies ) . usingMessage ( "Expected<sp>Urgency<sp>cannot<sp>be<sp>empty" ) . is ( nonEmptySet ( ) ) ; return tech . aroma . application . service . reactions . matchers . MessageMatchers . urgencyIsOneOf ( expectedUrgencies ) ; } if ( matcher . isSetHostnameIs ( ) ) { java . lang . String expectedHostname = matcher . getHostnameIs ( ) . getExpectedHostname ( ) ; checkThat ( expectedHostname ) . usingMessage ( "Expected<sp>Hostname<sp>cannote<sp>be<sp>empty" ) . is ( nonEmptyString ( ) ) ; return tech . aroma . application . service . reactions . matchers . MessageMatchers . hostnameIs ( expectedHostname ) ; } if ( matcher . isSetHostnameContains ( ) ) { java . lang . String substring = matcher . getHostnameContains ( ) . getSubstring ( ) ; checkThat ( substring ) . usingMessage ( "Hostname<sp>substring<sp>cannot<sp>be<sp>empty" ) . is ( nonEmptyString ( ) ) ; return tech . aroma . application . service . reactions . matchers . MessageMatchers . hostnameContains ( substring ) ; } if ( matcher . isSetHostnameDoesNotContain ( ) ) { java . lang . String substring = matcher . getHostnameDoesNotContain ( ) . getSubstring ( ) ; checkThat ( substring ) . usingMessage ( "Hostname<sp>substring<sp>cannot<sp>be<sp>empty" ) . is ( nonEmptyString ( ) ) ; return tech . aroma . application . service . reactions . matchers . MessageMatchers . hostnameDoesNotContain ( substring ) ; } return tech . aroma . application . service . reactions . matchers . MessageMatchers . matchesNone ( ) ; }
org . junit . Assert . assertThat ( result . matches ( message ) , org . hamcrest . Matchers . is ( true ) )
testList ( ) { java . lang . String mess = "list" ; java . lang . String expResult = "Allowed" ; java . lang . String result = msg . manageMessage ( mess ) ; "<AssertPlaceHolder>" ; } manageMessage ( java . lang . String ) { java . lang . String nodeID ; java . lang . String childSensorID ; java . lang . String command ; java . lang . String ack ; java . lang . String type ; java . lang . String payload ; java . lang . String [ ] message = data . split ( ";" ) ; if ( ( message . length ) >= 6 ) { nodeID = message [ 0 ] ; childSensorID = message [ 1 ] ; command = message [ 2 ] ; ack = message [ 3 ] ; type = message [ 4 ] ; payload = message [ 5 ] ; switch ( command ) { case INTERNAL : manageInternalMessage ( nodeID , childSensorID , ack , type , payload ) ; break ; case SET : manageSetMessage ( nodeID , childSensorID , ack , type , payload ) ; break ; } } else { com . freedomotic . plugins . devices . mysensors . MySensors . LOG . warn ( "Data<sp>format<sp>incorrect" ) ; } }
org . junit . Assert . assertTrue ( result . startsWith ( expResult ) )
testBuildWithDisabledDefaultConstraint ( ) { unit . setActive ( false ) ; unit . setSecurity ( false ) ; org . lnu . is . domain . enrolment . subject . EnrolmentSubject context = new org . lnu . is . domain . enrolment . subject . EnrolmentSubject ( ) ; java . lang . String expectedQuery = "SELECT<sp>e<sp>FROM<sp>EnrolmentSubject<sp>e<sp>" ; org . lnu . is . pagination . MultiplePagedSearch < org . lnu . is . domain . enrolment . subject . EnrolmentSubject > pagedSearch = new org . lnu . is . pagination . MultiplePagedSearch ( ) ; pagedSearch . setEntity ( context ) ; java . lang . String actualQuery = unit . build ( pagedSearch ) ; "<AssertPlaceHolder>" ; } setEntity ( T ) { this . entity = entity ; }
org . junit . Assert . assertEquals ( expectedQuery , actualQuery )
testNullRDO ( ) { runTX ( new java . util . concurrent . Callable < java . lang . Void > ( ) { public org . oscm . reportingservice . bean . Void call ( ) throws org . oscm . reportingservice . bean . Exception { org . oscm . reportingservice . bean . ReportingResultCache . put ( dm , org . oscm . reportingservice . bean . ReportingResultCacheIT . CACHEKEY_BILLING_1 , now , null ) ; return null ; } } ) ; runTX ( new java . util . concurrent . Callable < java . lang . Void > ( ) { public org . oscm . reportingservice . bean . Void call ( ) throws org . oscm . reportingservice . bean . Exception { "<AssertPlaceHolder>" ; return null ; } } ) ; } get ( org . oscm . dataservice . local . DataService , java . lang . String ) { org . oscm . domobjects . ReportResultCache result = new org . oscm . domobjects . ReportResultCache ( ) ; result . setCachekey ( cacheKey ) ; result = ( ( org . oscm . domobjects . ReportResultCache ) ( dm . find ( result ) ) ) ; if ( result == null ) { return null ; } java . util . Date timestamp = result . getTimestamp ( ) ; long currentTime = java . lang . System . currentTimeMillis ( ) ; long value = timestamp . getTime ( ) ; if ( ( currentTime - value ) > ( org . oscm . reportingservice . bean . ReportingResultCache . DIFFERENCE ) ) { return null ; } return org . oscm . reportingservice . bean . ReportingResultCache . deserializeObject ( result . getReport ( ) ) ; }
org . junit . Assert . assertNull ( org . oscm . reportingservice . bean . ReportingResultCache . get ( dm , org . oscm . reportingservice . bean . ReportingResultCacheIT . CACHEKEY_BILLING_1 ) )
testINSPIREAddresses1Stream ( ) { java . net . URL schemaURL = org . deegree . gml . feature . GMLFeatureReaderTest . class . getResource ( "../inspire/schema/Addresses.xsd" ) ; org . deegree . gml . schema . GMLAppSchemaReader adapter = new org . deegree . gml . schema . GMLAppSchemaReader ( org . deegree . gml . GMLVersion . GML_32 , null , schemaURL . toString ( ) ) ; org . deegree . feature . types . AppSchema schema = adapter . extractAppSchema ( ) ; java . net . URL docURL = org . deegree . gml . feature . GMLFeatureReaderTest . class . getResource ( "../inspire/feature/inspire_addresses1.gml" ) ; org . deegree . gml . GMLStreamReader gmlReader = org . deegree . gml . GMLInputFactory . createGMLStreamReader ( org . deegree . gml . GMLVersion . GML_32 , docURL ) ; gmlReader . setApplicationSchema ( schema ) ; org . deegree . gml . feature . StreamFeatureCollection fc = gmlReader . readFeatureCollectionStream ( ) ; int i = 0 ; while ( ( fc . read ( ) ) != null ) { i ++ ; } "<AssertPlaceHolder>" ; } read ( ) { return is . read ( ) ; }
org . junit . Assert . assertEquals ( 4 , i )
createAndCloseSession ( ) { java . util . Map < java . lang . String , java . lang . String > labels = new java . util . HashMap ( ) ; labels . put ( "env" , "dev" ) ; org . mockito . Mockito . when ( spannerOptions . getSessionLabels ( ) ) . thenReturn ( labels ) ; java . lang . String dbName = "projects/p1/instances/i1/databases/d1" ; java . lang . String sessionName = dbName + "/sessions/s1" ; com . google . cloud . spanner . DatabaseId db = com . google . cloud . spanner . DatabaseId . of ( dbName ) ; com . google . spanner . v1 . Session sessionProto = com . google . cloud . spanner . com . google . spanner . v1 . Session . newBuilder ( ) . setName ( sessionName ) . putAllLabels ( labels ) . build ( ) ; org . mockito . Mockito . when ( rpc . createSession ( org . mockito . Mockito . eq ( dbName ) , org . mockito . Mockito . eq ( labels ) , options . capture ( ) ) ) . thenReturn ( sessionProto ) ; com . google . cloud . spanner . Session session = impl . createSession ( db ) ; "<AssertPlaceHolder>" . isEqualTo ( sessionName ) ; session . close ( ) ; org . mockito . Mockito . verify ( rpc ) . deleteSession ( sessionName , options . getValue ( ) ) ; } getName ( ) { return getLeaf ( ) . getName ( ) ; }
org . junit . Assert . assertThat ( session . getName ( ) )
testCompactionBlocking ( ) { java . util . Timer cancelCompact = new java . util . Timer ( "CancelCompactionTimer" , false ) ; final java . lang . Thread threadToInterrupt = java . lang . Thread . currentThread ( ) ; cancelCompact . schedule ( new java . util . TimerTask ( ) { @ org . apache . hadoop . hive . ql . Override public void run ( ) { threadToInterrupt . interrupt ( ) ; } } , 5000 ) ; long start = java . lang . System . currentTimeMillis ( ) ; runStatementOnDriver ( ( ( "alter<sp>table<sp>" + ( TestTxnCommands2 . Table . ACIDTBL ) ) + "<sp>compact<sp>'major'<sp>AND<sp>WAIT" ) ) ; "<AssertPlaceHolder>" ; } runStatementOnDriver ( java . lang . String ) { org . apache . hadoop . hive . ql . processors . CommandProcessorResponse cpr = d . run ( stmt ) ; if ( ( cpr . getResponseCode ( ) ) != 0 ) { throw new java . lang . RuntimeException ( ( ( stmt + "<sp>failed:<sp>" ) + cpr ) ) ; } java . util . List < java . lang . String > rs = new java . util . ArrayList < java . lang . String > ( ) ; d . getResults ( rs ) ; return rs ; }
org . junit . Assert . assertTrue ( ( ( java . lang . System . currentTimeMillis ( ) ) > ( start + 2 ) ) )
readerShouldMergeMultipleBatchResults ( ) { org . apache . beam . runners . dataflow . worker . util . common . worker . ShuffleEntry e1 = new org . apache . beam . runners . dataflow . worker . util . common . worker . ShuffleEntry ( org . apache . beam . runners . dataflow . worker . util . common . worker . BatchingShuffleEntryReaderTest . KEY , org . apache . beam . runners . dataflow . worker . util . common . worker . BatchingShuffleEntryReaderTest . SKEY , org . apache . beam . runners . dataflow . worker . util . common . worker . BatchingShuffleEntryReaderTest . VALUE ) ; java . util . List < org . apache . beam . runners . dataflow . worker . util . common . worker . ShuffleEntry > e1s = java . util . Collections . singletonList ( e1 ) ; org . apache . beam . runners . dataflow . worker . util . common . worker . ShuffleEntry e2 = new org . apache . beam . runners . dataflow . worker . util . common . worker . ShuffleEntry ( org . apache . beam . runners . dataflow . worker . util . common . worker . BatchingShuffleEntryReaderTest . KEY , org . apache . beam . runners . dataflow . worker . util . common . worker . BatchingShuffleEntryReaderTest . SKEY , org . apache . beam . runners . dataflow . worker . util . common . worker . BatchingShuffleEntryReaderTest . VALUE ) ; java . util . List < org . apache . beam . runners . dataflow . worker . util . common . worker . ShuffleEntry > e2s = java . util . Collections . singletonList ( e2 ) ; when ( batchReader . read ( org . apache . beam . runners . dataflow . worker . util . common . worker . BatchingShuffleEntryReaderTest . START_POSITION , org . apache . beam . runners . dataflow . worker . util . common . worker . BatchingShuffleEntryReaderTest . END_POSITION ) ) . thenReturn ( new org . apache . beam . runners . dataflow . worker . util . common . worker . ShuffleBatchReader . Batch ( e1s , org . apache . beam . runners . dataflow . worker . util . common . worker . BatchingShuffleEntryReaderTest . NEXT_START_POSITION ) ) ; when ( batchReader . read ( org . apache . beam . runners . dataflow . worker . util . common . worker . BatchingShuffleEntryReaderTest . NEXT_START_POSITION , org . apache . beam . runners . dataflow . worker . util . common . worker . BatchingShuffleEntryReaderTest . END_POSITION ) ) . thenReturn ( new org . apache . beam . runners . dataflow . worker . util . common . worker . ShuffleBatchReader . Batch ( e2s , null ) ) ; java . util . List < org . apache . beam . runners . dataflow . worker . util . common . worker . ShuffleEntry > results = newArrayList ( reader . read ( org . apache . beam . runners . dataflow . worker . util . common . worker . BatchingShuffleEntryReaderTest . START_POSITION , org . apache . beam . runners . dataflow . worker . util . common . worker . BatchingShuffleEntryReaderTest . END_POSITION ) ) ; "<AssertPlaceHolder>" ; verify ( batchReader ) . read ( org . apache . beam . runners . dataflow . worker . util . common . worker . BatchingShuffleEntryReaderTest . START_POSITION , org . apache . beam . runners . dataflow . worker . util . common . worker . BatchingShuffleEntryReaderTest . END_POSITION ) ; verify ( batchReader ) . read ( org . apache . beam . runners . dataflow . worker . util . common . worker . BatchingShuffleEntryReaderTest . NEXT_START_POSITION , org . apache . beam . runners . dataflow . worker . util . common . worker . BatchingShuffleEntryReaderTest . END_POSITION ) ; verifyNoMoreInteractions ( batchReader ) ; } contains ( org . apache . beam . sdk . coders . Coder , T [ ] ) { final org . apache . beam . sdk . testing . SerializableMatchers . SerializableSupplier < T [ ] > itemsSupplier = new org . apache . beam . sdk . testing . SerializableMatchers . SerializableArrayViaCoder ( coder , items ) ; return org . apache . beam . sdk . testing . SerializableMatchers . fromSupplier ( ( ) -> org . hamcrest . Matchers . containsInAnyOrder ( itemsSupplier . get ( ) ) ) ; }
org . junit . Assert . assertThat ( results , org . hamcrest . Matchers . contains ( e1 , e2 ) )
testSet_IndexCheck_Valid ( ) { org . la4j . matrix . Matrix a = m ( org . la4j . matrix . MatrixTest . a ( 0.0 , 0.0 , 0.0 , 1.0 , 0.0 ) , org . la4j . matrix . MatrixTest . a ( 0.0 , 0.0 , 3.0 , 0.0 , 0.0 ) ) ; a . set ( 1 , 1 , 1.0 ) ; "<AssertPlaceHolder>" ; } get ( int , int ) { return self [ i ] [ j ] ; }
org . junit . Assert . assertEquals ( 1.0 , a . get ( 1 , 1 ) , 0.0 )
testOutOfScopeNamedConsequencesWithOr1 ( ) { java . lang . String str = "then[t1]\n" 2 + ( ( ( ( ( ( ( ( ( ( ( "then[t1]\n" 4 + "\n" ) + "rule<sp>R1<sp>when\n" ) + "<sp>(<sp>$a:<sp>Cheese<sp>(<sp>type<sp>==<sp>\"stilton\"then[t1]\n" 1 ) + "then[t1]\n" 3 ) + "<sp>$b:<sp>Cheese<sp>(<sp>type<sp>==<sp>\"gorgonzola\"<sp>)<sp>do[t1]<sp>)\n" ) + "<sp>$c:<sp>Cheese<sp>(<sp>type<sp>==<sp>\"cheddar\"then[t1]\n" 1 ) + "then\n" ) + "then[t1]\n" 0 ) + "then[t1]\n" ) + "<sp>results.add(<sp>$a.getType()<sp>);\n" ) + "end\n" ) ; org . kie . internal . builder . KnowledgeBuilder kbuilder = org . kie . internal . builder . KnowledgeBuilderFactory . newKnowledgeBuilder ( ) ; kbuilder . add ( org . kie . internal . io . ResourceFactory . newByteArrayResource ( str . getBytes ( ) ) , ResourceType . DRL ) ; "<AssertPlaceHolder>" ; } hasErrors ( ) { return messages . stream ( ) . anyMatch ( ( m ) -> DMNMessage . Severity . ERROR . equals ( m . getSeverity ( ) ) ) ; }
org . junit . Assert . assertTrue ( kbuilder . hasErrors ( ) )
ensureNoChainsGeneratesEmptyOptionals ( ) { com . epimorphics . lda . support . PropertyChainTranslator t = new com . epimorphics . lda . support . PropertyChainTranslator ( ) ; java . lang . String generated = t . translate ( new com . epimorphics . lda . tests . TestPropertyChainToSPARQLTranslator . VarSupplyByCount ( ) , false ) ; "<AssertPlaceHolder>" ; } translate ( com . epimorphics . lda . core . VarSupply , boolean ) { return translate ( vs , "item" , dropLast ) ; }
org . junit . Assert . assertThat ( generated , org . hamcrest . CoreMatchers . is ( "" ) )
testRegressionMT ( ) { System . out . println ( "regression<sp>MT" ) ; jsat . classifiers . boosting . Stacking stacking = new jsat . classifiers . boosting . Stacking ( ( ( jsat . regression . Regressor ) ( new jsat . classifiers . linear . LinearBatch ( new jsat . lossfunctions . AbsoluteLoss ( ) , 1.0E-10 ) ) ) , new jsat . classifiers . linear . LinearBatch ( new jsat . lossfunctions . SquaredLoss ( ) , 1.0E-15 ) , new jsat . classifiers . linear . LinearBatch ( new jsat . lossfunctions . AbsoluteLoss ( ) , 0.1 ) , new jsat . classifiers . linear . LinearBatch ( new jsat . lossfunctions . HuberLoss ( ) , 0.01 ) ) ; jsat . regression . RegressionDataSet train = jsat . FixedProblems . getLinearRegression ( 500 , jsat . utils . random . RandomUtil . getRandom ( ) ) ; stacking = stacking . clone ( ) ; stacking . train ( train , true ) ; stacking = stacking . clone ( ) ; jsat . regression . RegressionDataSet test = jsat . FixedProblems . getLinearRegression ( 200 , jsat . utils . random . RandomUtil . getRandom ( ) ) ; for ( jsat . classifiers . DataPointPair < java . lang . Double > dpp : test . getAsDPPList ( ) ) { double truth = dpp . getPair ( ) ; double pred = stacking . regress ( dpp . getDataPoint ( ) ) ; double relErr = ( truth - pred ) / truth ; "<AssertPlaceHolder>" ; } } getDataPoint ( ) { return dataPoint ; }
org . junit . Assert . assertEquals ( 0 , relErr , 0.1 )
syncMethodCallReturnsThrownException ( ) { io . joynr . proxy . ProxyBuilder < joynr . tests . testProxy > proxyBuilder = consumerRuntime . getProxyBuilder ( domain , joynr . tests . testProxy . class ) ; joynr . tests . testProxy proxy = proxyBuilder . setMessagingQos ( messagingQos ) . setDiscoveryQos ( discoveryQos ) . build ( ) ; try { proxy . methodWithThrownException ( ) ; org . junit . Assert . fail ( "Should<sp>throw<sp>ProviderRuntimeException" ) ; } catch ( joynr . exceptions . ProviderRuntimeException e ) { joynr . exceptions . ProviderRuntimeException expected = new joynr . exceptions . ProviderRuntimeException ( new java . lang . IllegalArgumentException ( "thrownException" ) . toString ( ) ) ; "<AssertPlaceHolder>" ; } catch ( java . lang . Exception e ) { org . junit . Assert . fail ( e . toString ( ) ) ; } } toString ( ) { return ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "TestSuiteResult<sp>[" + "name=" ) + ( this . name ) ) + ",<sp>" ) + "time=" ) + ( this . time ) ) + ",<sp>" ) + "tests=" ) + ( this . tests ) ) + ",<sp>" ) + "errors=" ) + ( this . errors ) ) + ",<sp>" ) + "skipped=" ) + ( this . skipped ) ) + ",<sp>" ) + "failures=" ) + ( this . failures ) ) + ",<sp>" ) + "testCaseResults=" ) + ( java . util . Arrays . toString ( this . testCaseResults ) ) ) + "]" ; }
org . junit . Assert . assertEquals ( expected , e )
getEmptyPathTest ( ) { com . beijunyi . parallelgit . filesystem . GitPath path = gfs . getPath ( "" ) ; "<AssertPlaceHolder>" ; } toString ( ) { if ( ( stringValue ) == null ) stringValue = decode ( com . beijunyi . parallelgit . filesystem . CHARSET , path ) ; return stringValue ; }
org . junit . Assert . assertEquals ( "" , path . toString ( ) )
classifyObjectNodeTest ( ) { try { com . google . api . services . plus . model . Person person = new com . google . api . services . plus . model . Person ( ) ; person . setKind ( "fake" ) ; java . lang . Class retClass = org . apache . streams . gplus . serializer . util . GPlusEventClassifier . detectClass ( org . apache . streams . gplus . serializer . util . GPlusEventClassifierTest . mapper . writeValueAsString ( person ) ) ; "<AssertPlaceHolder>" ; } catch ( java . lang . Exception ex ) { } } detectClass ( java . lang . String ) { java . util . Objects . requireNonNull ( json ) ; com . google . common . base . Preconditions . checkArgument ( org . apache . commons . lang . StringUtils . isNotEmpty ( json ) ) ; com . fasterxml . jackson . databind . node . ObjectNode objectNode ; try { objectNode = ( ( com . fasterxml . jackson . databind . node . ObjectNode ) ( org . apache . streams . gplus . serializer . util . GPlusEventClassifier . mapper . readTree ( json ) ) ) ; } catch ( java . io . IOException ex ) { ex . printStackTrace ( ) ; return null ; } if ( ( ( objectNode . findValue ( "kind" ) ) != null ) && ( objectNode . get ( "kind" ) . toString ( ) . equals ( org . apache . streams . gplus . serializer . util . GPlusEventClassifier . ACTIVITY_IDENTIFIER ) ) ) { return com . google . api . services . plus . model . Activity . class ; } else if ( ( ( objectNode . findValue ( "kind" ) ) != null ) && ( objectNode . get ( "kind" ) . toString ( ) . equals ( org . apache . streams . gplus . serializer . util . GPlusEventClassifier . PERSON_IDENTIFIER ) ) ) { return com . google . api . services . plus . model . Person . class ; } else { return com . fasterxml . jackson . databind . node . ObjectNode . class ; } }
org . junit . Assert . assertEquals ( retClass , com . fasterxml . jackson . databind . node . ObjectNode . class )
testZookeeperNodesForReplicas ( ) { org . apache . hadoop . hbase . zookeeper . ZKWatcher zkw = TEST_UTIL . getZooKeeperWatcher ( ) ; org . apache . hadoop . conf . Configuration conf = TEST_UTIL . getConfiguration ( ) ; java . lang . String baseZNode = conf . get ( HConstants . ZOOKEEPER_ZNODE_PARENT , HConstants . DEFAULT_ZOOKEEPER_ZNODE_PARENT ) ; java . lang . String primaryMetaZnode = org . apache . hadoop . hbase . zookeeper . ZNodePaths . joinZNode ( baseZNode , conf . get ( "zookeeper.znode.metaserver" , "meta-region-server" ) ) ; byte [ ] data = org . apache . hadoop . hbase . zookeeper . ZKUtil . getData ( zkw , primaryMetaZnode ) ; org . apache . hadoop . hbase . protobuf . ProtobufUtil . toServerName ( data ) ; for ( int i = 1 ; i < 3 ; i ++ ) { java . lang . String secZnode = org . apache . hadoop . hbase . zookeeper . ZNodePaths . joinZNode ( baseZNode , ( ( ( conf . get ( "zookeeper.znode.metaserver" , "meta-region-server" ) ) + "-" ) + i ) ) ; java . lang . String str = zkw . getZNodePaths ( ) . getZNodeForReplica ( i ) ; "<AssertPlaceHolder>" ; data = org . apache . hadoop . hbase . zookeeper . ZKUtil . getData ( zkw , secZnode ) ; org . apache . hadoop . hbase . protobuf . ProtobufUtil . toServerName ( data ) ; } } equals ( java . lang . Object ) { if ( obj instanceof org . apache . hadoop . hbase . metrics . MetricRegistryInfo ) { return ( this . hashCode ( ) ) == ( obj . hashCode ( ) ) ; } else { return false ; } }
org . junit . Assert . assertTrue ( str . equals ( secZnode ) )
testEmptyHotReload ( ) { hotReloadRule . updateDevBundles ( "#<sp>EMPTY<sp>HOT<sp>RELOAD" ) ; java . lang . String id = org . nuxeo . functionaltests . RestHelper . createDocument ( "/" , "File" , "file" , "description" ) ; "<AssertPlaceHolder>" ; } createDocument ( java . lang . String , java . lang . String , java . lang . String , java . lang . String ) { java . util . Map < java . lang . String , java . lang . Object > props ; if ( description == null ) { props = java . util . Collections . emptyMap ( ) ; } else { props = java . util . Collections . singletonMap ( "dc:description" , description ) ; } return org . nuxeo . functionaltests . RestHelper . createDocument ( idOrPath , type , title , props ) ; }
org . junit . Assert . assertNotNull ( id )
testInvalidPolicyForNotDefinedInputStream ( ) { org . apache . eagle . alert . engine . coordinator . PolicyDefinition policyDefinition = new org . apache . eagle . alert . engine . coordinator . PolicyDefinition ( ) ; policyDefinition . setName ( "test_policy" ) ; policyDefinition . setInputStreams ( org . apache . eagle . alert . engine . interpreter . Collections . singletonList ( "INPUT_STREAM_1" ) ) ; policyDefinition . setOutputStreams ( org . apache . eagle . alert . engine . interpreter . Collections . singletonList ( "OUTPUT_STREAM_1" ) ) ; org . apache . eagle . alert . engine . coordinator . PolicyDefinition . Definition definition = new org . apache . eagle . alert . engine . coordinator . PolicyDefinition . Definition ( ) ; definition . setType ( "siddhi" ) ; definition . setValue ( "from<sp>INPUT_STREAM_1[value<sp>><sp>90.0]<sp>select<sp>*<sp>group<sp>by<sp>name<sp>insert<sp>into<sp>OUTPUT_STREAM_1;" ) ; definition . setInputStreams ( policyDefinition . getInputStreams ( ) ) ; definition . setOutputStreams ( policyDefinition . getOutputStreams ( ) ) ; policyDefinition . setDefinition ( definition ) ; org . apache . eagle . alert . engine . interpreter . PolicyValidationResult validation = org . apache . eagle . alert . engine . interpreter . PolicyInterpreter . validate ( policyDefinition , new org . apache . eagle . alert . engine . interpreter . HashMap < java . lang . String , org . apache . eagle . alert . engine . coordinator . StreamDefinition > ( ) { { put ( "INPUT_STREAM_2" , org . apache . eagle . alert . engine . interpreter . PolicyInterpreterTest . mockStreamDefinition ( "INPUT_STREAM_2" ) ) ; } } ) ; "<AssertPlaceHolder>" ; } isSuccess ( ) { return success ; }
org . junit . Assert . assertFalse ( validation . isSuccess ( ) )
whenCheckedAddTwoIntegerValues_shouldAddThemAndReturnTheSumIfNotOverflow ( ) { int result = com . google . common . math . IntMath . checkedAdd ( 1 , 2 ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( 3 , result )
testCompare_Identity ( ) { org . openscience . cdk . interfaces . IAtomContainer molecule = org . openscience . cdk . geometry . cip . rules . CIPLigandRuleTest . smiles . parseSmiles ( "CC(Br)([13C])[H]" ) ; org . openscience . cdk . geometry . cip . ILigand ligand = new org . openscience . cdk . geometry . cip . Ligand ( molecule , new org . openscience . cdk . geometry . cip . VisitedAtoms ( ) , molecule . getAtom ( 1 ) , molecule . getAtom ( 0 ) ) ; org . openscience . cdk . geometry . cip . rules . ISequenceSubRule < org . openscience . cdk . geometry . cip . ILigand > rule = new org . openscience . cdk . geometry . cip . rules . CIPLigandRule ( ) ; "<AssertPlaceHolder>" ; } compare ( org . openscience . cdk . geometry . cip . ILigand , org . openscience . cdk . geometry . cip . ILigand ) { int numberComp = numberRule . compare ( ligand1 , ligand2 ) ; if ( numberComp != 0 ) return numberComp ; org . openscience . cdk . geometry . cip . ILigand [ ] ligand1Ligands = org . openscience . cdk . geometry . cip . CIPTool . getLigandLigands ( ligand1 ) ; org . openscience . cdk . geometry . cip . ILigand [ ] ligand2Ligands = org . openscience . cdk . geometry . cip . CIPTool . getLigandLigands ( ligand2 ) ; if ( ( ( ligand1Ligands . length ) == 0 ) && ( ( ligand2Ligands . length ) == 0 ) ) return 0 ; if ( ( ligand1Ligands . length ) == 0 ) return - 1 ; if ( ( ligand2Ligands . length ) == 0 ) return 1 ; int minLigandCount = java . lang . Math . min ( ligand1Ligands . length , ligand2Ligands . length ) ; if ( ( ligand1Ligands . length ) > 1 ) ligand1Ligands = order ( ligand1Ligands ) ; if ( ( ligand2Ligands . length ) > 1 ) ligand2Ligands = order ( ligand2Ligands ) ; for ( int i = 0 ; i < minLigandCount ; i ++ ) { int comparison = numberRule . compare ( ligand1Ligands [ i ] , ligand2Ligands [ i ] ) ; if ( comparison != 0 ) return comparison ; } if ( ( ligand1Ligands . length ) == ( ligand2Ligands . length ) ) { for ( int i = 0 ; i < minLigandCount ; i ++ ) { int comparison = compare ( ligand1Ligands [ i ] , ligand2Ligands [ i ] ) ; if ( comparison != 0 ) return comparison ; } } if ( ( ligand1Ligands . length ) > ( ligand2Ligands . length ) ) return 1 ; else if ( ( ligand1Ligands . length ) < ( ligand2Ligands . length ) ) return - 1 ; else return 0 ; }
org . junit . Assert . assertEquals ( 0 , rule . compare ( ligand , ligand ) )
testHashRandomSalt ( ) { java . lang . String passHash = org . sagebionetworks . securitytools . PBKDF2Utils . hashPassword ( "password" , null ) ; byte [ ] salt = org . sagebionetworks . securitytools . PBKDF2Utils . extractSalt ( passHash ) ; "<AssertPlaceHolder>" ; } extractSalt ( java . lang . String ) { if ( ( ( passHash == null ) || ( ( passHash . length ( ) ) != ( ( org . sagebionetworks . securitytools . PBKDF2Utils . HASH_PREFIX . length ( ) ) + ( ( ( ( org . sagebionetworks . securitytools . PBKDF2Utils . HASHING_SALTLENGTH ) + ( org . sagebionetworks . securitytools . PBKDF2Utils . HASHING_KEYLENGTH ) ) * 4 ) / 3 ) ) ) ) || ( ! ( passHash . startsWith ( org . sagebionetworks . securitytools . PBKDF2Utils . HASH_PREFIX ) ) ) ) { throw new java . lang . IllegalArgumentException ( "Password<sp>hash<sp>format<sp>is<sp>unrecognized" ) ; } java . lang . String hashBody = passHash . substring ( org . sagebionetworks . securitytools . PBKDF2Utils . HASH_PREFIX . length ( ) ) ; byte [ ] hashBytes = org . apache . commons . codec . binary . Base64 . decodeBase64 ( hashBody . getBytes ( ) ) ; return java . util . Arrays . copyOfRange ( hashBytes , 0 , org . sagebionetworks . securitytools . PBKDF2Utils . HASHING_SALTLENGTH ) ; }
org . junit . Assert . assertNotNull ( salt )
exportBillingData_returnXML ( ) { byte [ ] xmlResult = new byte [ ] { '1' , '2' , '3' } ; org . oscm . internal . billingdataexport . POBillingDataExport po = new org . oscm . internal . billingdataexport . POBillingDataExport ( ) ; po . setFrom ( new java . util . Date ( ) ) ; po . setTo ( new java . util . Date ( ) ) ; po . setOrganizationIds ( java . util . Arrays . asList ( "orgId" ) ) ; given ( exportBillingService . billingService . getCustomerBillingData ( org . mockito . Matchers . anyLong ( ) , org . mockito . Matchers . anyLong ( ) , org . mockito . Matchers . anyListOf ( java . lang . String . class ) ) ) . willReturn ( xmlResult ) ; org . oscm . internal . components . response . Response r = exportBillingService . exportBillingData ( po ) ; "<AssertPlaceHolder>" ; } getResult ( java . lang . Class ) { try { T result = type . newInstance ( ) ; result . setRc ( 1 ) ; result . setDesc ( getMessage ( ) ) ; return result ; } catch ( java . lang . InstantiationException e ) { throw new java . lang . RuntimeException ( e ) ; } catch ( java . lang . IllegalAccessException e ) { throw new java . lang . RuntimeException ( e ) ; } }
org . junit . Assert . assertEquals ( r . getResult ( byte [ ] . class ) , xmlResult )
testConvert ( ) { java . lang . Long personId = 2L ; org . lnu . is . domain . person . Person person = new org . lnu . is . domain . person . Person ( ) ; person . setId ( personId ) ; java . lang . Long educationTypeId = 3L ; org . lnu . is . domain . education . type . EducationType educationType = new org . lnu . is . domain . education . type . EducationType ( ) ; educationType . setId ( educationTypeId ) ; java . lang . Long personPaperId = 4L ; org . lnu . is . domain . person . paper . PersonPaper personPaper = new org . lnu . is . domain . person . paper . PersonPaper ( ) ; personPaper . setId ( personPaperId ) ; java . lang . Long id = 1L ; java . util . Date begDate = new java . util . Date ( ) ; java . util . Date endDate = new java . util . Date ( ) ; org . lnu . is . domain . person . education . PersonEducation source = new org . lnu . is . domain . person . education . PersonEducation ( ) ; source . setPerson ( person ) ; source . setEducationType ( educationType ) ; source . setPersonPaper ( personPaper ) ; source . setId ( id ) ; source . setBegDate ( begDate ) ; source . setEndDate ( endDate ) ; org . lnu . is . resource . person . education . PersonEducationResource expected = new org . lnu . is . resource . person . education . PersonEducationResource ( ) ; expected . setPersonId ( personId ) ; expected . setEducationTypeId ( educationTypeId ) ; expected . setPersonPaperId ( personPaperId ) ; expected . setId ( id ) ; expected . setBegDate ( begDate ) ; expected . setEndDate ( endDate ) ; org . lnu . is . resource . person . education . PersonEducationResource actual = unit . convert ( source ) ; "<AssertPlaceHolder>" ; } convert ( org . lnu . is . domain . admin . unit . AdminUnit ) { return convert ( source , new org . lnu . is . resource . adminunit . AdminUnitResource ( ) ) ; }
org . junit . Assert . assertEquals ( expected , actual )
testUpdateLength ( ) { org . mockito . Mockito . mock ( org . apache . hadoop . mapred . nativetask . buffer . DataOutputStream . class ) ; int kvLength = 0 ; for ( int i = 0 ; i < ( inputArraySize ) ; i ++ ) { key . reset ( inputArray [ i ] . key ) ; value . reset ( inputArray [ i ] . value ) ; serializer . updateLength ( key , value ) ; "<AssertPlaceHolder>" ; kvLength = ( key . length ) + ( value . length ) ; } } updateLength ( com . microsoft . azure . storage . blob . BlobProperties , int ) { try { java . lang . reflect . Method setLength = properties . getClass ( ) . getDeclaredMethod ( "setLength" , long . class ) ; setLength . setAccessible ( true ) ; setLength . invoke ( this . properties , length ) ; } catch ( java . lang . Exception e ) { throw new java . lang . RuntimeException ( e ) ; } return properties ; }
org . junit . Assert . assertTrue ( ( ( ( key . length ) + ( value . length ) ) > kvLength ) )
defaultJSONFromFieldShouldReturnJSON ( ) { org . json . simple . JSONObject actual = new org . json . simple . JSONObject ( ) ; actual . put ( "field" , "value" ) ; org . apache . storm . tuple . Tuple tuple = mock ( org . apache . storm . tuple . Tuple . class ) ; when ( tuple . getValueByField ( "message" ) ) . thenReturn ( actual ) ; org . json . simple . JSONObject expected = new org . json . simple . JSONObject ( ) ; expected . put ( "field" , "value" ) ; org . apache . metron . common . message . MessageGetStrategy messageGetStrategy = MessageGetters . DEFAULT_JSON_FROM_FIELD . get ( ) ; "<AssertPlaceHolder>" ; } get ( org . apache . metron . performance . load . CommandLine ) { return cli . getOptionValue ( shortCode ) ; }
org . junit . Assert . assertEquals ( expected , messageGetStrategy . get ( tuple ) )
nullBorder ( ) { org . sejda . sambox . pdmodel . interactive . annotation . PDAnnotation victim = new org . sejda . sambox . pdmodel . interactive . annotation . PDAnnotationWidget ( ) ; victim . setBorder ( null ) ; "<AssertPlaceHolder>" ; } getBorder ( ) { org . sejda . sambox . cos . COSArray border = getCOSObject ( ) . getDictionaryObject ( COSName . BORDER , org . sejda . sambox . cos . COSArray . class ) ; if ( java . util . Objects . isNull ( border ) ) { return new org . sejda . sambox . cos . COSArray ( org . sejda . sambox . cos . COSInteger . ZERO , org . sejda . sambox . cos . COSInteger . ZERO , org . sejda . sambox . cos . COSInteger . ONE ) ; } border . growToSize ( 3 , COSInteger . ZERO ) ; return border ; }
org . junit . Assert . assertEquals ( new org . sejda . sambox . cos . COSArray ( org . sejda . sambox . cos . COSInteger . ZERO , org . sejda . sambox . cos . COSInteger . ZERO , org . sejda . sambox . cos . COSInteger . ONE ) , victim . getBorder ( ) )
testReadLongFromLong ( ) { long value = org . apache . activemq . artemis . utils . RandomUtil . randomLong ( ) ; org . apache . activemq . artemis . jms . client . ActiveMQStreamMessage message = new org . apache . activemq . artemis . jms . client . ActiveMQStreamMessage ( ) ; message . writeLong ( value ) ; message . reset ( ) ; "<AssertPlaceHolder>" ; } readLong ( ) { if ( bodyWriteOnly ) { throw new javax . jms . MessageNotReadableException ( "The<sp>message<sp>body<sp>is<sp>writeonly" ) ; } try { java . lang . Object value = content . get ( position ) ; offset = 0 ; if ( value == null ) { throw new java . lang . NullPointerException ( "Value<sp>is<sp>null" ) ; } else if ( value instanceof java . lang . Byte ) { ( position ) ++ ; return ( ( java . lang . Byte ) ( value ) ) . longValue ( ) ; } else if ( value instanceof java . lang . Short ) { ( position ) ++ ; return ( ( java . lang . Short ) ( value ) ) . longValue ( ) ; } else if ( value instanceof java . lang . Integer ) { ( position ) ++ ; return ( ( java . lang . Integer ) ( value ) ) . longValue ( ) ; } else if ( value instanceof java . lang . Long ) { ( position ) ++ ; return ( ( java . lang . Long ) ( value ) ) . longValue ( ) ; } else if ( value instanceof java . lang . String ) { long result = java . lang . Long . parseLong ( ( ( java . lang . String ) ( value ) ) ) ; ( position ) ++ ; return result ; } else { throw new javax . jms . MessageFormatException ( "Invalid<sp>conversion" ) ; } } catch ( java . lang . IndexOutOfBoundsException e ) { throw new javax . jms . MessageEOFException ( "" ) ; } }
org . junit . Assert . assertEquals ( value , message . readLong ( ) )
givenInstancePassedToCallToIsAFinalClassThenInterfaceProxyingIsUsed ( ) { fakeRepository = new org . awaitility . proxy . FinalFakeRepositoryImpl ( ) ; new org . awaitility . proxy . Asynch ( fakeRepository ) . perform ( ) ; await ( ) . untilCall ( org . awaitility . proxy . AwaitilityClassProxy . to ( fakeRepository ) . getValue ( ) , greaterThan ( 0 ) ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return currentConditionValue ; }
org . junit . Assert . assertEquals ( 1 , fakeRepository . getValue ( ) )
whenCyclicBarrier_reset ( ) { com . baeldung . concurrent . cyclicbarrier . CyclicBarrierResetExample ex = new com . baeldung . concurrent . cyclicbarrier . CyclicBarrierResetExample ( 7 , 20 ) ; int lineCount = ex . countWaits ( ) ; "<AssertPlaceHolder>" ; } countWaits ( ) { java . util . concurrent . CountDownLatch countDownLatch = new java . util . concurrent . CountDownLatch ( count ) ; java . util . concurrent . ExecutorService es = java . util . concurrent . Executors . newFixedThreadPool ( threadCount ) ; for ( int i = 0 ; i < ( threadCount ) ; i ++ ) { es . execute ( ( ) -> { long prevValue = countDownLatch . getCount ( ) ; countDownLatch . countDown ( ) ; if ( ( countDownLatch . getCount ( ) ) != prevValue ) { updateCount . incrementAndGet ( ) ; } } ) ; } es . shutdown ( ) ; return updateCount . get ( ) ; }
org . junit . Assert . assertTrue ( ( lineCount > 7 ) )
testWriteLong ( ) { try { com . navercorp . pinpoint . common . util . BytesUtils . writeLong ( 1234 , null , 0 ) ; org . junit . Assert . fail ( "null<sp>pointer<sp>accessed" ) ; } catch ( java . lang . Exception ignore ) { } byte [ ] such_long = new byte [ 13 ] ; try { com . navercorp . pinpoint . common . util . BytesUtils . writeLong ( 1234 , such_long , ( - 1 ) ) ; org . junit . Assert . fail ( "negative<sp>offset<sp>did<sp>not<sp>catched" ) ; } catch ( java . lang . Exception ignore ) { } try { com . navercorp . pinpoint . common . util . BytesUtils . writeLong ( 2222 , such_long , 9 ) ; org . junit . Assert . fail ( "index<sp>out<sp>of<sp>range<sp>exception<sp>did<sp>not<sp>catched" ) ; } catch ( java . lang . Exception ignore ) { } com . navercorp . pinpoint . common . util . BytesUtils . writeLong ( ( - 1L ) , such_long , 2 ) ; for ( int i = 2 ; i < 10 ; i ++ ) { "<AssertPlaceHolder>" ; } } writeLong ( long , byte [ ] , int ) { if ( buf == null ) { throw new java . lang . NullPointerException ( "buf<sp>must<sp>not<sp>be<sp>null" ) ; } if ( offset < 0 ) { throw new java . lang . IndexOutOfBoundsException ( ( "negative<sp>offset:" + offset ) ) ; } if ( ( buf . length ) < ( offset + ( com . navercorp . pinpoint . common . util . BytesUtils . LONG_BYTE_LENGTH ) ) ) { throw new java . lang . IndexOutOfBoundsException ( ( ( ( "buf.length<sp>is<sp>too<sp>small.<sp>buf.length:" + ( buf . length ) ) + "<sp>offset:" ) + ( offset + 8 ) ) ) ; } buf [ ( offset ++ ) ] = ( ( byte ) ( value > > 56 ) ) ; buf [ ( offset ++ ) ] = ( ( byte ) ( value > > 48 ) ) ; buf [ ( offset ++ ) ] = ( ( byte ) ( value > > 40 ) ) ; buf [ ( offset ++ ) ] = ( ( byte ) ( value > > 32 ) ) ; buf [ ( offset ++ ) ] = ( ( byte ) ( value > > 24 ) ) ; buf [ ( offset ++ ) ] = ( ( byte ) ( value > > 16 ) ) ; buf [ ( offset ++ ) ] = ( ( byte ) ( value > > 8 ) ) ; buf [ ( offset ++ ) ] = ( ( byte ) ( value ) ) ; return offset ; }
org . junit . Assert . assertEquals ( ( ( byte ) ( 255 ) ) , such_long [ i ] )
testNoLegendBelowMinScaleDenominator ( ) { java . awt . image . BufferedImage image = getAsImage ( ( ( ( ( "wms?service=WMS&version=1.1.1&request=GetLegendGraphic" + "&layer=" ) + ( getLayerId ( MockData . LAKES ) ) ) + "&style=scaleDependent" ) + "&format=image/png&width=20&height=20&scale=5000" ) , "image/png" ) ; "<AssertPlaceHolder>" ; } getHeight ( ) { return height ; }
org . junit . Assert . assertEquals ( 1 , image . getHeight ( ) )
testDeclaredClasses ( ) { java . lang . Class < ? > [ ] declared = com . sun . mail . util . logging . LogManagerProperties . class . getDeclaredClasses ( ) ; "<AssertPlaceHolder>" ; } toString ( java . util . logging . Formatter ) { final java . lang . String name = f . toString ( ) ; if ( ! ( com . sun . mail . util . logging . MailHandler . isEmpty ( name ) ) ) { return name ; } else { return getClassId ( f ) ; } }
org . junit . Assert . assertEquals ( java . util . Arrays . toString ( declared ) , 0 , declared . length )
testInvalidTagAndValidTag ( ) { java . lang . String expected = "[x]bbb<u>XXX</u>ddd[/x]" ; java . lang . String actual = _htmlBBCodeTranslator . parse ( "[x]bbb[u]XXX[/u]ddd[/x]" ) ; "<AssertPlaceHolder>" ; } parse ( java . lang . String ) { if ( com . liferay . portal . kernel . util . Validator . isNull ( s ) ) { throw new java . lang . IllegalArgumentException ( ( "Invalid<sp>image<sp>adaptive<sp>media<sp>configuration:<sp>" + s ) ) ; } java . lang . String [ ] fields = com . liferay . adaptive . media . image . internal . configuration . AMImageConfigurationEntryParser . _fieldSeparatorPattern . split ( s ) ; if ( ( ( fields . length ) != 4 ) && ( ( fields . length ) != 5 ) ) { throw new java . lang . IllegalArgumentException ( ( "Invalid<sp>image<sp>adaptive<sp>media<sp>configuration:<sp>" + s ) ) ; } java . lang . String name = fields [ 0 ] ; name = _http . decodeURL ( name ) ; java . lang . String description = fields [ 1 ] ; description = _http . decodeURL ( description ) ; java . lang . String uuid = fields [ 2 ] ; if ( ( com . liferay . portal . kernel . util . Validator . isNull ( name ) ) || ( com . liferay . portal . kernel . util . Validator . isNull ( uuid ) ) ) { throw new java . lang . IllegalArgumentException ( ( "Invalid<sp>image<sp>adaptive<sp>media<sp>configuration:<sp>" + s ) ) ; } java . lang . String [ ] attributes = com . liferay . adaptive . media . image . internal . configuration . AMImageConfigurationEntryParser . _attributeSeparatorPattern . split ( fields [ 3 ] ) ; java . util . Map < java . lang . String , java . lang . String > properties = new java . util . HashMap ( ) ; for ( java . lang . String attribute : attributes ) { java . lang . String [ ] keyValuePair = com . liferay . adaptive . media . image . internal . configuration . AMImageConfigurationEntryParser . _keyValueSeparatorPattern . split ( attribute ) ; properties . put ( keyValuePair [ 0 ] , keyValuePair [ 1 ] ) ; } boolean enabled = true ; if ( ( fields . length ) == 5 ) { java . lang . String disabledAttribute = fields [ 4 ] ; java . util . regex . Matcher matcher = com . liferay . adaptive . media . image . internal . configuration . AMImageConfigurationEntryParser . _disabledSeparatorPattern . matcher ( disabledAttribute ) ; if ( ! ( matcher . matches ( ) ) ) { throw new java . lang . IllegalArgumentException ( ( "Invalid<sp>image<sp>adaptive<sp>media<sp>configuration:<sp>" + s ) ) ; } enabled = com . liferay . portal . kernel . util . GetterUtil . getBoolean ( matcher . group ( 1 ) ) ; } return new com . liferay . adaptive . media . image . internal . configuration . AMImageConfigurationEntryImpl ( name , description , uuid , properties , enabled ) ; }
org . junit . Assert . assertEquals ( expected , actual )
extractSelectorsLuceneQuery4 ( ) { datawave . audit . SplitSelectorExtractor extractor = new datawave . audit . SplitSelectorExtractor ( ) ; extractor . setSeparatorParameter ( "delimiter" ) ; datawave . webservice . query . QueryImpl q = new datawave . webservice . query . QueryImpl ( ) ; q . addParameter ( "delimiter" , "," ) ; q . setQuery ( "selector1,selector2,selector3" ) ; java . util . List < java . lang . String > selectorList = extractor . extractSelectors ( q ) ; java . util . List < java . lang . String > expected = com . google . common . collect . Lists . newArrayList ( "selector1" , "selector2" , "selector3" ) ; "<AssertPlaceHolder>" ; } extractSelectors ( datawave . webservice . query . Query ) { java . util . List < java . lang . String > selectorList = new java . util . ArrayList ( ) ; java . util . List < org . apache . commons . jexl2 . parser . ASTEQNode > eqNodes = null ; datawave . query . language . tree . QueryNode node = null ; org . apache . commons . jexl2 . parser . ASTJexlScript jexlScript = null ; try { jexlScript = datawave . query . jexl . JexlASTHelper . parseJexlQuery ( query . getQuery ( ) ) ; } catch ( java . lang . Throwable t1 ) { try { node = luceneToJexlParser . parse ( query . getQuery ( ) ) ; java . lang . String jexlQuery = node . getOriginalQuery ( ) ; jexlScript = datawave . query . jexl . JexlASTHelper . parseJexlQuery ( jexlQuery ) ; } catch ( java . lang . Throwable t2 ) { } } if ( jexlScript != null ) { eqNodes = datawave . query . jexl . JexlASTHelper . getPositiveEQNodes ( jexlScript ) ; } for ( org . apache . commons . jexl2 . parser . ASTEQNode n : eqNodes ) { java . lang . Object literal = datawave . query . jexl . JexlASTHelper . getLiteralValue ( n ) ; if ( literal != null ) { selectorList . add ( literal . toString ( ) ) ; } } return selectorList ; }
org . junit . Assert . assertEquals ( expected , selectorList )
testIsUpToDateLocalSiteUpdatesAvailable ( ) { mockUpdateUtil = setupUpdateUtilLocalUpdateSite ( mockInstalledChannelXmlBean , mockAvailableChannelXmlBean ) ; boolean isRemoteUpdateSite = false ; mockUpdateSettings = setupUpdateSettings ( isRemoteUpdateSite ) ; expect ( mockApplication . getPluginManager ( ) ) . andReturn ( mockPluginManager ) . anyTimes ( ) ; expect ( mockApplication . getSquirrelPreferences ( ) ) . andReturn ( mockSquirrelPreferences ) . anyTimes ( ) ; expect ( mockSquirrelPreferences . getUpdateSettings ( ) ) . andReturn ( mockUpdateSettings ) . anyTimes ( ) ; mockSquirrelPreferences . setUpdateSettings ( mockUpdateSettings ) ; mockUpdateSettings . setLastUpdateCheckTimeMillis ( isA ( java . lang . String . class ) ) ; expect ( mockFileWrapperFactory . create ( net . sourceforge . squirrel_sql . client . update . UpdateControllerImplTest . FILE_SYSTEM_UPDATE_PATH , net . sourceforge . squirrel_sql . client . update . UpdateUtil . RELEASE_XML_FILENAME ) ) . andReturn ( mockLocalUpdateReleaseFile ) ; expect ( mockFileWrapperFactory . create ( mockDownloadsDir , net . sourceforge . squirrel_sql . client . update . UpdateUtil . RELEASE_XML_FILENAME ) ) . andReturn ( mockDownloadReleaseXmlFile ) ; mockUpdateUtil . copyFile ( mockLocalUpdateReleaseFile , mockDownloadReleaseXmlFile ) ; expectLastCall ( ) . times ( 1 ) ; replayAll ( ) ; underTest = new net . sourceforge . squirrel_sql . client . update . UpdateControllerImpl ( mockApplication ) ; underTest . setUpdateUtil ( mockUpdateUtil ) ; underTest . setFileWrapperFactory ( mockFileWrapperFactory ) ; boolean result = underTest . isUpToDate ( ) ; "<AssertPlaceHolder>" ; verifyAll ( ) ; } isUpToDate ( ) { boolean result = true ; try { logDebug ( ( "isUpToDate:<sp>checking<sp>to<sp>see<sp>if<sp>software<sp>is<sp>up-to-date;<sp>currentTimeMillis<sp>=<sp>" + ( java . lang . System . currentTimeMillis ( ) ) ) ) ; net . sourceforge . squirrel_sql . client . update . async . ReleaseFileUpdateCheckTask task = new net . sourceforge . squirrel_sql . client . update . async . ReleaseFileUpdateCheckTask ( null , _updateSettings , _util , _app ) ; task . run ( ) ; result = task . isUpToDate ( ) ; } catch ( java . lang . Exception e ) { net . sourceforge . squirrel_sql . client . update . autocheck . UpdateCheckTimerImpl . s_log . error ( ( "isUpToDate:<sp>Unable<sp>to<sp>determine<sp>up-to-date<sp>status:<sp>" + ( e . getMessage ( ) ) ) , e ) ; } return result ; }
org . junit . Assert . assertFalse ( result )
testInit_bundle ( ) { java . net . URL url = net . sourceforge . jwbf . JWBF . newURLWithoutHandler ( "bundle:///a" ) ; java . lang . String packageName = "" ; java . util . Map < java . lang . String , java . lang . String > result = net . sourceforge . jwbf . JWBF . init ( packageName , net . sourceforge . jwbf . JWBF . toUri ( url ) ) ; java . util . Map < java . lang . String , java . lang . String > expected = com . google . common . collect . ImmutableMap . of ( ) ; "<AssertPlaceHolder>" ; } of ( ) { return new net . sourceforge . jwbf . mediawiki . ApiMatcherBuilder ( ) ; }
org . junit . Assert . assertEquals ( expected , result )
setValue_anyString_valueIsSet ( ) { java . lang . String aString = "Some<sp>string" ; sampledValue . setValue ( aString ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return value ; }
org . junit . Assert . assertThat ( sampledValue . getValue ( ) , org . hamcrest . CoreMatchers . equalTo ( aString ) )
testFindNotificationSchemasByAppId ( ) { org . kaaproject . kaa . server . common . dao . model . sql . Application application = generateApplication ( null ) ; java . util . List < org . kaaproject . kaa . server . common . dao . model . sql . NotificationSchema > schemas = generateNotificationSchema ( application , 1 , 1 , null ) ; java . util . List < org . kaaproject . kaa . server . common . dao . model . sql . NotificationSchema > found = notificationSchemaDao . findNotificationSchemasByAppId ( application . getStringId ( ) ) ; "<AssertPlaceHolder>" ; } getStringId ( ) { if ( isBlank ( id ) ) { generateId ( ) ; } return id ; }
org . junit . Assert . assertEquals ( schemas , found )
testGetApplicationServerResourcesWithNull ( ) { java . util . List < ch . puzzle . itc . mobiliar . business . resourcegroup . entity . ResourceEntity > applicationServers = applistScreenDomainService . getApplicationServerResources ( "*" , 42 , java . util . Collections . < java . lang . Integer > emptyList ( ) ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { if ( ( ( asProperties ) != null ) && ( ! ( asProperties . isEmpty ( ) ) ) ) { return false ; } if ( ( ( nodeProperties ) != null ) && ( ! ( nodeProperties . isEmpty ( ) ) ) ) { return false ; } if ( ( ( consumerUnit ) != null ) && ( ! ( consumerUnit . isEmpty ( ) ) ) ) { return false ; } return true ; }
org . junit . Assert . assertTrue ( applicationServers . isEmpty ( ) )
testSetCurrentThemeToUnknownId ( ) { org . eclipse . rap . rwt . internal . theme . ThemeUtil . setCurrentThemeId ( org . eclipse . rap . rwt . internal . service . ContextProvider . getUISession ( ) , "unknown.theme" ) ; "<AssertPlaceHolder>" ; } getCurrentThemeId ( ) { org . eclipse . rap . rwt . service . UISession uiSession = org . eclipse . rap . rwt . internal . service . ContextProvider . getUISession ( ) ; return ( ( java . lang . String ) ( uiSession . getAttribute ( org . eclipse . rap . rwt . internal . theme . ThemeUtil . CURR_THEME_ATTR ) ) ) ; }
org . junit . Assert . assertEquals ( "unknown.theme" , org . eclipse . rap . rwt . internal . theme . ThemeUtil . getCurrentThemeId ( ) )
testCommandExecutor ( ) { org . bff . javampd . server . MPD mpd = mpdBuilder . build ( ) ; "<AssertPlaceHolder>" ; } getCommandExecutor ( ) { return this . commandExecutor ; }
org . junit . Assert . assertNotNull ( mpd . getCommandExecutor ( ) )