input
stringlengths
28
18.7k
output
stringlengths
39
1.69k
testGetType ( ) { de . mirkosertic . gameengine . event . ReadOnlyProperty < java . lang . String > theProperty = new de . mirkosertic . gameengine . event . ReadOnlyProperty ( java . lang . String . class , this , "property" , "default" ) ; "<AssertPlaceHolder>" ; } getType ( ) { return de . mirkosertic . gameengine . core . GameResourceType . SOUND ; }
org . junit . Assert . assertSame ( java . lang . String . class , theProperty . getType ( ) )
testGeenGedeblokkeerdeMeldingen ( ) { final nl . bzk . brp . bijhouding . business . stappen . resultaat . Resultaat resultaat = stap . voerStapUit ( bericht ) ; "<AssertPlaceHolder>" ; } getMeldingen ( ) { return java . util . Collections . unmodifiableSet ( meldingen ) ; }
org . junit . Assert . assertTrue ( resultaat . getMeldingen ( ) . isEmpty ( ) )
testDecrypt_3 ( ) { final org . apache . shindig . gadgets . oauth2 . persistence . sample . NoOpEncrypter fixture = new org . apache . shindig . gadgets . oauth2 . persistence . sample . NoOpEncrypter ( ) ; final java . lang . String encryptedSecret = "" ; final byte [ ] bytes = fixture . decrypt ( encryptedSecret . getBytes ( "UTF-8" ) ) ; final java . lang . String result = new java . lang . String ( bytes , "UTF-8" ) ; "<AssertPlaceHolder>" ; } decrypt ( byte [ ] ) { return encryptedSecret ; }
org . junit . Assert . assertEquals ( "" , result )
testFirst ( ) { final io . vertigo . app . config . AppConfig appConfig = io . vertigo . dynamo . environment . multi . MultiResourcesEnvironmentManagerTest . prepareDefaultAppConfigBuilder ( ) . addModule ( io . vertigo . app . config . ModuleConfig . builder ( "myApp" ) . addDefinitionProvider ( io . vertigo . app . config . DefinitionProviderConfig . builder ( io . vertigo . dynamo . plugins . environment . DynamoDefinitionProvider . class ) . addDefinitionResource ( "kpr" , "io/vertigo/dynamo/environment/multi/data/execution.kpr" ) . build ( ) ) . build ( ) ) . build ( ) ; try ( final io . vertigo . app . AutoCloseableApp app = new io . vertigo . app . AutoCloseableApp ( appConfig ) ) { final io . vertigo . dynamo . domain . metamodel . Domain doString = app . getDefinitionSpace ( ) . resolve ( "DO_STRING" , io . vertigo . dynamo . domain . metamodel . Domain . class ) ; "<AssertPlaceHolder>" ; } } resolve ( java . lang . String , Class ) { return null ; }
org . junit . Assert . assertNotNull ( doString )
testRowsCurrentRowUnboundedFollowingSortOnResult ( ) { java . lang . String sqlText = java . lang . String . format ( ( "<sp>100<sp>|<sp>3<sp>|<sp>55000<sp>|293000<sp>|\n" 7 + ( "<sp>10<sp>|<sp>1<sp>|<sp>50000<sp>|436000<sp>|\n" 0 + "and<sp>unbounded<sp>following)<sp>from<sp>%s<sp>--SPLICE-PROPERTIES<sp>useSpark<sp>=<sp>%s<sp>\n<sp>ORDER<sp>BY<sp>empnum" ) ) , this . getTableReference ( com . splicemachine . derby . impl . sql . execute . operations . WindowFunctionIT . EMPTAB ) , useSpark ) ; java . sql . ResultSet rs = com . splicemachine . derby . impl . sql . execute . operations . WindowFunctionIT . methodWatcher . executeQuery ( sqlText ) ; java . lang . String expected = "EMPNUM<sp>|DEPT<sp>|SALARY<sp>|<sp>4<sp>|\n" + ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "------------------------------\n" + "<sp>10<sp>|<sp>1<sp>|<sp>50000<sp>|436000<sp>|\n" ) + "<sp>100<sp>|<sp>3<sp>|<sp>55000<sp>|293000<sp>|\n" 1 ) + "<sp>100<sp>|<sp>3<sp>|<sp>55000<sp>|293000<sp>|\n" 0 ) + "<sp>40<sp>|<sp>2<sp>|<sp>52000<sp>|157000<sp>|\n" ) + "<sp>100<sp>|<sp>3<sp>|<sp>55000<sp>|293000<sp>|\n" 5 ) + "<sp>49<sp>|<sp>2<sp>|<sp>53000<sp>|<sp>53000<sp>|\n" ) + "<sp>100<sp>|<sp>3<sp>|<sp>55000<sp>|293000<sp>|\n" 6 ) + "<sp>55<sp>|<sp>1<sp>|<sp>52000<sp>|334000<sp>|\n" ) + "<sp>60<sp>|<sp>1<sp>|<sp>78000<sp>|<sp>78000<sp>|\n" ) + "<sp>100<sp>|<sp>3<sp>|<sp>55000<sp>|293000<sp>|\n" 3 ) + "<sp>100<sp>|<sp>3<sp>|<sp>55000<sp>|293000<sp>|\n" 2 ) + "<sp>100<sp>|<sp>3<sp>|<sp>55000<sp>|293000<sp>|\n" 8 ) + "<sp>100<sp>|<sp>3<sp>|<sp>55000<sp>|293000<sp>|\n" ) + "<sp>100<sp>|<sp>3<sp>|<sp>55000<sp>|293000<sp>|\n" 4 ) + "<sp>120<sp>|<sp>3<sp>|<sp>75000<sp>|238000<sp>|" ) ; "<AssertPlaceHolder>" ; rs . close ( ) ; } toStringUnsorted ( com . splicemachine . homeless . ResultSet ) { return com . splicemachine . homeless . TestUtils . FormattedResult . ResultFactory . convert ( "" , rs , false ) . toString ( ) . trim ( ) ; }
org . junit . Assert . assertEquals ( ( ( "<sp>100<sp>|<sp>3<sp>|<sp>55000<sp>|293000<sp>|\n" 9 + sqlText ) + "<sp>100<sp>|<sp>3<sp>|<sp>55000<sp>|293000<sp>|\n" 9 ) , expected , TestUtils . FormattedResult . ResultFactory . toStringUnsorted ( rs ) )
isSetTransientData ( ) { final org . bonitasoft . engine . data . instance . model . archive . impl . SAXMLObjectDataInstanceImpl saxmlObjectDataInstanceImpl = new org . bonitasoft . engine . data . instance . model . archive . impl . SAXMLObjectDataInstanceImpl ( ) ; saxmlObjectDataInstanceImpl . setTransientData ( true ) ; "<AssertPlaceHolder>" ; } isTransientData ( ) { return transientData ; }
org . junit . Assert . assertEquals ( true , saxmlObjectDataInstanceImpl . isTransientData ( ) )
initialisesBoundsToSource ( ) { java . awt . geom . Point2D centre = place . getCentre ( ) ; java . awt . Rectangle expected = new java . awt . Rectangle ( 0 , 0 , ( ( int ) ( centre . getX ( ) ) ) , ( ( int ) ( centre . getY ( ) ) ) ) ; java . awt . Rectangle actual = temporaryArcView . getBounds ( ) ; "<AssertPlaceHolder>" ; } getBounds ( ) { return path . getBounds ( ) ; }
org . junit . Assert . assertEquals ( expected , actual )
executesHttpGETRequestWithTemplateReplacement ( ) { setField ( getDelegate , "url" , new org . activiti . engine . impl . el . FixedValue ( "foo" ) ) ; final org . springframework . http . ResponseEntity < java . lang . Object > responseEntity = mock ( org . springframework . http . ResponseEntity . class ) ; given ( responseEntity . getBody ( ) ) . willReturn ( "bar" ) ; given ( restTemplate . exchange ( any ( java . lang . String . class ) , eq ( com . ge . digitaltwin . tutorial . workflow . activiti . GET ) , any ( org . springframework . http . HttpEntity . class ) , eq ( java . lang . Object . class ) , any ( java . util . Map . class ) ) ) . willReturn ( responseEntity ) ; given ( delegateExecution . hasVariable ( com . ge . digitaltwin . tutorial . workflow . activiti . BaseRESTServiceJavaDelegate . PARAMS_KEY ) ) . willReturn ( true ) ; given ( delegateExecution . getVariable ( com . ge . digitaltwin . tutorial . workflow . activiti . BaseRESTServiceJavaDelegate . PARAMS_KEY ) ) . willReturn ( new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ) ; doThrow ( com . ge . digitaltwin . tutorial . workflow . activiti . RuntimeException . class ) . when ( delegateExecution ) . setVariable ( eq ( com . ge . digitaltwin . tutorial . workflow . activiti . BaseRESTServiceJavaDelegate . DATA_KEY ) , eq ( "bar" ) ) ; try { getDelegate . execute ( delegateExecution ) ; org . junit . Assert . fail ( "Expected<sp>RuntimeException<sp>to<sp>be<sp>thrown<sp>by<sp>mock" ) ; } catch ( java . lang . IllegalArgumentException iae ) { org . junit . Assert . fail ( iae . getMessage ( ) ) ; } catch ( java . lang . RuntimeException re ) { "<AssertPlaceHolder>" ; } } execute ( org . activiti . engine . delegate . DelegateExecution ) { if ( delegateExecution != null ) { final org . springframework . http . ResponseEntity < java . lang . Object > serviceResponse = doGet ( getURLasString ( ) , new org . springframework . http . HttpEntity ( createHttpHeaders ( delegateExecution ) ) , getProcessVariable ( delegateExecution , com . ge . digitaltwin . tutorial . workflow . activiti . PARAMS_KEY ) ) ; updateDataKeyVariable ( delegateExecution , serviceResponse ) ; } }
org . junit . Assert . assertTrue ( true )
previousValueWhenMinShouldNotDecrement ( ) { com . willwinder . universalgcodesender . uielements . jog . StepSizeSpinnerModel model = new com . willwinder . universalgcodesender . uielements . jog . StepSizeSpinnerModel ( ) ; model . setValue ( StepSizeSpinnerModel . MIN_VALUE ) ; "<AssertPlaceHolder>" ; } getPreviousValue ( ) { double value = ( ( double ) ( getValue ( ) ) ) ; double stepSize = com . willwinder . universalgcodesender . uielements . jog . StepSizeSpinnerModel . MAX_VALUE ; while ( stepSize >= ( com . willwinder . universalgcodesender . uielements . jog . StepSizeSpinnerModel . MIN_VALUE ) ) { if ( value > stepSize ) { break ; } else { stepSize = stepSize / 10 ; } } if ( value <= ( com . willwinder . universalgcodesender . uielements . jog . StepSizeSpinnerModel . MIN_VALUE ) ) { return null ; } return value - stepSize ; }
org . junit . Assert . assertEquals ( null , model . getPreviousValue ( ) )
newDocumentFromURLTemplateProviderSpecifiedNonTerminalButOverriddenFromUITerminal ( ) { org . xwiki . model . reference . DocumentReference documentReference = new org . xwiki . model . reference . DocumentReference ( "xwiki" , "X" , "Y" ) ; com . xpn . xwiki . doc . XWikiDocument document = mock ( com . xpn . xwiki . doc . XWikiDocument . class ) ; when ( document . getDocumentReference ( ) ) . thenReturn ( documentReference ) ; when ( document . isNew ( ) ) . thenReturn ( true ) ; context . setDoc ( document ) ; java . lang . String templateProviderFullName = "templateprovider" 0 ; when ( mockRequest . getParameter ( "templateprovider" ) ) . thenReturn ( templateProviderFullName ) ; when ( mockRequest . getParameter ( "tocreate" ) ) . thenReturn ( "terminal" ) ; mockExistingTemplateProviders ( templateProviderFullName , new org . xwiki . model . reference . DocumentReference ( "xwiki" , java . util . Arrays . asList ( "XWiki" ) , "MyTemplateProvider" ) , Collections . EMPTY_LIST , false ) ; java . lang . String result = action . render ( context ) ; "<AssertPlaceHolder>" ; verify ( mockURLFactory ) . createURL ( "X" , "Y" , "edit" , "template=XWiki.MyTemplate&parent=Main.WebHome&title=Y" , null , "xwiki" , context ) ; } render ( com . xpn . xwiki . XWikiContext ) { com . xpn . xwiki . web . XWikiRequest request = context . getRequest ( ) ; java . lang . String path = request . getRequestURI ( ) ; java . lang . String filename = com . xpn . xwiki . util . Util . decodeURI ( path . substring ( ( ( path . lastIndexOf ( "/" ) ) + 1 ) ) , context ) ; try { ( ( com . xpn . xwiki . plugin . charts . ChartingPluginApi ) ( context . getWiki ( ) . getPluginApi ( "charting" , context ) ) ) . outputFile ( filename , context ) ; } catch ( java . io . IOException e ) { throw new com . xpn . xwiki . XWikiException ( com . xpn . xwiki . XWikiException . MODULE_XWIKI_APP , com . xpn . xwiki . XWikiException . ERROR_XWIKI_APP_SEND_RESPONSE_EXCEPTION , "Exception<sp>while<sp>sending<sp>response" , e ) ; } return null ; }
org . junit . Assert . assertNull ( result )
testProcessEachLine ( ) { java . lang . String realtimeStatsInfo = "result<sp>200<sp>150<sp>2147483647\r\nSTATS\r\nrealtime_put<sp>null\r\nrealtime_get<sp>null\r\nrealtime_offset<sp>null\r\nrealtime_get_miss<sp>null\r\nrealtime_put_failed<sp>null\r\nrealtime_message_size<sp>null\r\nEND" ; com . taobao . metamorphosis . utils . Utils . processEachLine ( realtimeStatsInfo , new com . taobao . metamorphosis . utils . Utils . Action ( ) { boolean finished = false ; public boolean isFinished ( ) { return finished ; } @ com . taobao . metamorphosis . tools . monitor . statsprobe . Override public void process ( java . lang . String line ) { if ( line . startsWith ( "realtime_put_failed" ) ) { "<AssertPlaceHolder>" ; finished = true ; } } } ) ; } isNeedAlert ( java . lang . String , long ) { java . lang . String realTimeValue = org . apache . commons . lang . StringUtils . split ( line , "<sp>" ) [ 1 ] ; if ( ( org . apache . commons . lang . StringUtils . isBlank ( realTimeValue ) ) || ( realTimeValue . equalsIgnoreCase ( "null" ) ) ) { if ( com . taobao . metamorphosis . tools . monitor . statsprobe . RealTimeStatsProber . logger . isDebugEnabled ( ) ) { com . taobao . metamorphosis . tools . monitor . statsprobe . RealTimeStatsProber . logger . debug ( ( "realtime_put_failed<sp>value<sp>string<sp>maybe<sp>null:" + realTimeValue ) ) ; } return false ; } java . lang . String realtimePutFailValueStr = org . apache . commons . lang . StringUtils . split ( realTimeValue , "," ) [ 1 ] ; long realtimePutFailValue = 0 ; try { realtimePutFailValue = java . lang . Integer . valueOf ( org . apache . commons . lang . StringUtils . splitByWholeSeparator ( realtimePutFailValueStr , "=" ) [ 1 ] ) ; } catch ( java . lang . Exception e ) { return false ; } if ( realtimePutFailValue >= threshold ) { return true ; } return false ; }
org . junit . Assert . assertFalse ( com . taobao . metamorphosis . tools . monitor . statsprobe . RealTimeStatsProber . isNeedAlert ( line , 10 ) )
testTupleInterface ( ) { java . lang . String expected = org . jbasics . text . StringUtilities . join ( "<sp>" , org . jbasics . types . sequences . SequenceTest . testData ) ; org . jbasics . types . sequences . Sequence < java . lang . String > temp = org . jbasics . types . sequences . Sequence . cons ( ( ( java . lang . Iterable < java . lang . String > ) ( java . util . Arrays . asList ( org . jbasics . types . sequences . SequenceTest . testData ) ) ) ) ; java . lang . StringBuilder b = new java . lang . StringBuilder ( expected . length ( ) ) ; org . jbasics . types . sequences . Sequence < java . lang . String > t = temp ; while ( ! ( t . isEmpty ( ) ) ) { if ( ( b . length ( ) ) > 0 ) { b . append ( "<sp>" ) ; } b . append ( t . left ( ) ) ; t = t . right ( ) ; } "<AssertPlaceHolder>" ; } toString ( ) { final ValueType temp = value ( ) ; return temp != null ? temp . toString ( ) : "#NULL#" ; }
org . junit . Assert . assertEquals ( expected , b . toString ( ) )
testUnaryResultTypeLong ( ) { "<AssertPlaceHolder>" ; } unaryResultType ( java . lang . Object ) { java . lang . Class < ? > type = com . thoughtworks . qdox . builder . impl . EvaluatingVisitor . unaryNumericResultType ( value ) ; if ( type == ( void . class ) ) { if ( value instanceof java . lang . Float ) { type = com . thoughtworks . qdox . builder . impl . Float . class ; } else if ( value instanceof java . lang . Double ) { type = com . thoughtworks . qdox . builder . impl . Double . class ; } } return type ; }
org . junit . Assert . assertEquals ( com . thoughtworks . qdox . builder . impl . Long . class , com . thoughtworks . qdox . builder . impl . EvaluatingVisitor . unaryResultType ( 0L ) )
testNull ( ) { java . lang . Object result = com . orientechnologies . orient . core . metadata . schema . OType . convert ( null , com . orientechnologies . orient . core . metadata . schema . Boolean . class ) ; "<AssertPlaceHolder>" ; } convert ( java . lang . Object , java . lang . Class ) { if ( iValue == null ) return null ; if ( iTargetClass == null ) return iValue ; if ( iValue . getClass ( ) . equals ( iTargetClass ) ) return iValue ; if ( iTargetClass . isAssignableFrom ( iValue . getClass ( ) ) ) return iValue ; try { if ( ( iValue instanceof com . orientechnologies . common . types . OBinary ) && ( iTargetClass . isAssignableFrom ( byte [ ] . class ) ) ) return ( ( com . orientechnologies . common . types . OBinary ) ( iValue ) ) . toByteArray ( ) ; else if ( byte [ ] . class . isAssignableFrom ( iTargetClass ) ) { return com . orientechnologies . orient . core . serialization . serializer . OStringSerializerHelper . getBinaryContent ( iValue ) ; } else if ( byte [ ] . class . isAssignableFrom ( iValue . getClass ( ) ) ) { return iValue ; } else if ( iTargetClass . isEnum ( ) ) { if ( iValue instanceof java . lang . Number ) return ( ( java . lang . Class < java . lang . Enum > ) ( iTargetClass ) ) . getEnumConstants ( ) [ ( ( java . lang . Number ) ( iValue ) ) . intValue ( ) ] ; return java . lang . Enum . valueOf ( ( ( java . lang . Class < java . lang . Enum > ) ( iTargetClass ) ) , iValue . toString ( ) ) ; } else if ( ( iTargetClass . equals ( Byte . TYPE ) ) || ( iTargetClass . equals ( com . orientechnologies . orient . core . metadata . schema . Byte . class ) ) ) { if ( iValue instanceof java . lang . Byte ) return iValue ; else if ( iValue instanceof java . lang . String ) return java . lang . Byte . parseByte ( ( ( java . lang . String ) ( iValue ) ) ) ; else return ( ( java . lang . Number ) ( iValue ) ) . byteValue ( ) ; } else if ( ( iTargetClass . equals ( Short . TYPE ) ) || ( iTargetClass . equals ( com . orientechnologies . orient . core . metadata . schema . Short . class ) ) ) { if ( iValue instanceof java . lang . Short ) return iValue ; else if ( iValue instanceof java . lang . String ) return java . lang . Short . parseShort ( ( ( java . lang . String ) ( iValue ) ) ) ; else return ( ( java . lang . Number ) ( iValue ) ) . shortValue ( ) ; } else if ( ( iTargetClass . equals ( Integer . TYPE ) ) || ( iTargetClass . equals ( com . orientechnologies . orient . core . metadata . schema . Integer . class ) ) ) { if ( iValue instanceof java . lang . Integer ) return iValue ; else if ( iValue instanceof java . lang . String ) { if ( iValue . toString ( ) . equals ( "" ) ) { return null ; } return java . lang . Integer . parseInt ( ( ( java . lang . String ) ( iValue ) ) ) ; } else return ( ( java . lang . Number ) ( iValue ) ) . intValue ( ) ; } else if ( ( iTargetClass . equals ( Long . TYPE ) ) || ( iTargetClass . equals ( com . orientechnologies . orient . core . metadata . schema . Long . class ) ) ) { if ( iValue instanceof java . lang . Long ) return iValue ; else if ( iValue instanceof java . lang . String ) return java . lang . Long . parseLong ( ( ( java . lang . String ) ( iValue ) ) ) ; else if ( iValue instanceof java . util . Date ) return ( ( java . util . Date ) ( iValue ) ) . getTime ( ) ; else return ( ( java . lang . Number ) ( iValue ) ) . longValue ( ) ; } else if ( ( iTargetClass . equals ( Float . TYPE ) ) || ( iTargetClass . equals ( com . orientechnologies . orient . core . metadata . schema . Float . class ) ) ) { if ( iValue instanceof java . lang . Float ) return iValue ; else if ( iValue instanceof java . lang . String ) return java . lang . Float . parseFloat ( ( ( java . lang . String ) ( iValue ) ) ) ; else return ( ( java . lang . Number ) ( iValue ) ) . floatValue ( ) ; } else if ( iTargetClass . equals ( java . math . BigDecimal . class ) ) { if ( iValue instanceof java . lang . String ) return new java . math . BigDecimal ( ( ( java . lang . String ) ( iValue ) ) ) ; else if ( iValue instanceof java . lang . Number ) return new java . math . BigDecimal ( iValue . toString ( ) ) ; } else if ( ( iTargetClass . equals ( Double . TYPE ) ) || ( iTargetClass . equals ( com . orientechnologies . orient
org . junit . Assert . assertEquals ( result , null )
testHuidigHuwelijkMetAanvangBuitelandMetBuitelandsPersoonWijzigingNaam ( ) { final nl . bzk . brp . model . bericht . kern . HuwelijkGeregistreerdPartnerschapBericht huwelijk = maakHuwelijkBericht ( true , true ) ; final nl . bzk . brp . model . hisvolledig . momentview . kern . PersoonView man = maakPersoonView ( false ) ; final nl . bzk . brp . model . hisvolledig . momentview . kern . PersoonView vrouw = maakPersoonView ( false ) ; final java . util . List < nl . bzk . brp . model . basis . BerichtEntiteit > berichtEntiteiten = brby0437 . voerRegelUit ( maakHuidigeSituatie ( StatischeObjecttypeBuilder . LAND_FRANKRIJK ) , huwelijk , null , maakBestaandeBetrokkenen ( man , vrouw ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return elementen . size ( ) ; }
org . junit . Assert . assertEquals ( 0 , berichtEntiteiten . size ( ) )
testOnClose ( ) { final boolean [ ] state = new boolean [ ] { false } ; com . annimon . stream . Stream < java . lang . Integer > stream = com . annimon . stream . Stream . of ( 0 , 1 , 2 ) . onClose ( new java . lang . Runnable ( ) { @ com . annimon . stream . streamtests . Override public void run ( ) { state [ 0 ] = true ; } } ) ; stream . findFirst ( ) ; stream . close ( ) ; "<AssertPlaceHolder>" ; } close ( ) { if ( ( ( params ) != null ) && ( ( params . closeHandler ) != null ) ) { params . closeHandler . run ( ) ; params . closeHandler = null ; } }
org . junit . Assert . assertTrue ( state [ 0 ] )
getStringToInteger ( ) { com . gs . collections . api . block . function . Function < java . lang . String , java . lang . Integer > function = com . gs . collections . impl . block . factory . Functions . getStringToInteger ( ) ; "<AssertPlaceHolder>" ; } valueOf ( char ) { return function . valueOf ( charParameter ) ; }
org . junit . Assert . assertEquals ( java . lang . Integer . valueOf ( 1 ) , function . valueOf ( "1" ) )
testGetResourceValidate ( ) { org . apache . commons . pool2 . impl . GenericObjectPoolConfig poolConfig = new org . apache . commons . pool2 . impl . GenericObjectPoolConfig ( ) ; poolConfig . setTestOnBorrow ( true ) ; this . pool = new org . springframework . data . redis . connection . jredis . JredisPool ( connectionSpec , poolConfig ) ; org . jredis . JRedis client = pool . getResource ( ) ; "<AssertPlaceHolder>" ; } getResource ( ) { try { return internalPool . borrowObject ( ) ; } catch ( java . lang . Exception e ) { throw new org . springframework . data . redis . connection . PoolException ( "Could<sp>not<sp>get<sp>a<sp>resource<sp>from<sp>the<sp>pool" , e ) ; } }
org . junit . Assert . assertNotNull ( client )
testDrill4786_2 ( ) { test ( "refresh<sp>table<sp>metadata<sp>dfs.`%s`" , org . apache . drill . exec . store . parquet . TestParquetMetadataCache . TABLE_NAME_2 ) ; checkForMetadataFile ( org . apache . drill . exec . store . parquet . TestParquetMetadataCache . TABLE_NAME_2 ) ; java . lang . String query1 = java . lang . String . format ( ( "select<sp>dir0,<sp>dir1,<sp>o_custkey,<sp>o_orderdate<sp>from<sp>dfs.`%s`<sp>" + "<sp>where<sp>dir0<sp>in<sp>(1994,<sp>1995)<sp>and<sp>dir1<sp>=<sp>'Q3'" ) , org . apache . drill . exec . store . parquet . TestParquetMetadataCache . TABLE_NAME_2 ) ; int expectedRowCount = 40 ; int expectedNumFiles = 4 ; int actualRowCount = testSql ( query1 ) ; "<AssertPlaceHolder>" ; java . lang . String numFilesPattern = "numFiles=" + expectedNumFiles ; java . lang . String usedMetaPattern = "usedMetadataFile=true" ; java . lang . String cacheFileRootPattern = java . lang . String . format ( "cacheFileRoot=%s/%s" , dirTestWatcher . getRootDir ( ) . getCanonicalPath ( ) , org . apache . drill . exec . store . parquet . TestParquetMetadataCache . TABLE_NAME_2 ) ; org . apache . drill . PlanTestBase . testPlanMatchingPatterns ( query1 , new java . lang . String [ ] { numFilesPattern , usedMetaPattern , cacheFileRootPattern } , new java . lang . String [ ] { } ) ; } testSql ( java . lang . String ) { return org . apache . drill . test . BaseTestQuery . testRunAndPrint ( QueryType . SQL , query ) ; }
org . junit . Assert . assertEquals ( expectedRowCount , actualRowCount )
testGetParametersWithDefaultEntityAndDisabledStatus ( ) { unit . setActive ( false ) ; org . lnu . is . domain . mark . scale . exchange . MarkScaleExchange entity = new org . lnu . is . domain . mark . scale . exchange . MarkScaleExchange ( ) ; java . util . Map < java . lang . String , java . lang . Object > expected = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; expected . put ( "userGroups" , groups ) ; java . util . Map < java . lang . String , java . lang . Object > actual = unit . getParameters ( entity ) ; "<AssertPlaceHolder>" ; } getParameters ( org . springframework . web . context . request . NativeWebRequest ) { java . util . Map < java . lang . String , java . lang . Object > resultMap = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; java . util . Map < java . lang . String , java . lang . String > pathVariables = ( ( java . util . Map < java . lang . String , java . lang . String > ) ( webRequest . getAttribute ( HandlerMapping . URI_TEMPLATE_VARIABLES_ATTRIBUTE , RequestAttributes . SCOPE_REQUEST ) ) ) ; java . util . Map < java . lang . String , java . lang . Object > requestParams = getRequestParameterMap ( webRequest ) ; for ( Map . Entry < java . lang . String , java . lang . Object > entry : requestParams . entrySet ( ) ) { resultMap . put ( entry . getKey ( ) , entry . getValue ( ) ) ; } resultMap . putAll ( pathVariables ) ; return resultMap ; }
org . junit . Assert . assertEquals ( expected , actual )
testLogMessage ( ) { com . sap . hcp . cf . logging . common . TestCustomFields . LOGGER . info ( com . sap . hcp . cf . logging . common . TEST_MESSAGE ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertThat ( getMessage ( ) , org . hamcrest . core . Is . is ( com . sap . hcp . cf . logging . common . TEST_MESSAGE ) )
test_getLocalNexusServer_local_customRepo ( ) { java . lang . System . setProperty ( NexusServerManager . PROP_KEY_NEXUS_REPOSITORY , "mytest" ) ; org . talend . core . nexus . ArtifactRepositoryBean localNexusServer = org . talend . updates . runtime . nexus . component . NexusServerManager . getInstance ( ) . getLocalNexusServer ( ) ; "<AssertPlaceHolder>" ; validateNexusServerInfo ( getNexusServerInfo ( "mytest" ) , localNexusServer ) ; } getLocalNexusServer ( ) { org . talend . core . model . general . INexusService nexusService = null ; if ( org . talend . core . GlobalServiceRegister . getDefault ( ) . isServiceRegistered ( org . talend . core . model . general . INexusService . class ) ) { nexusService = ( ( org . talend . core . model . general . INexusService ) ( org . talend . core . GlobalServiceRegister . getDefault ( ) . getService ( org . talend . core . model . general . INexusService . class ) ) ) ; } if ( nexusService == null ) { return null ; } java . lang . String repoId = java . lang . System . getProperty ( org . talend . updates . runtime . nexus . component . NexusServerManager . PROP_KEY_NEXUS_REPOSITORY , org . talend . updates . runtime . nexus . component . NexusServerManager . DEFAULT_REPOSITORY_ID ) ; return nexusService . getPublishNexusServerBean ( repoId ) ; }
org . junit . Assert . assertNotNull ( localNexusServer )
testDeserializationSpeed ( ) { final com . logsniffer . fields . FieldsMap map = new com . logsniffer . fields . FieldsMap ( ) ; map . put ( "_severity" , new com . logsniffer . model . SeverityLevel ( "DEBUG" , 2 , com . logsniffer . model . SeverityLevel . SeverityClassification . DEBUG ) ) ; map . put ( "_timestamp" , new java . util . Date ( ) ) ; map . put ( "_raw" , org . apache . commons . lang3 . StringUtils . repeat ( "some<sp>text<sp>with<sp>len<sp>23" , 50 ) ) ; for ( int i = 0 ; i < 7 ; i ++ ) { map . put ( ( "somestrfield" + i ) , org . apache . commons . lang3 . StringUtils . repeat ( ( "some<sp>text<sp>" + i ) , 5 ) ) ; } for ( int i = 0 ; i < 3 ; i ++ ) { map . put ( ( "someintfield" + i ) , ( ( int ) ( ( java . lang . Math . random ( ) ) * 1000000 ) ) ) ; } for ( int i = 0 ; i < 2 ; i ++ ) { map . put ( ( "some<sp>text<sp>with<sp>len<sp>23" 0 + i ) , ( ( java . lang . Math . random ( ) ) * 1000000 ) ) ; } final java . lang . String jsonStr = mapper . writeValueAsString ( map ) ; LOGGER . info ( "Serialized<sp>to:<sp>{}" , jsonStr ) ; final long start = java . lang . System . currentTimeMillis ( ) ; int i = 0 ; com . logsniffer . fields . FieldsMap desrerializedMap = null ; for ( ; i < 1000 ; i ++ ) { desrerializedMap = mapper . readValue ( jsonStr , com . logsniffer . fields . FieldsMap . class ) ; } LOGGER . info ( "Deserialized<sp>fields<sp>{}<sp>times<sp>in<sp>{}ms" , i , ( ( java . lang . System . currentTimeMillis ( ) ) - start ) ) ; "<AssertPlaceHolder>" ; } info ( long , java . lang . String ) { final org . springframework . web . servlet . ModelAndView mv = new org . springframework . web . servlet . ModelAndView ( "sources/info" ) ; getAndFillLog ( mv , getAndFillActiveLogSource ( mv , logSource ) , logPath ) ; return mv ; }
org . junit . Assert . assertEquals ( map , desrerializedMap )
testGetIPWhenInputIsNull ( ) { java . net . SocketAddress socketAddress = null ; java . lang . String ip = org . apache . flume . source . SyslogUtils . getIP ( socketAddress ) ; "<AssertPlaceHolder>" ; } getIP ( java . net . SocketAddress ) { try { java . net . InetSocketAddress inetSocketAddress = ( ( java . net . InetSocketAddress ) ( socketAddress ) ) ; java . lang . String ip = inetSocketAddress . getAddress ( ) . getHostAddress ( ) ; if ( ip != null ) { return ip ; } else { throw new java . lang . NullPointerException ( "The<sp>returned<sp>IP<sp>is<sp>null" ) ; } } catch ( java . lang . Exception e ) { org . apache . flume . source . SyslogUtils . logger . warn ( "Unable<sp>to<sp>retrieve<sp>client<sp>IP<sp>address" , e ) ; } return "" ; }
org . junit . Assert . assertEquals ( "" , ip )
testSerialization ( ) { org . jfree . data . xy . XYIntervalDataItem item1 = new org . jfree . data . xy . XYIntervalDataItem ( 1.0 , 0.5 , 1.5 , 2.0 , 1.9 , 2.1 ) ; org . jfree . data . xy . XYIntervalDataItem item2 = ( ( org . jfree . data . xy . XYIntervalDataItem ) ( org . jfree . chart . TestUtils . serialised ( item1 ) ) ) ; "<AssertPlaceHolder>" ; } serialised ( java . lang . Object ) { java . lang . Object result = null ; java . io . ByteArrayOutputStream buffer = new java . io . ByteArrayOutputStream ( ) ; java . io . ObjectOutput out ; try { out = new java . io . ObjectOutputStream ( buffer ) ; out . writeObject ( original ) ; out . close ( ) ; java . io . ObjectInput in = new java . io . ObjectInputStream ( new java . io . ByteArrayInputStream ( buffer . toByteArray ( ) ) ) ; result = in . readObject ( ) ; in . close ( ) ; } catch ( java . io . IOException e ) { throw new java . lang . RuntimeException ( e ) ; } catch ( java . lang . ClassNotFoundException e ) { throw new java . lang . RuntimeException ( e ) ; } return result ; }
org . junit . Assert . assertEquals ( item1 , item2 )
testLeavesOtherStringsAlone ( ) { java . lang . String in = "Hello<sp>world" ; java . lang . String out = converter . convert ( in ) ; "<AssertPlaceHolder>" ; } convert ( java . lang . String ) { return value == null ? value : value . trim ( ) ; }
org . junit . Assert . assertEquals ( in , out )
testParquetJobConfigurationImplementationOptionHasAnArg ( ) { org . apache . sqoop . cli . RelatedOptions commonOptions = testBaseSqoopTool . getCommonOptions ( ) ; org . apache . commons . cli . Option implementationOption = commonOptions . getOption ( org . apache . sqoop . tool . TestBaseSqoopTool . PARQUET_CONFIGURATOR_IMPLEMENTATION ) ; "<AssertPlaceHolder>" ; } getCommonOptions ( ) { org . apache . sqoop . cli . RelatedOptions commonOpts = new org . apache . sqoop . cli . RelatedOptions ( "Set<sp>authentication<sp>username" 2 ) ; commonOpts . addOption ( org . apache . commons . cli . OptionBuilder . withArgName ( "Set<sp>authentication<sp>username" 3 ) . hasArg ( ) . withDescription ( "Specify<sp>JDBC<sp>connect<sp>string" ) . withLongOpt ( org . apache . sqoop . tool . BaseSqoopTool . CONNECT_STRING_ARG ) . create ( ) ) ; commonOpts . addOption ( org . apache . commons . cli . OptionBuilder . withArgName ( "Set<sp>authentication<sp>username" 8 ) . hasArg ( ) . withDescription ( "Defines<sp>the<sp>transaction<sp>isolation<sp>level<sp>for<sp>metadata<sp>queries.<sp>" 6 ) . withLongOpt ( org . apache . sqoop . tool . BaseSqoopTool . CONN_MANAGER_CLASS_NAME ) . create ( ) ) ; commonOpts . addOption ( org . apache . commons . cli . OptionBuilder . withArgName ( "Defines<sp>the<sp>transaction<sp>isolation<sp>level<sp>for<sp>metadata<sp>queries.<sp>" 7 ) . hasArg ( ) . withDescription ( "Specify<sp>connection<sp>parameters<sp>file" ) . withLongOpt ( org . apache . sqoop . tool . BaseSqoopTool . CONNECT_PARAM_FILE ) . create ( ) ) ; commonOpts . addOption ( org . apache . commons . cli . OptionBuilder . withArgName ( "Set<sp>authentication<sp>username" 8 ) . hasArg ( ) . withDescription ( "Defines<sp>the<sp>transaction<sp>isolation<sp>level<sp>for<sp>metadata<sp>queries.<sp>" 0 ) . withLongOpt ( org . apache . sqoop . tool . BaseSqoopTool . DRIVER_ARG ) . create ( ) ) ; commonOpts . addOption ( org . apache . commons . cli . OptionBuilder . withArgName ( "Set<sp>authentication<sp>username" 6 ) . hasArg ( ) . withDescription ( "Set<sp>authentication<sp>username" ) . withLongOpt ( org . apache . sqoop . tool . BaseSqoopTool . USERNAME_ARG ) . create ( ) ) ; commonOpts . addOption ( org . apache . commons . cli . OptionBuilder . withArgName ( "Defines<sp>the<sp>transaction<sp>isolation<sp>level<sp>for<sp>metadata<sp>queries.<sp>" 1 ) . hasArg ( ) . withDescription ( "Set<sp>authentication<sp>password" ) . withLongOpt ( org . apache . sqoop . tool . BaseSqoopTool . PASSWORD_ARG ) . create ( ) ) ; commonOpts . addOption ( org . apache . commons . cli . OptionBuilder . withArgName ( org . apache . sqoop . tool . BaseSqoopTool . PASSWORD_PATH_ARG ) . hasArg ( ) . withDescription ( "Set<sp>authentication<sp>password<sp>file<sp>path" ) . withLongOpt ( org . apache . sqoop . tool . BaseSqoopTool . PASSWORD_PATH_ARG ) . create ( ) ) ; commonOpts . addOption ( org . apache . commons . cli . OptionBuilder . withDescription ( "Defines<sp>the<sp>transaction<sp>isolation<sp>level<sp>for<sp>metadata<sp>queries.<sp>" 3 ) . create ( org . apache . sqoop . tool . BaseSqoopTool . PASSWORD_PROMPT_ARG ) ) ; commonOpts . addOption ( org . apache . commons . cli . OptionBuilder . withArgName ( org . apache . sqoop . tool . BaseSqoopTool . PASSWORD_ALIAS_ARG ) . hasArg ( ) . withDescription ( "Defines<sp>the<sp>transaction<sp>isolation<sp>level<sp>for<sp>metadata<sp>queries.<sp>" 5 ) . withLongOpt ( org . apache . sqoop . tool . BaseSqoopTool . PASSWORD_ALIAS_ARG ) . create ( ) ) ; commonOpts . addOption ( org . apache . commons . cli . OptionBuilder . withArgName ( "dir" ) . hasArg ( ) . withDescription ( "Override<sp>$HADOOP_MAPRED_HOME_ARG" ) . withLongOpt ( org . apache . sqoop . tool . BaseSqoopTool . HADOOP_MAPRED_HOME_ARG ) . create ( ) ) ; commonOpts . addOption ( org . apache . commons . cli . OptionBuilder . withArgName ( "Set<sp>authentication<sp>username" 5 ) . hasArg ( ) . withDescription ( "Override<sp>$HADOOP_MAPRED_HOME_ARG" ) . withLongOpt ( org . apache . sqoop . tool . BaseSqoopTool . HADOOP_HOME_ARG ) . create ( ) ) ; commonOpts . addOption ( org . apache . commons . cli . OptionBuilder . withDescription ( "Specify<sp>connection<sp>parameters<sp>file" 0 ) . withLongOpt ( org . apache . sqoop . tool . BaseSqoopTool . SKIP_DISTCACHE_ARG ) . create ( ) ) ; commonOpts . addOption ( org . apache . commons . cli . OptionBuilder . withDescription ( "Defines<sp>the<sp>transaction<sp>isolation<sp>level<sp>for<sp>metadata<sp>queries.<sp>" 2 ) . withLongOpt ( org . apache . sqoop . tool . BaseSqoopTool . VERBOSE_ARG ) . create ( ) ) ; commonOpts . addOption ( org . apache . commons . cli . OptionBuilder . withDescription ( "Defines<sp>the<sp>transaction<sp>isolation<sp>level<sp>for<sp>metadata<sp>queries.<sp>" 9 ) . withLongOpt ( org . apache . sqoop . tool . BaseSqoopTool . HELP_ARG ) . create ( ) ) ; commonOpts . addOption ( org . apache . commons . cli . OptionBuilder . withDescription ( "Set<sp>authentication<sp>username" 9 ) . withLongOpt ( org . apache . sqoop . tool . BaseSqoopTool . TEMP_ROOTDIR_ARG ) . hasArg ( ) . withArgName ( "rootdir" ) . create ( ) ) ; commonOpts . addOption ( org . apache . commons . cli . OptionBuilder . withDescription ( ( "Defines<sp>the<sp>transaction<sp>isolation<sp>level<sp>for<sp>metadata<sp>queries.<sp>" + "Set<sp>authentication<sp>username" 1 ) ) . withLongOpt ( org . apache . sqoop . tool . BaseSqoopTool . METADATA_TRANSACTION_ISOLATION_LEVEL ) . hasArg ( ) . withArgName ( "Defines<sp>the<sp>transaction<sp>isolation<sp>level<sp>for<sp>metadata<sp>queries.<sp>" 4 ) . create ( ) ) ; commonOpts . addOption ( org . apache . commons . cli . OptionBuilder . withDescription ( "Set<sp>authentication<sp>username" 0 ) . withLongOpt ( org . apache . sqoop . tool . BaseSqoopTool . THROW_ON_ERROR_ARG ) . create ( ) ) ; commonOpts . addOption ( org . apache . commons . cli . OptionBuilder . withDescription ( "Set<sp>authentication<sp>username" 4 ) . withLongOpt ( org . apache . sqoop . tool . BaseSqoopTool . RELAXED_ISOLATION ) . create ( ) ) ; commonOpts . addOption ( org . apache . commons . cli . OptionBuilder . withDescription ( "Defines<sp>the<sp>transaction<sp>isolation<sp>level<sp>for<sp>metadata<sp>queries.<sp>" 8 ) . withLongOpt ( org . apache . sqoop . tool . BaseSqoopTool . ORACLE_ESCAPING_DISABLED ) . hasArg ( ) . withArgName ( "boolean" ) . create ( ) ) ; commonOpts . addOption ( org . apache . commons . cli . OptionBuilder . hasArg ( ) . withDescription (
org . junit . Assert . assertTrue ( implementationOption . hasArg ( ) )
testGetSoapActionForSOAP11None ( ) { org . apache . cxf . binding . soap . SoapMessage message = setUpMessage ( "text/xml" , org . apache . cxf . binding . soap . Soap11 . getInstance ( ) , null ) ; control . replay ( ) ; java . lang . String action = org . apache . cxf . binding . soap . interceptor . SoapActionInInterceptor . getSoapAction ( message ) ; "<AssertPlaceHolder>" ; control . verify ( ) ; }
org . junit . Assert . assertNull ( action )
testClaimQueueChangeCversion ( ) { org . apache . hadoop . hbase . ServerName serverName1 = org . apache . hadoop . hbase . ServerName . valueOf ( "127.0.0.1" , 8000 , 10000 ) ; org . apache . hadoop . hbase . replication . TestZKReplicationQueueStorage . STORAGE . addWAL ( serverName1 , "1" , "file" ) ; int v0 = org . apache . hadoop . hbase . replication . TestZKReplicationQueueStorage . STORAGE . getQueuesZNodeCversion ( ) ; org . apache . hadoop . hbase . ServerName serverName2 = org . apache . hadoop . hbase . ServerName . valueOf ( "127.0.0.1" , 8001 , 10001 ) ; org . apache . hadoop . hbase . replication . TestZKReplicationQueueStorage . STORAGE . claimQueue ( serverName1 , "1" , serverName2 ) ; int v1 = org . apache . hadoop . hbase . replication . TestZKReplicationQueueStorage . STORAGE . getQueuesZNodeCversion ( ) ; "<AssertPlaceHolder>" ; } getQueuesZNodeCversion ( ) { if ( ( called ) < 4 ) { ( called ) ++ ; } return called ; }
org . junit . Assert . assertEquals ( 1 , ( v1 - v0 ) )
testAddWebFacetToBatch_nonWebFacet ( ) { com . google . cloud . tools . eclipse . appengine . facets . FacetUtil facetUtil = new com . google . cloud . tools . eclipse . appengine . facets . FacetUtil ( mockFacetedProject ) ; try { facetUtil . addWebFacetToBatch ( JavaFacet . VERSION_1_7 ) ; org . junit . Assert . fail ( ) ; } catch ( java . lang . IllegalArgumentException ex ) { "<AssertPlaceHolder>" ; } } getMessage ( ) { return message ; }
org . junit . Assert . assertNotNull ( ex . getMessage ( ) )
testNow ( ) { java . lang . String now = nom . tam . fits . FitsDate . getFitsDateString ( ) ; java . lang . String now2 = nom . tam . fits . FitsDate . getFitsDateString ( new java . util . Date ( ) ) ; int tryCount = 100 ; while ( ( tryCount > 0 ) && ( ! ( now . regionMatches ( 0 , now2 , 0 , ( ( now . length ( ) ) - 3 ) ) ) ) ) { now = nom . tam . fits . FitsDate . getFitsDateString ( ) ; now2 = nom . tam . fits . FitsDate . getFitsDateString ( new java . util . Date ( ) ) ; tryCount -- ; } "<AssertPlaceHolder>" ; } getFitsDateString ( java . util . Date ) { return nom . tam . fits . FitsDate . getFitsDateString ( epoch , true ) ; }
org . junit . Assert . assertTrue ( ( tryCount > 0 ) )
focusing ( ) { jetbrains . jetpad . projectional . view . View view = newFocusableView ( ) ; container . contentRoot ( ) . children ( ) . add ( view ) ; container . focusedView ( ) . set ( view ) ; "<AssertPlaceHolder>" ; } focused ( ) { return getProp ( jetbrains . jetpad . projectional . view . View . FOCUSED ) ; }
org . junit . Assert . assertTrue ( view . focused ( ) . get ( ) )
testComputeVec4FromStringWithBlank ( ) { java . lang . String vectorString = "" ; gov . nasa . worldwind . geom . Vec4 result = au . gov . ga . earthsci . worldwind . common . util . Util . computeVec4FromString ( vectorString ) ; "<AssertPlaceHolder>" ; } computeVec4FromString ( java . lang . String ) { if ( au . gov . ga . earthsci . worldwind . common . util . Util . isBlank ( text ) ) { return null ; } java . lang . String separators = "[\\s,]+" ; java . lang . String [ ] split = text . replaceAll ( "\\(|\\)" , "" ) . trim ( ) . split ( separators ) ; if ( ( ( split . length ) == 3 ) || ( ( split . length ) == 4 ) ) { try { double x = java . lang . Double . valueOf ( split [ 0 ] ) ; double y = java . lang . Double . valueOf ( split [ 1 ] ) ; double z = java . lang . Double . valueOf ( split [ 2 ] ) ; double w = 1.0 ; if ( ( split . length ) == 4 ) { w = java . lang . Double . valueOf ( split [ 3 ] ) ; } return new gov . nasa . worldwind . geom . Vec4 ( x , y , z , w ) ; } catch ( java . lang . NumberFormatException e ) { } } return null ; }
org . junit . Assert . assertNull ( result )
testLastHashWins ( ) { c = b . hash ( "abcdef" ) . hash ( "ghij" ) . build ( ) ; "<AssertPlaceHolder>" ; } getHash ( ) { return hash ; }
org . junit . Assert . assertEquals ( "ghij" , c . getHash ( ) )
test ( ) { int [ ] [ ] matrix = new int [ ] [ ] { new int [ ] { 9 , 9 , 4 } , new int [ ] { 6 , 6 , 8 } , new int [ ] { 2 , 1 , 1 } } ; "<AssertPlaceHolder>" ; } longestIncreasingPath ( int [ ] [ ] ) { if ( ( matrix == null ) || ( ( matrix . length ) == 0 ) ) { return 0 ; } int m = matrix . length ; int n = matrix [ 0 ] . length ; if ( n == 0 ) { return 0 ; } int res = 1 ; int [ ] [ ] records = new int [ m ] [ n ] ; for ( int i = 0 ; i < m ; i ++ ) { for ( int j = 0 ; j < n ; j ++ ) { res = java . lang . Math . max ( dfs ( i , j , m , n , matrix , records ) , res ) ; } } return res ; }
org . junit . Assert . assertThat ( longestIncreasingPath ( matrix ) , org . hamcrest . Matchers . is ( 4 ) )
testGetByID ( ) { int id = 0 ; try { id = _setupTestPatientExamination ( false ) ; org . isf . examination . model . PatientExamination patientExamination = examinationOperations . getByID ( id ) ; org . isf . examination . test . Tests . testPatientExamination . check ( patientExamination ) ; org . isf . examination . test . Tests . testPatient . check ( patientExamination . getPatient ( ) ) ; } catch ( java . lang . Exception e ) { e . printStackTrace ( ) ; "<AssertPlaceHolder>" ; } return ; } getPatient ( ) { return patient ; }
org . junit . Assert . assertEquals ( true , false )
testCompareCustomer ( ) { int x = new net . rrm . ehour . sort . ProjectAssignmentAggregateComparator ( ProjectAssignmentAggregateComparator . SORT_ON_CUSTOMER ) . compare ( a1 , a2 ) ; "<AssertPlaceHolder>" ; } compare ( net . rrm . ehour . domain . Project , net . rrm . ehour . domain . Project ) { return new org . apache . commons . lang . builder . CompareToBuilder ( ) . append ( o1 . getCustomer ( ) , o2 . getCustomer ( ) ) . append ( o1 . getName ( ) , o2 . getName ( ) ) . append ( o1 . getProjectCode ( ) , o2 . getProjectCode ( ) ) . append ( o1 . getProjectId ( ) , o2 . getProjectId ( ) ) . toComparison ( ) ; }
org . junit . Assert . assertTrue ( ( x < 0 ) )
testClosing_allStrels ( ) { ij . process . ImageProcessor image = new ij . process . ByteProcessor ( 100 , 100 ) ; for ( int y = 40 ; y < 60 ; y ++ ) { for ( int x = 40 ; x < 60 ; x ++ ) { image . set ( x , y , 255 ) ; } } for ( inra . ijpb . morphology . Strel . Shape type : Strel . Shape . values ( ) ) { inra . ijpb . morphology . Strel strel = type . fromDiameter ( 5 ) ; ij . process . ImageProcessor result = inra . ijpb . morphology . Morphology . closing ( image , strel ) ; for ( int y = 40 ; y < 60 ; y ++ ) { for ( int x = 40 ; x < 60 ; x ++ ) { "<AssertPlaceHolder>" ; } } } } get ( int , int ) { if ( x < 0 ) return ( ( int ) ( this . value ) ) ; if ( y < 0 ) return ( ( int ) ( this . value ) ) ; if ( x >= ( this . image . getWidth ( ) ) ) return ( ( int ) ( this . value ) ) ; if ( y >= ( this . image . getHeight ( ) ) ) return ( ( int ) ( this . value ) ) ; return this . image . get ( x , y ) ; }
org . junit . Assert . assertEquals ( image . get ( x , y ) , result . get ( x , y ) )
testRetrieveOutboundRMProperties ( ) { org . apache . cxf . message . Message msg = control . createMock ( org . apache . cxf . message . Message . class ) ; org . apache . cxf . ws . rm . RMProperties rmps = control . createMock ( org . apache . cxf . ws . rm . RMProperties . class ) ; org . easymock . EasyMock . expect ( msg . get ( RMMessageConstants . RM_PROPERTIES_OUTBOUND ) ) . andReturn ( rmps ) ; control . replay ( ) ; "<AssertPlaceHolder>" ; } retrieveRMProperties ( org . apache . cxf . message . Message , boolean ) { if ( outbound ) { return ( ( org . apache . cxf . ws . rm . RMProperties ) ( message . get ( org . apache . cxf . ws . rm . RMContextUtils . getRMPropertiesKey ( true ) ) ) ) ; } org . apache . cxf . message . Message m = null ; if ( org . apache . cxf . message . MessageUtils . isOutbound ( message ) ) { m = message . getExchange ( ) . getInMessage ( ) ; if ( null == m ) { m = message . getExchange ( ) . getInFaultMessage ( ) ; } } else { m = message ; } if ( null != m ) { return ( ( org . apache . cxf . ws . rm . RMProperties ) ( m . get ( org . apache . cxf . ws . rm . RMContextUtils . getRMPropertiesKey ( false ) ) ) ) ; } return null ; }
org . junit . Assert . assertSame ( rmps , org . apache . cxf . ws . rm . RMContextUtils . retrieveRMProperties ( msg , true ) )
exitCodeIsMinusOneWhenAllReplicationsFail ( ) { doThrow ( new java . lang . RuntimeException ( ) ) . when ( replication1 ) . replicate ( ) ; doThrow ( new java . lang . RuntimeException ( ) ) . when ( replication2 ) . replicate ( ) ; locomotive . run ( applicationArguments ) ; "<AssertPlaceHolder>" ; } getExitCode ( ) { if ( ( replicationFailures ) == ( tableReplications . size ( ) ) ) { return - 1 ; } if ( ( replicationFailures ) > 0 ) { return - 2 ; } return 0 ; }
org . junit . Assert . assertThat ( locomotive . getExitCode ( ) , org . hamcrest . CoreMatchers . is ( ( - 1 ) ) )
createSpringMvcPortlet ( ) { java . lang . String packageName = "test.spring.mvc.portlet.maven" ; wizardAction . openNewLiferayModuleWizard ( ) ; wizardAction . newModule . prepareMaven ( project . getName ( ) , com . liferay . ide . ui . portlet . tests . SPRING_MVC_PORTLET ) ; wizardAction . next ( ) ; wizardAction . newModuleInfo . preparePackageName ( packageName ) ; wizardAction . finish ( ) ; viewAction . project . openUpdateMavenProjectDialog ( com . liferay . ide . ui . portlet . tests . NewPortletModuleLiferayWorkspaceMavenTests . liferayWorkspace . getName ( ) ) ; dialogAction . updateMavenProject . selectAll ( ) ; dialogAction . confirm ( ) ; jobAction . waitForUpdateMavenProject ( ) ; java . lang . String [ ] projectNames = new java . lang . String [ ] { com . liferay . ide . ui . portlet . tests . NewPortletModuleLiferayWorkspaceMavenTests . liferayWorkspace . getName ( ) , com . liferay . ide . ui . portlet . tests . NewPortletModuleLiferayWorkspaceMavenTests . liferayWorkspace . getWarsDirName ( ) , project . getName ( ) } ; "<AssertPlaceHolder>" ; viewAction . project . closeAndDelete ( projectNames ) ; } visibleFileTry ( java . lang . String [ ] ) { try { return _getProjects ( ) . isVisible ( files ) ; } catch ( java . lang . Exception e ) { _getProjects ( ) . setFocus ( ) ; try { java . lang . String [ ] parents = java . util . Arrays . copyOfRange ( files , 0 , ( ( files . length ) - 1 ) ) ; _getProjects ( ) . expand ( parents ) ; _getProjects ( ) . contextMenu ( com . liferay . ide . ui . liferay . action . REFRESH , parents ) ; ide . sleep ( 2000 ) ; } catch ( java . lang . Exception e1 ) { } for ( int i = ( files . length ) - 1 ; i > 0 ; i -- ) { java . lang . String [ ] parents = java . util . Arrays . copyOfRange ( files , 0 , ( ( files . length ) - i ) ) ; org . eclipse . swtbot . swt . finder . widgets . SWTBotTreeItem parent = _getProjects ( ) . getTreeItem ( parents ) ; _getProjects ( ) . expand ( parents ) ; java . lang . String subnode = files [ ( ( files . length ) - i ) ] ; _jobAction . waitForSubnode ( parent , subnode , com . liferay . ide . ui . liferay . action . REFRESH ) ; } return _getProjects ( ) . isVisible ( files ) ; } }
org . junit . Assert . assertTrue ( viewAction . project . visibleFileTry ( projectNames ) )
testMultiplyExactLong ( ) { long [ ] specialValues = new long [ ] { Long . MIN_VALUE , ( Long . MIN_VALUE ) + 1 , ( Long . MIN_VALUE ) + 2 , Long . MAX_VALUE , ( Long . MAX_VALUE ) - 1 , ( Long . MAX_VALUE ) - 2 , - 10 , - 9 , - 8 , - 7 , - 6 , - 5 , - 4 , - 3 , - 2 , - 1 , 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , ( - 1 ) - ( ( Long . MIN_VALUE ) / 2 ) , 0 - ( ( Long . MIN_VALUE ) / 2 ) , 1 - ( ( Long . MIN_VALUE ) / 2 ) , ( - 1 ) + ( ( Long . MAX_VALUE ) / 2 ) , 0 + ( ( Long . MAX_VALUE ) / 2 ) , 1 + ( ( Long . MAX_VALUE ) / 2 ) } ; for ( long a : specialValues ) { for ( long b : specialValues ) { java . math . BigInteger bdA = java . math . BigInteger . valueOf ( a ) ; java . math . BigInteger bdB = java . math . BigInteger . valueOf ( b ) ; java . math . BigInteger bdMul = bdA . multiply ( bdB ) ; if ( ( ( bdMul . compareTo ( java . math . BigInteger . valueOf ( Long . MIN_VALUE ) ) ) < 0 ) || ( ( bdMul . compareTo ( java . math . BigInteger . valueOf ( Long . MAX_VALUE ) ) ) > 0 ) ) { try { org . hipparchus . util . FastMath . multiplyExact ( a , b ) ; org . junit . Assert . fail ( ( ( "an<sp>exception<sp>should<sp>have<sp>been<sp>thrown<sp>" + a ) + b ) ) ; } catch ( org . hipparchus . exception . MathRuntimeException mae ) { } } else { "<AssertPlaceHolder>" ; } } } } valueOf ( double , double ) { if ( ( java . lang . Double . isNaN ( realPart ) ) || ( java . lang . Double . isNaN ( imaginaryPart ) ) ) { return org . hipparchus . complex . Complex . NaN ; } return new org . hipparchus . complex . Complex ( realPart , imaginaryPart ) ; }
org . junit . Assert . assertEquals ( bdMul , java . math . BigInteger . valueOf ( org . hipparchus . util . FastMath . multiplyExact ( a , b ) ) )
whenNotAnnotatedOnStringParameter ( ) { class Customer { public void someAction ( @ org . apache . isis . applib . annotation . Parameter ( regexPattern = "[123].*" ) final int name ) { } } actionMethod = findMethod ( Customer . class , "someAction" , new java . lang . Class [ ] { int . class } ) ; final org . apache . isis . core . metamodel . facets . FacetFactory . ProcessParameterContext processParameterContext = new org . apache . isis . core . metamodel . facets . FacetFactory . ProcessParameterContext ( Customer . class , actionMethod , 0 , null , facetedMethodParameter ) ; facetFactory . processParams ( processParameterContext ) ; final org . apache . isis . core . metamodel . facets . objectvalue . regex . RegExFacet regExFacet = facetedMethodParameter . getFacet ( org . apache . isis . core . metamodel . facets . objectvalue . regex . RegExFacet . class ) ; "<AssertPlaceHolder>" ; } getFacet ( java . lang . Class ) { final org . apache . isis . core . metamodel . facetapi . FacetHolder facetHolder = getAction ( ) ; return facetHolder . getFacet ( facetType ) ; }
org . junit . Assert . assertNull ( regExFacet )
setFileTest ( ) { java . io . File file = org . sonar . plugins . delphi . utils . DelphiUtils . getResource ( org . sonar . plugins . delphi . project . DelphiProjectTest . XML_FILE ) ; project . setFile ( file ) ; "<AssertPlaceHolder>" ; } getXmlFile ( ) { return file ; }
org . junit . Assert . assertEquals ( file , project . getXmlFile ( ) )
testCreateValidationCommand_returnsComponentLayoutValidationCommand ( ) { org . apache . ambari . server . configuration . Configuration configuration = mock ( org . apache . ambari . server . configuration . Configuration . class ) ; when ( configuration . getRecommendationsArtifactsRolloverMax ( ) ) . thenReturn ( 100 ) ; org . apache . ambari . server . api . services . stackadvisor . StackAdvisorRunner saRunner = mock ( org . apache . ambari . server . api . services . stackadvisor . StackAdvisorRunner . class ) ; org . apache . ambari . server . api . services . AmbariMetaInfo metaInfo = mock ( org . apache . ambari . server . api . services . AmbariMetaInfo . class ) ; org . apache . ambari . server . state . ServiceInfo service = mock ( org . apache . ambari . server . state . ServiceInfo . class ) ; when ( metaInfo . getService ( org . mockito . Mockito . anyString ( ) , org . mockito . Mockito . anyString ( ) , org . mockito . Mockito . anyString ( ) ) ) . thenReturn ( service ) ; when ( service . getServiceAdvisorType ( ) ) . thenReturn ( ServiceInfo . ServiceAdvisorType . PYTHON ) ; org . apache . ambari . server . api . services . stackadvisor . StackAdvisorHelper helper = new org . apache . ambari . server . api . services . stackadvisor . StackAdvisorHelper ( configuration , saRunner , metaInfo , null , null ) ; org . apache . ambari . server . api . services . stackadvisor . StackAdvisorRequest . StackAdvisorRequestType requestType = org . apache . ambari . server . api . services . stackadvisor . StackAdvisorRequest . StackAdvisorRequestType . HOST_GROUPS ; org . apache . ambari . server . api . services . stackadvisor . StackAdvisorRequest request = org . apache . ambari . server . api . services . stackadvisor . StackAdvisorRequest . StackAdvisorRequestBuilder . forStack ( "stackName" , "stackVersion" ) . ofType ( requestType ) . build ( ) ; org . apache . ambari . server . api . services . stackadvisor . commands . StackAdvisorCommand < org . apache . ambari . server . api . services . stackadvisor . validations . ValidationResponse > command = helper . createValidationCommand ( "ZOOKEEPER" , request ) ; "<AssertPlaceHolder>" ; } createValidationCommand ( java . lang . String , org . apache . ambari . server . api . services . stackadvisor . StackAdvisorRequest ) { org . apache . ambari . server . api . services . stackadvisor . StackAdvisorRequest . StackAdvisorRequestType requestType = request . getRequestType ( ) ; org . apache . ambari . server . state . ServiceInfo . ServiceAdvisorType serviceAdvisorType = getServiceAdvisorType ( request . getStackName ( ) , request . getStackVersion ( ) , serviceName ) ; org . apache . ambari . server . api . services . stackadvisor . commands . StackAdvisorCommand < org . apache . ambari . server . api . services . stackadvisor . validations . ValidationResponse > command ; if ( requestType == ( org . apache . ambari . server . api . services . stackadvisor . StackAdvisorRequest . StackAdvisorRequestType . HOST_GROUPS ) ) { command = new org . apache . ambari . server . api . services . stackadvisor . commands . ComponentLayoutValidationCommand ( recommendationsDir , recommendationsArtifactsLifetime , serviceAdvisorType , requestId , saRunner , metaInfo , ambariServerConfigurationHandler ) ; } else if ( requestType == ( org . apache . ambari . server . api . services . stackadvisor . StackAdvisorRequest . StackAdvisorRequestType . CONFIGURATIONS ) ) { command = new org . apache . ambari . server . api . services . stackadvisor . commands . ConfigurationValidationCommand ( recommendationsDir , recommendationsArtifactsLifetime , serviceAdvisorType , requestId , saRunner , metaInfo , ambariServerConfigurationHandler ) ; } else { throw new org . apache . ambari . server . api . services . stackadvisor . StackAdvisorRequestException ( java . lang . String . format ( "Unsupported<sp>request<sp>type,<sp>type=%s" , requestType ) ) ; } return command ; }
org . junit . Assert . assertEquals ( org . apache . ambari . server . api . services . stackadvisor . commands . ComponentLayoutValidationCommand . class , command . getClass ( ) )
getRedenEindeRelatieTestOK ( ) { final char rerCode = 'N' ; final nl . bzk . algemeenbrp . dal . domein . brp . entity . RedenBeeindigingRelatie expectedRer = new nl . bzk . algemeenbrp . dal . domein . brp . entity . RedenBeeindigingRelatie ( rerCode , "Nietigverklaring" ) ; expectedRer . setCode ( rerCode ) ; expectedRer . setOmschrijving ( "Nietigverklaring" ) ; final java . lang . String expected = java . lang . String . format ( nl . bzk . migratiebrp . ggo . viewer . service . impl . BrpStamtabelServiceTest . STRING_FORMAT , expectedRer . getCode ( ) , expectedRer . getOmschrijving ( ) ) ; org . mockito . Mockito . doReturn ( expectedRer ) . when ( dynamischeStamtabelRepository ) . getRedenBeeindigingRelatieByCode ( rerCode ) ; final java . lang . String resultRer = brpStamtabelService . getRedenEindeRelatie ( java . lang . String . valueOf ( rerCode ) ) ; "<AssertPlaceHolder>" ; } valueOf ( int ) { final nl . bzk . brp . domain . expressie . Datumdeel datumdeel = new nl . bzk . brp . domain . expressie . Datumdeel ( ) ; datumdeel . waarde = waarde ; datumdeel . type = nl . bzk . brp . domain . expressie . Datumdeel . Type . WAARDE ; return datumdeel ; }
org . junit . Assert . assertEquals ( expected , resultRer )
when_setProperties_thenReturnsProperties ( ) { com . hazelcast . jet . config . JetConfig jetConfig = new com . hazelcast . jet . config . JetConfig ( ) ; java . util . Properties properties = new java . util . Properties ( ) ; jetConfig . setProperties ( properties ) ; "<AssertPlaceHolder>" ; } getProperties ( ) { return properties ; }
org . junit . Assert . assertEquals ( properties , jetConfig . getProperties ( ) )
testAnimalBirthTooLate ( ) { org . eclipse . emf . ecore . EObject generic = testFactory . create ( animal ) ; generic . eSet ( birthYear , 2600 ) ; "<AssertPlaceHolder>" ; } validateConstraints ( org . eclipse . emf . ecore . EObject ) { final org . eclipse . core . runtime . IStatus status = gov . nasa . ensemble . core . plan . formula . js . TestJSAnnotationConstraint . batchValidator . validate ( target ) ; return status . isOK ( ) ; }
org . junit . Assert . assertFalse ( validateConstraints ( generic ) )
isParallelProvisioning_NotSet ( ) { configSettings = new java . util . HashMap ( ) ; propertyHandler = new org . oscm . app . iaas . PropertyHandler ( settings ) ; "<AssertPlaceHolder>" ; } isParallelProvisioningEnabled ( ) { java . lang . String enabled = getValue ( org . oscm . app . iaas . PropertyHandler . ENABLE_PARALLEL_PROVISIONING , settings . getConfigSettings ( ) ) ; if ( enabled == null ) { return true ; } return java . lang . Boolean . parseBoolean ( enabled ) ; }
org . junit . Assert . assertTrue ( propertyHandler . isParallelProvisioningEnabled ( ) )
testExpandDims2d ( ) { lombok . val origShape = new long [ ] { 3 , 4 } ; for ( int i = 0 ; i < 3 ; i ++ ) { for ( org . nd4j . linalg . primitives . Pair < org . nd4j . linalg . api . ndarray . INDArray , java . lang . String > p : org . nd4j . linalg . checkutil . NDArrayCreationUtil . getAllTestMatricesWithShape ( origShape [ 0 ] , origShape [ 1 ] , 12345 , DataType . FLOAT ) ) { org . nd4j . linalg . api . ndarray . INDArray inArr = p . getFirst ( ) . muli ( 100 ) ; org . nd4j . autodiff . samediff . SameDiff sd = org . nd4j . autodiff . samediff . SameDiff . create ( ) ; org . nd4j . autodiff . samediff . SDVariable in = sd . var ( "in" , inArr ) ; org . nd4j . autodiff . samediff . SDVariable expand = sd . f ( ) . expandDims ( in , i ) ; org . nd4j . linalg . api . ndarray . INDArray out = sd . execAndEndResult ( ) ; org . nd4j . linalg . api . ndarray . INDArray expOut ; switch ( i ) { case 0 : expOut = inArr . dup ( 'c' ) . reshape ( 'c' , 1 , origShape [ 0 ] , origShape [ 1 ] ) ; break ; case 1 : expOut = inArr . dup ( 'c' ) . reshape ( 'c' , origShape [ 0 ] , 1 , origShape [ 1 ] ) ; break ; case 2 : expOut = inArr . dup ( 'c' ) . reshape ( 'c' , origShape [ 0 ] , origShape [ 1 ] , 1 ) ; break ; default : throw new java . lang . RuntimeException ( ) ; } java . lang . String msg = ( ( "expandDim=" + i ) + ",<sp>source=" ) + ( p . getSecond ( ) ) ; "<AssertPlaceHolder>" ; } } } getSecond ( ) { return second ; }
org . junit . Assert . assertEquals ( msg , out , expOut )
testHasPrintService ( ) { com . eclipsesource . tabris . TabrisClient client = new com . eclipsesource . tabris . internal . TabrisClientImpl ( ) ; com . eclipsesource . tabris . print . Printer print = client . getService ( com . eclipsesource . tabris . print . Printer . class ) ; "<AssertPlaceHolder>" ; } getService ( java . lang . Class ) { T result = null ; if ( type == ( com . eclipsesource . tabris . interaction . AppLauncher . class ) ) { result = ( ( T ) ( getSessionInstance ( com . eclipsesource . tabris . internal . AppLauncherImpl . class ) ) ) ; } else if ( type == ( com . eclipsesource . tabris . app . App . class ) ) { result = ( ( T ) ( getSessionInstance ( com . eclipsesource . tabris . internal . AppImpl . class ) ) ) ; } else if ( type == ( com . eclipsesource . tabris . ClientStore . class ) ) { result = ( ( T ) ( getSessionInstance ( com . eclipsesource . tabris . internal . ClientStoreImpl . class ) ) ) ; } else if ( ( type == ( com . eclipsesource . tabris . device . ClientDevice . class ) ) || ( type == ( org . eclipse . rap . rwt . client . service . ClientInfo . class ) ) ) { result = ( ( T ) ( getSessionInstance ( com . eclipsesource . tabris . internal . ClientDeviceImpl . class ) ) ) ; } else if ( type == ( com . eclipsesource . tabris . push . CloudPush . class ) ) { result = ( ( T ) ( getSessionInstance ( com . eclipsesource . tabris . internal . CloudPushImpl . class ) ) ) ; } else if ( type == ( com . eclipsesource . tabris . camera . Camera . class ) ) { result = ( ( T ) ( getSessionInstance ( com . eclipsesource . tabris . internal . CameraImpl . class ) ) ) ; } else if ( type == ( com . eclipsesource . tabris . camera . PhotoAlbum . class ) ) { result = ( ( T ) ( getSessionInstance ( com . eclipsesource . tabris . internal . PhotoAlbumImpl . class ) ) ) ; } else if ( type == ( com . eclipsesource . tabris . geolocation . Geolocation . class ) ) { result = ( ( T ) ( getSessionInstance ( com . eclipsesource . tabris . internal . GeolocationImpl . class ) ) ) ; } else if ( type == ( com . eclipsesource . tabris . print . Printer . class ) ) { result = ( ( T ) ( getSessionInstance ( com . eclipsesource . tabris . internal . PrinterImpl . class ) ) ) ; } else if ( type == ( org . eclipse . rap . rwt . client . service . StartupParameters . class ) ) { result = ( ( T ) ( getSessionInstance ( org . eclipse . rap . rwt . internal . client . StartupParametersImpl . class ) ) ) ; } return result ; }
org . junit . Assert . assertNotNull ( print )
testWhereIn2200 ( ) { superHeroDataBase . populateSuperHero ( storeManager , 4500 ) ; try ( final io . vertigo . commons . transaction . VTransactionWritable transaction = transactionManager . createCurrentTransaction ( ) ) { final io . vertigo . dynamo . task . metamodel . TaskDefinition taskDefinition = registerTaskList ( "TK_WHERE_ID_TEST" , "select<sp>*<sp>from<sp>SUPER_HERO<sp>where<sp>ID<sp>in<sp>(#DTC_SUPER_HERO_IN.ROWNUM.ID#)" ) ; final io . vertigo . dynamo . domain . model . DtList < io . vertigo . dynamo . task . data . domain . SuperHero > ids = new io . vertigo . dynamo . domain . model . DtList ( io . vertigo . dynamo . task . data . domain . SuperHero . class ) ; for ( int i = 0 ; i < 2200 ; i ++ ) { ids . add ( io . vertigo . dynamo . task . x . TaskEngineSelectDynamicTest . createSuperHero ( ( 10001L + ( 2 * i ) ) ) ) ; } final io . vertigo . dynamo . task . model . Task task = io . vertigo . dynamo . task . model . Task . builder ( taskDefinition ) . addValue ( io . vertigo . dynamo . task . x . TaskEngineSelectDynamicTest . DTC_SUPER_HERO_IN , ids ) . build ( ) ; final io . vertigo . dynamo . domain . model . DtList < io . vertigo . dynamo . task . data . domain . SuperHero > resultList = taskManager . execute ( task ) . getResult ( ) ; "<AssertPlaceHolder>" ; } } size ( ) { return lines . size ( ) ; }
org . junit . Assert . assertEquals ( 2200 , resultList . size ( ) )
testEvaluatePropertyInPropertyOnConsumedResource ( ) { java . util . Map < java . lang . String , ch . puzzle . itc . mobiliar . business . property . entity . FreeMarkerProperty > thisProperties = com . google . common . collect . Maps . newHashMap ( ) ; thisProperties . put ( "foo" , new ch . puzzle . itc . mobiliar . business . property . entity . FreeMarkerProperty ( "val1" , "foo" ) ) ; thisProperties . put ( "bar" , new ch . puzzle . itc . mobiliar . business . property . entity . FreeMarkerProperty ( "${foo}" , "bar" ) ) ; ch . puzzle . itc . mobiliar . business . property . entity . AmwResourceTemplateModel consumedResourceModel = new ch . puzzle . itc . mobiliar . business . property . entity . AmwResourceTemplateModel ( ) ; consumedResourceModel . setProperties ( thisProperties ) ; ch . puzzle . itc . mobiliar . business . template . entity . TemplateDescriptorEntity templateDescriptorEntity = createTemplate ( "${conResource.bar}" ) ; ch . puzzle . itc . mobiliar . business . property . entity . AmwResourceTemplateModel resourceModel = new ch . puzzle . itc . mobiliar . business . property . entity . AmwResourceTemplateModel ( ) ; java . util . Map < java . lang . String , ch . puzzle . itc . mobiliar . business . property . entity . AmwResourceTemplateModel > consumedResource = new java . util . LinkedHashMap ( ) ; consumedResource . put ( "conResource" , consumedResourceModel ) ; java . util . Map < java . lang . String , java . util . Map < java . lang . String , ch . puzzle . itc . mobiliar . business . property . entity . AmwResourceTemplateModel > > consumedResTypes = new java . util . LinkedHashMap ( ) ; consumedResTypes . put ( "ConType" , consumedResource ) ; resourceModel . setConsumedResTypes ( consumedResTypes ) ; ch . puzzle . itc . mobiliar . business . property . entity . AmwTemplateModel model = new ch . puzzle . itc . mobiliar . business . property . entity . AmwTemplateModel ( ) ; model . setAmwModelPreprocessExceptionHandler ( new ch . puzzle . itc . mobiliar . business . generator . control . AmwModelPreprocessExceptionHandler ( ) ) ; model . setUnitResourceTemplateModel ( resourceModel ) ; resourceModel . preProcess ( model ) ; java . lang . String result = renderTemplate ( templateDescriptorEntity , resourceModel ) ; "<AssertPlaceHolder>" ; } renderTemplate ( ch . puzzle . itc . mobiliar . business . template . entity . TemplateDescriptorEntity , java . lang . Object ) { ch . puzzle . itc . mobiliar . business . generator . control . AMWTemplateExceptionHandler handler = new ch . puzzle . itc . mobiliar . business . generator . control . AMWTemplateExceptionHandler ( ) ; freemarker . template . Configuration cfg = ch . puzzle . itc . mobiliar . business . generator . control . extracted . templates . BaseTemplateProcessor . getConfiguration ( handler ) ; freemarker . cache . StringTemplateLoader loader = new freemarker . cache . StringTemplateLoader ( ) ; loader . putTemplate ( template . getName ( ) , template . getFileContent ( ) ) ; cfg . setTemplateLoader ( loader ) ; java . lang . String result = null ; java . io . Writer fileContentWriter = new java . io . StringWriter ( ) ; freemarker . template . Template fileContentTemplate = cfg . getTemplate ( template . getName ( ) ) ; fileContentTemplate . process ( model , fileContentWriter ) ; fileContentWriter . flush ( ) ; result = fileContentWriter . toString ( ) ; cfg . clearTemplateCache ( ) ; return result ; }
org . junit . Assert . assertEquals ( "val1" , result )
test17 ( ) { "<AssertPlaceHolder>" ; } getByCode ( java . lang . String ) { return com . neovisionaries . i18n . CountryCode . getByCode ( code , true ) ; }
org . junit . Assert . assertNull ( com . neovisionaries . i18n . CountryCode . getByCode ( null ) )
testShowJob ( ) { org . apache . hadoop . yarn . submarine . common . MockClientContext mockClientContext = new org . apache . hadoop . yarn . submarine . common . MockClientContext ( ) ; org . apache . hadoop . yarn . submarine . client . cli . ShowJobCli showJobCli = new org . apache . hadoop . yarn . submarine . client . cli . ShowJobCli ( mockClientContext ) { @ org . apache . hadoop . yarn . submarine . client . cli . Override protected void getAndPrintJobInfo ( ) { } } ; showJobCli . run ( new java . lang . String [ ] { "--name" , "my-job" } ) ; org . apache . hadoop . yarn . submarine . client . cli . param . ShowJobParameters parameters = showJobCli . getParameters ( ) ; "<AssertPlaceHolder>" ; } getName ( ) { return name ; }
org . junit . Assert . assertEquals ( parameters . getName ( ) , "my-job" )
testFindComplexTypeInSchema ( ) { java . lang . String namespaceURI = URI_NS_SAML20P ; java . lang . String elementTypeLocalName = "ResponseType" ; wsattacker . library . schemaanalyzer . SchemaAnalyzerImpl instance = new wsattacker . library . schemaanalyzer . SchemaAnalyzerImpl ( ) ; instance . appendSchema ( wsattacker . library . schemaanalyzer . SchemaAnalyzerTest . DOC_SAML20 ) ; instance . appendSchema ( wsattacker . library . schemaanalyzer . SchemaAnalyzerTest . DOC_SAML20P ) ; org . w3c . dom . Element expResult = ( ( org . w3c . dom . Element ) ( wsattacker . library . xmlutilities . dom . DomUtilities . evaluateXPath ( wsattacker . library . schemaanalyzer . SchemaAnalyzerTest . DOC_SAML20P , "/*[local-name()='schema']/*[local-name()='complexType'<sp>and<sp>@name='ResponseType']" ) . get ( 0 ) ) ) ; org . w3c . dom . Element result = instance . findComplexTypeInSchema ( namespaceURI , elementTypeLocalName ) ; "<AssertPlaceHolder>" ; } findComplexTypeInSchema ( java . lang . String , java . lang . String ) { return findXInSchema ( "complexType" , namespaceURI , elementTypeLocalName ) ; }
org . junit . Assert . assertEquals ( expResult , result )
shouldCreateGroupedCorrectlyWhenOptimationsEnabled ( ) { final io . confluent . ksql . util . KsqlConfig ksqlConfig = new io . confluent . ksql . util . KsqlConfig ( com . google . common . collect . ImmutableMap . of ( KsqlConfig . KSQL_USE_NAMED_INTERNAL_TOPICS , KsqlConfig . KSQL_USE_NAMED_INTERNAL_TOPICS_ON ) ) ; when ( grouper . groupedWith ( io . confluent . ksql . streams . GroupedFactoryTest . OP_NAME , keySerde , rowSerde ) ) . thenReturn ( grouped ) ; final org . apache . kafka . streams . kstream . Grouped returned = io . confluent . ksql . streams . GroupedFactory . create ( ksqlConfig , grouper ) . create ( io . confluent . ksql . streams . GroupedFactoryTest . OP_NAME , keySerde , rowSerde ) ; "<AssertPlaceHolder>" ; verify ( grouper ) . groupedWith ( io . confluent . ksql . streams . GroupedFactoryTest . OP_NAME , keySerde , rowSerde ) ; } create ( io . confluent . ksql . rest . client . KsqlRestClient , io . confluent . ksql . util . Event ) { return new io . confluent . ksql . cli . console . cmd . RemoteServerSpecificCommand ( restClient , resetCliForNewServer ) ; }
org . junit . Assert . assertThat ( returned , org . hamcrest . Matchers . is ( grouped ) )
listScheduleEventsForAnUnexistingContributor ( ) { java . lang . String contributorId = "100" ; java . util . Set < com . silverpeas . scheduleevent . service . model . beans . ScheduleEvent > events = scheduleEventDao . listScheduleEventsByContributorId ( contributorId ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return ( this . size ( ) ) == 0 ; }
org . junit . Assert . assertThat ( events . isEmpty ( ) , org . hamcrest . Matchers . is ( true ) )
setsTrackOnV1TagOnly ( ) { com . mpatric . mp3agic . ID3v1 id3v1Tag = new com . mpatric . mp3agic . ID3WrapperTest . ID3v1TagForTesting ( ) ; com . mpatric . mp3agic . ID3Wrapper wrapper = new com . mpatric . mp3agic . ID3Wrapper ( id3v1Tag , null ) ; wrapper . setTrack ( "a<sp>track" ) ; "<AssertPlaceHolder>" ; } getTrack ( ) { if ( ( ( ( id3v2Tag ) != null ) && ( ( id3v2Tag . getTrack ( ) ) != null ) ) && ( ( id3v2Tag . getTrack ( ) . length ( ) ) > 0 ) ) { return id3v2Tag . getTrack ( ) ; } else if ( ( id3v1Tag ) != null ) { return id3v1Tag . getTrack ( ) ; } else { return null ; } }
org . junit . Assert . assertEquals ( "a<sp>track" , id3v1Tag . getTrack ( ) )
endToEndTest ( ) { io . teknek . nibiru . client . RpcClient rpcClient = new io . teknek . nibiru . client . RpcClient ( "127.0.0.1" , server . getConfiguration ( ) . getTransportPort ( ) , 10000 , 10000 ) ; org . codehaus . jackson . type . TypeReference < io . teknek . nibiru . transport . rpc . BlockingRpcResponse < java . lang . Integer > > t = new org . codehaus . jackson . type . TypeReference < io . teknek . nibiru . transport . rpc . BlockingRpcResponse < java . lang . Integer > > ( ) { } ; io . teknek . nibiru . transport . rpc . BlockingRpcResponse < java . lang . Integer > resp = rpcClient . blockingRpc ( simpleCallable ( ) , 10000 , TimeUnit . MILLISECONDS , t ) ; "<AssertPlaceHolder>" ; } getRpcResult ( ) { return rpcResult ; }
org . junit . Assert . assertEquals ( new java . lang . Integer ( 5 ) , resp . getRpcResult ( ) )
testStartOrResumeMultipartUploadForceRestartFalse ( ) { forceRestart = Boolean . FALSE ; org . sagebionetworks . repo . model . file . MultipartUploadStatus status = manager . startOrResumeMultipartUpload ( userInfo , request , forceRestart ) ; "<AssertPlaceHolder>" ; verify ( mockMultiparUploadDAO , never ( ) ) . deleteUploadStatus ( anyLong ( ) , anyString ( ) ) ; } startOrResumeMultipartUpload ( org . sagebionetworks . repo . model . UserInfo , org . sagebionetworks . repo . model . file . MultipartUploadRequest , java . lang . Boolean ) { org . sagebionetworks . util . ValidateArgument . required ( user , "UserInfo" ) ; org . sagebionetworks . util . ValidateArgument . required ( user . getId ( ) , "UserInfo.getId" ) ; org . sagebionetworks . util . ValidateArgument . required ( request , "MultipartUploadRequest" ) ; org . sagebionetworks . util . ValidateArgument . required ( request . getFileName ( ) , "MultipartUploadRequest.fileName" ) ; org . sagebionetworks . util . ValidateArgument . required ( request . getFileSizeBytes ( ) , "MultipartUploadRequest.fileSizeBytes" ) ; org . sagebionetworks . util . ValidateArgument . required ( request . getPartSizeBytes ( ) , "MultipartUploadRequest.PartSizeBytes" ) ; org . sagebionetworks . util . ValidateArgument . required ( request . getContentMD5Hex ( ) , "MultipartUploadRequest.MD5Hex" ) ; if ( org . sagebionetworks . repo . model . AuthorizationUtils . isUserAnonymous ( user ) ) { throw new org . sagebionetworks . repo . model . UnauthorizedException ( "Anonymous<sp>cannot<sp>upload<sp>files." ) ; } java . lang . String requestMD5Hex = org . sagebionetworks . repo . manager . file . MultipartManagerV2Impl . calculateMD5AsHex ( request ) ; if ( ( forceRestart != null ) && ( forceRestart . booleanValue ( ) ) ) { multipartUploadDAO . deleteUploadStatus ( user . getId ( ) , requestMD5Hex ) ; } org . sagebionetworks . repo . model . dbo . file . CompositeMultipartUploadStatus status = multipartUploadDAO . getUploadStatus ( user . getId ( ) , requestMD5Hex ) ; if ( status == null ) { status = createNewMultipartUpload ( user , request , requestMD5Hex ) ; } java . lang . String partsState = setupPartState ( status ) ; status . getMultipartUploadStatus ( ) . setPartsState ( partsState ) ; return status . getMultipartUploadStatus ( ) ; }
org . junit . Assert . assertNotNull ( status )
testConflictResolution ( ) { final org . tmatesoft . svn . test . TestOptions options = org . tmatesoft . svn . test . TestOptions . getInstance ( ) ; final org . tmatesoft . svn . test . SvnOperationFactory svnOperationFactory = new org . tmatesoft . svn . test . SvnOperationFactory ( ) ; final org . tmatesoft . svn . test . Sandbox sandbox = org . tmatesoft . svn . test . Sandbox . createWithCleanup ( ( ( getTestName ( ) ) + ".testConflictResolution" ) , options ) ; try { final org . tmatesoft . svn . test . SVNURL url = sandbox . createSvnRepository ( ) ; final org . tmatesoft . svn . test . CommitBuilder commitBuilder1 = new org . tmatesoft . svn . test . CommitBuilder ( url ) ; commitBuilder1 . addFile ( "file" , "base" . getBytes ( ) ) ; org . tmatesoft . svn . test . SVNCommitInfo commitInfo1 = commitBuilder1 . commit ( ) ; final org . tmatesoft . svn . test . CommitBuilder commitBuilder2 = new org . tmatesoft . svn . test . CommitBuilder ( url ) ; commitBuilder2 . changeFile ( "file" , "theirs" . getBytes ( ) ) ; commitBuilder2 . commit ( ) ; final org . tmatesoft . svn . test . WorkingCopy workingCopy = sandbox . checkoutNewWorkingCopy ( url , commitInfo1 . getNewRevision ( ) ) ; final java . io . File workingCopyDirectory = workingCopy . getWorkingCopyDirectory ( ) ; final java . io . File file = new java . io . File ( workingCopyDirectory , "file" ) ; org . tmatesoft . svn . test . TestUtil . writeFileContentsString ( file , "mine" ) ; final org . tmatesoft . svn . test . SvnUpdate update = svnOperationFactory . createUpdate ( ) ; update . setSingleTarget ( org . tmatesoft . svn . test . SvnTarget . fromFile ( workingCopyDirectory ) ) ; update . run ( ) ; runResolve ( svnOperationFactory , file , SVNConflictChoice . MINE_CONFLICT ) ; final java . lang . String fileContentsString = org . tmatesoft . svn . test . TestUtil . readFileContentsString ( file ) ; "<AssertPlaceHolder>" ; } finally { svnOperationFactory . dispose ( ) ; sandbox . dispose ( ) ; } } readFileContentsString ( org . tmatesoft . svn . test . File ) { org . tmatesoft . svn . test . FileInputStream fileInputStream = null ; org . tmatesoft . svn . test . BufferedInputStream bufferedInputStream = null ; org . tmatesoft . svn . test . ByteArrayOutputStream byteArrayOutputStream = new org . tmatesoft . svn . test . ByteArrayOutputStream ( ) ; byte [ ] buffer = new byte [ 1024 ] ; try { fileInputStream = new org . tmatesoft . svn . test . FileInputStream ( file ) ; bufferedInputStream = new org . tmatesoft . svn . test . BufferedInputStream ( fileInputStream ) ; while ( true ) { final int bytesRead = bufferedInputStream . read ( buffer ) ; if ( bytesRead < 0 ) { break ; } byteArrayOutputStream . write ( buffer , 0 , bytesRead ) ; } return new java . lang . String ( byteArrayOutputStream . toByteArray ( ) ) ; } finally { org . tmatesoft . svn . core . internal . wc . SVNFileUtil . closeFile ( bufferedInputStream ) ; org . tmatesoft . svn . core . internal . wc . SVNFileUtil . closeFile ( fileInputStream ) ; } }
org . junit . Assert . assertEquals ( "mine" , fileContentsString )
testFormURLDecode_1 ( ) { java . lang . String string = "" ; java . lang . String result = org . jinstagram . http . URLUtils . formURLDecode ( string ) ; "<AssertPlaceHolder>" ; } formURLDecode ( java . lang . String ) { org . jinstagram . utils . Preconditions . checkNotNull ( string , "Cannot<sp>decode<sp>null<sp>string" ) ; try { return java . net . URLDecoder . decode ( string , org . jinstagram . http . URLUtils . UTF_8 ) ; } catch ( java . io . UnsupportedEncodingException uee ) { throw new java . lang . IllegalStateException ( org . jinstagram . http . URLUtils . ERROR_MSG , uee ) ; } }
org . junit . Assert . assertEquals ( "" , result )
collectCharParallel ( ) { org . eclipse . collections . api . list . primitive . CharList expected = org . eclipse . collections . impl . collector . Collectors2AdditionalTest . LARGE_INTERVAL . collectChar ( ( each ) -> ( ( char ) ( each % Character . MAX_VALUE ) ) , CharLists . mutable . empty ( ) ) ; org . eclipse . collections . api . list . primitive . CharList actual = this . bigData . parallelStream ( ) . collect ( org . eclipse . collections . impl . collector . Collectors2 . collectChar ( ( each ) -> ( ( char ) ( each % Character . MAX_VALUE ) ) , org . eclipse . collections . impl . factory . primitive . CharLists . mutable :: empty ) ) ; "<AssertPlaceHolder>" ; } collectChar ( org . eclipse . collections . api . block . function . primitive . CharFunction , java . util . function . Supplier ) { return java . util . stream . Collector . of ( supplier , ( collection , each ) -> collection . add ( function . charValueOf ( each ) ) , ( collection1 , collection2 ) -> { collection1 . addAll ( collection2 ) ; return collection1 ; } , org . eclipse . collections . impl . collector . Collectors2 . EMPTY_CHARACTERISTICS ) ; }
org . junit . Assert . assertEquals ( expected , actual )
equalsTest ( ) { org . openscience . cdk . group . Partition p = new org . openscience . cdk . group . Partition ( new int [ ] [ ] { new int [ ] { 0 } , new int [ ] { 1 } } ) ; org . openscience . cdk . group . Partition o = new org . openscience . cdk . group . Partition ( new int [ ] [ ] { new int [ ] { 0 } , new int [ ] { 1 } } ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( p , o )
getAdapter_Add ( ) { org . oscm . apiversioning . enums . ModificationType type = org . oscm . apiversioning . enums . ModificationType . ADD ; org . oscm . apiversioning . adapter . IAdapter result = org . oscm . apiversioning . adapter . AdapterFactory . getAdapter ( type ) ; "<AssertPlaceHolder>" ; } getAdapter ( org . oscm . apiversioning . enums . ModificationType ) { if ( ModificationType . ADD . equals ( type ) ) { return new org . oscm . apiversioning . adapter . AddAdapter ( ) ; } else if ( ModificationType . REMOVE . equals ( type ) ) { return new org . oscm . apiversioning . adapter . RemoveAdapter ( ) ; } else if ( ModificationType . ADDEXCEPTION . equals ( type ) ) { return new org . oscm . apiversioning . adapter . ExceptionAdapter ( ) ; } else if ( ModificationType . UPDATE . equals ( type ) ) { return new org . oscm . apiversioning . adapter . UpdateAdapter ( ) ; } else if ( ModificationType . UPDATEFIELD . equals ( type ) ) { return new org . oscm . apiversioning . adapter . UpdateFieldAdapter ( ) ; } else { throw new java . lang . RuntimeException ( "No<sp>adapter<sp>is<sp>found" ) ; } }
org . junit . Assert . assertTrue ( ( result instanceof org . oscm . apiversioning . adapter . AddAdapter ) )
testInsertStringField_Null ( ) { com . jmethods . catatumbo . entities . StringField entity = new com . jmethods . catatumbo . entities . StringField ( ) ; entity = com . jmethods . catatumbo . EntityManagerTest . em . insert ( entity ) ; entity = com . jmethods . catatumbo . EntityManagerTest . em . load ( com . jmethods . catatumbo . entities . StringField . class , entity . getId ( ) ) ; "<AssertPlaceHolder>" ; } getId ( ) { return id ; }
org . junit . Assert . assertTrue ( ( ( ( entity . getId ( ) ) > 0 ) && ( ( entity . getName ( ) ) == null ) ) )
successSecondThenFirstAlreadyFailed ( ) { initReg . remove ( ) ; initPair ( jetbrains . jetpad . base . Asyncs . < java . lang . Integer > failure ( new java . lang . Throwable ( ) ) , second ) ; second . success ( "a" ) ; "<AssertPlaceHolder>" ; } success ( ItemT ) { if ( alreadyHandled ( ) ) { throw new java . lang . IllegalStateException ( "Async<sp>already<sp>completed" ) ; } mySuccessItem = item ; mySucceeded = true ; for ( jetbrains . jetpad . base . function . Consumer < ? super ItemT > handler : mySuccessHandlers ) { try { handler . accept ( item ) ; } catch ( java . lang . Exception e ) { jetbrains . jetpad . base . ThrowableHandlers . handle ( e ) ; } } clearHandlers ( ) ; }
org . junit . Assert . assertNotNull ( error )
decode ( ) { final java . io . ByteArrayInputStream stream = new java . io . ByteArrayInputStream ( encoded ) ; final com . flagstone . transform . coder . SWFDecoder decoder = new com . flagstone . transform . coder . SWFDecoder ( stream ) ; final com . flagstone . transform . coder . Context context = new com . flagstone . transform . coder . Context ( ) ; fixture = new com . flagstone . transform . shape . DefineMorphShape ( decoder , context ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertNotNull ( fixture )
testLexerTwoRules ( ) { org . antlr . v4 . tool . LexerGrammar lg = new org . antlr . v4 . tool . LexerGrammar ( ( "mode<sp>0:0\n" 6 + ( "A<sp>:<sp>\'a\'<sp>;\n" + "mode<sp>0:0\n" 1 ) ) ) ; java . lang . String expecting = "max<sp>type<sp>2\n" + ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "mode<sp>0:0\n" 7 + "1:RULE_START<sp>0\n" ) + "2:RULE_STOP<sp>0\n" ) + "3:RULE_START<sp>1\n" ) + "mode<sp>0:0\n" 0 ) + "1:RULE_START<sp>0\n" 0 ) + "1:RULE_START<sp>0\n" 3 ) + "mode<sp>0:0\n" 4 ) + "8:BASIC<sp>1\n" ) + "rule<sp>0:1<sp>1\n" ) + "mode<sp>0:0\n" 9 ) + "mode<sp>0:0\n" ) + "mode<sp>0:0\n" 8 ) + "mode<sp>0:0\n" 2 ) + "1:RULE_START<sp>0\n" 4 ) + "1:RULE_START<sp>0\n" 1 ) + "5->6<sp>ATOM<sp>97,0,0\n" ) + "6->2<sp>EPSILON<sp>0,0,0\n" ) + "mode<sp>0:0\n" 5 ) + "1:RULE_START<sp>0\n" 2 ) + "mode<sp>0:0\n" 3 ) ; org . antlr . v4 . runtime . atn . ATN atn = createATN ( lg , true ) ; java . lang . String result = org . antlr . v4 . runtime . atn . ATNSerializer . getDecoded ( atn , java . util . Arrays . asList ( lg . getTokenNames ( ) ) ) ; "<AssertPlaceHolder>" ; } getTokenNames ( ) { int numTokens = getMaxTokenType ( ) ; java . lang . String [ ] tokenNames = new java . lang . String [ numTokens + 1 ] ; for ( int i = 0 ; i < ( tokenNames . length ) ; i ++ ) { tokenNames [ i ] = getTokenName ( i ) ; } return tokenNames ; }
org . junit . Assert . assertEquals ( expecting , result )
testListAll ( ) { com . shippo . model . CustomsItemCollection objectCollection = com . shippo . model . CustomsItem . all ( null ) ; "<AssertPlaceHolder>" ; } getData ( ) { return results ; }
org . junit . Assert . assertNotNull ( objectCollection . getData ( ) )
testGradientLRNSimple ( ) { org . nd4j . linalg . factory . Nd4j . getRandom ( ) . setSeed ( 12345 ) ; int minibatch = 10 ; int depth = 6 ; int hw = 5 ; int nOut = 4 ; org . nd4j . linalg . api . ndarray . INDArray input = org . nd4j . linalg . factory . Nd4j . rand ( new int [ ] { minibatch , depth , hw , hw } ) ; org . nd4j . linalg . api . ndarray . INDArray labels = org . nd4j . linalg . factory . Nd4j . zeros ( minibatch , nOut ) ; java . util . Random r = new java . util . Random ( 12345 ) ; for ( int i = 0 ; i < minibatch ; i ++ ) { labels . putScalar ( i , r . nextInt ( nOut ) , 1.0 ) ; } org . deeplearning4j . nn . conf . MultiLayerConfiguration . Builder builder = new org . deeplearning4j . nn . conf . NeuralNetConfiguration . Builder ( ) . updater ( new org . nd4j . linalg . learning . config . NoOp ( ) ) . seed ( 12345L ) . dist ( new org . deeplearning4j . nn . conf . distribution . NormalDistribution ( 0 , 2 ) ) . list ( ) . layer ( 0 , new org . deeplearning4j . nn . conf . layers . ConvolutionLayer . Builder ( ) . nOut ( 6 ) . kernelSize ( 2 , 2 ) . stride ( 1 , 1 ) . activation ( Activation . TANH ) . build ( ) ) . layer ( 1 , new org . deeplearning4j . nn . conf . layers . LocalResponseNormalization . Builder ( ) . build ( ) ) . layer ( 2 , new org . deeplearning4j . nn . conf . layers . OutputLayer . Builder ( LossFunctions . LossFunction . MCXENT ) . activation ( Activation . SOFTMAX ) . nOut ( nOut ) . build ( ) ) . setInputType ( org . deeplearning4j . nn . conf . inputs . InputType . convolutional ( hw , hw , depth ) ) ; org . deeplearning4j . nn . multilayer . MultiLayerNetwork mln = new org . deeplearning4j . nn . multilayer . MultiLayerNetwork ( builder . build ( ) ) ; mln . init ( ) ; if ( org . deeplearning4j . gradientcheck . LRNGradientCheckTests . PRINT_RESULTS ) { for ( int j = 0 ; j < ( mln . getnLayers ( ) ) ; j ++ ) System . out . println ( ( ( ( "Layer<sp>" + j ) + "<sp>#<sp>params:<sp>" ) + ( mln . getLayer ( j ) . numParams ( ) ) ) ) ; } boolean gradOK = org . deeplearning4j . gradientcheck . GradientCheckUtil . checkGradients ( mln , org . deeplearning4j . gradientcheck . LRNGradientCheckTests . DEFAULT_EPS , org . deeplearning4j . gradientcheck . LRNGradientCheckTests . DEFAULT_MAX_REL_ERROR , org . deeplearning4j . gradientcheck . LRNGradientCheckTests . DEFAULT_MIN_ABS_ERROR , org . deeplearning4j . gradientcheck . LRNGradientCheckTests . PRINT_RESULTS , org . deeplearning4j . gradientcheck . LRNGradientCheckTests . RETURN_ON_FIRST_FAILURE , input , labels ) ; "<AssertPlaceHolder>" ; org . deeplearning4j . TestUtils . testModelSerialization ( mln ) ; } checkGradients ( org . deeplearning4j . nn . multilayer . MultiLayerNetwork , double , double , double , boolean , boolean , org . nd4j . linalg . api . ndarray . INDArray , org . nd4j . linalg . api . ndarray . INDArray ) { return org . deeplearning4j . gradientcheck . GradientCheckUtil . checkGradients ( mln , epsilon , maxRelError , minAbsoluteError , print , exitOnFirstError , input , labels , null , null ) ; }
org . junit . Assert . assertTrue ( gradOK )
test5SecureDeleteSharedOAuth1CredentialsTestDeleteSharedOAuth1Credentials ( ) { { org . alfresco . repo . security . authentication . AuthenticationUtil . setFullyAuthenticatedUser ( org . alfresco . repo . oauth1 . OAuth1CredentialsStoreServiceTest . TEST_USER_TWO ) ; java . util . List < org . alfresco . service . cmr . remotecredentials . OAuth1CredentialsInfo > sharedCredentials = org . alfresco . repo . oauth1 . OAuth1CredentialsStoreServiceTest . oauth1CredentialsStoreService . listSharedOAuth1Credentials ( org . alfresco . repo . oauth1 . OAuth1CredentialsStoreServiceTest . RemoteSystemId ) ; org . alfresco . service . cmr . remotecredentials . OAuth1CredentialsInfo oAuth1CredentialsInfo = sharedCredentials . get ( 0 ) ; org . alfresco . repo . oauth1 . OAuth1CredentialsStoreServiceTest . oauth1CredentialsStoreService . deleteSharedOAuth1Credentials ( org . alfresco . repo . oauth1 . OAuth1CredentialsStoreServiceTest . RemoteSystemId , oAuth1CredentialsInfo ) ; } { org . alfresco . repo . security . authentication . AuthenticationUtil . setFullyAuthenticatedUser ( org . alfresco . repo . oauth1 . OAuth1CredentialsStoreServiceTest . TEST_USER_ONE ) ; java . util . List < org . alfresco . service . cmr . remotecredentials . OAuth1CredentialsInfo > sharedCredentials = org . alfresco . repo . oauth1 . OAuth1CredentialsStoreServiceTest . oauth1CredentialsStoreService . listSharedOAuth1Credentials ( org . alfresco . repo . oauth1 . OAuth1CredentialsStoreServiceTest . RemoteSystemId ) ; org . alfresco . service . cmr . remotecredentials . OAuth1CredentialsInfo oAuth1CredentialsInfo = sharedCredentials . get ( 0 ) ; boolean deleted = org . alfresco . repo . oauth1 . OAuth1CredentialsStoreServiceTest . oauth1CredentialsStoreService . deleteSharedOAuth1Credentials ( org . alfresco . repo . oauth1 . OAuth1CredentialsStoreServiceTest . RemoteSystemId , oAuth1CredentialsInfo ) ; "<AssertPlaceHolder>" ; } } deleteSharedOAuth1Credentials ( java . lang . String , org . alfresco . service . cmr . remotecredentials . OAuth1CredentialsInfo ) { java . util . List < org . alfresco . service . cmr . remotecredentials . OAuth1CredentialsInfo > shared = listSharedOAuth1Credentials ( remoteSystemId ) ; if ( shared . isEmpty ( ) ) { return false ; } for ( org . alfresco . service . cmr . remotecredentials . OAuth1CredentialsInfo credential : shared ) { if ( credential . getNodeRef ( ) . equals ( credentials . getNodeRef ( ) ) ) { remoteCredentialsService . deleteCredentials ( credential ) ; } else { return false ; } } return true ; }
org . junit . Assert . assertTrue ( deleted )
testConvertValueToBoolean ( ) { boolean conv = testConvertValue ( org . apache . avro . Schema . create ( Schema . Type . STRING ) , "false" , TypeConverterProperties . TypeConverterOutputTypes . Boolean , null , org . talend . components . processing . runtime . typeconverter . Boolean . class ) ; "<AssertPlaceHolder>" ; } create ( org . talend . components . kinesis . KinesisDatasetProperties ) { return org . talend . components . kinesis . runtime . KinesisClient . getProvider ( dataset ) . getKinesisClient ( ) ; }
org . junit . Assert . assertThat ( conv , org . hamcrest . Matchers . is ( false ) )
whenReadUTFEncodedFile_thenCorrect ( ) { final java . lang . String expected_value = "" ; final org . baeldung . java . io . BufferedReader reader = new org . baeldung . java . io . BufferedReader ( new org . baeldung . java . io . InputStreamReader ( new org . baeldung . java . io . FileInputStream ( "src/test/resources/test_read7.in" ) , "UTF-8" ) ) ; final java . lang . String currentLine = reader . readLine ( ) ; reader . close ( ) ; org . baeldung . java . io . JavaReadFromFileUnitTest . LOG . debug ( currentLine ) ; "<AssertPlaceHolder>" ; } close ( ) { webClient . close ( ) ; }
org . junit . Assert . assertEquals ( expected_value , currentLine )
testJoin0 ( ) { org . graalvm . compiler . core . common . type . Stamp a = org . graalvm . compiler . core . common . type . StampFactory . object ( getType ( org . graalvm . compiler . nodes . test . A . class ) ) ; org . graalvm . compiler . core . common . type . Stamp b = org . graalvm . compiler . core . common . type . StampFactory . object ( getType ( org . graalvm . compiler . nodes . test . B . class ) ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( b , join ( a , b ) )
testSplitLogFileFirstLineCorruptionLog ( ) { conf . setBoolean ( org . apache . hadoop . hbase . regionserver . wal . TestHLogSplit . HBASE_SKIP_ERRORS , true ) ; generateHLogs ( 1 , 10 , ( - 1 ) ) ; org . apache . hadoop . fs . FileStatus logfile = fs . listStatus ( org . apache . hadoop . hbase . regionserver . wal . TestHLogSplit . hlogDir ) [ 0 ] ; corruptHLog ( logfile . getPath ( ) , org . apache . hadoop . hbase . regionserver . wal . TestHLogSplit . Corruptions . INSERT_GARBAGE_ON_FIRST_LINE , true , fs ) ; fs . initialize ( fs . getUri ( ) , conf ) ; org . apache . hadoop . hbase . regionserver . wal . HLogSplitter . splitLogFile ( org . apache . hadoop . hbase . regionserver . wal . TestHLogSplit . hbaseDir , logfile , fs , conf , reporter ) ; org . apache . hadoop . hbase . regionserver . wal . HLogSplitter . finishSplitLogFile ( org . apache . hadoop . hbase . regionserver . wal . TestHLogSplit . hbaseDir , org . apache . hadoop . hbase . regionserver . wal . TestHLogSplit . oldLogDir , logfile . getPath ( ) . toString ( ) , conf ) ; final org . apache . hadoop . fs . Path corruptDir = new org . apache . hadoop . fs . Path ( conf . get ( HConstants . HBASE_DIR ) , conf . get ( "hbase.regionserver.hlog.splitlog.corrupt.dir" , ".corrupt" ) ) ; "<AssertPlaceHolder>" ; } get ( java . lang . String , org . apache . commons . httpclient . Header [ ] ) { return get ( cluster , path , headers ) ; }
org . junit . Assert . assertEquals ( 1 , fs . listStatus ( corruptDir ) . length )
testManySegmentsPerShard2 ( ) { final org . apache . druid . server . coordinator . helper . CompactionSegmentIterator iterator = policy . reset ( com . google . common . collect . ImmutableMap . of ( org . apache . druid . server . coordinator . helper . NewestSegmentFirstPolicyTest . DATA_SOURCE , createCompactionConfig ( 800000 , 100 , new org . joda . time . Period ( "P1D" ) ) ) , com . google . common . collect . ImmutableMap . of ( org . apache . druid . server . coordinator . helper . NewestSegmentFirstPolicyTest . DATA_SOURCE , org . apache . druid . server . coordinator . helper . NewestSegmentFirstPolicyTest . createTimeline ( new org . apache . druid . server . coordinator . helper . NewestSegmentFirstPolicyTest . SegmentGenerateSpec ( org . apache . druid . java . util . common . Intervals . of ( "2017-12-04T11:00:00/2017-12-05T05:00:00" ) , new org . joda . time . Period ( "PT17H" 0 ) , 200 , 150 ) , new org . apache . druid . server . coordinator . helper . NewestSegmentFirstPolicyTest . SegmentGenerateSpec ( org . apache . druid . java . util . common . Intervals . of ( "2017-12-04T06:00:00/2017-12-04T11:00:00" ) , new org . joda . time . Period ( "PT17H" 0 ) , 375 , 80 ) , new org . apache . druid . server . coordinator . helper . NewestSegmentFirstPolicyTest . SegmentGenerateSpec ( org . apache . druid . java . util . common . Intervals . of ( "PT17H" 1 ) , new org . joda . time . Period ( "PT12H" ) , 257000 , 1 ) , new org . apache . druid . server . coordinator . helper . NewestSegmentFirstPolicyTest . SegmentGenerateSpec ( org . apache . druid . java . util . common . Intervals . of ( "2017-12-03T11:00:00/2017-12-03T18:00:00" ) , new org . joda . time . Period ( "PT17H" 0 ) , 200 , 150 ) , new org . apache . druid . server . coordinator . helper . NewestSegmentFirstPolicyTest . SegmentGenerateSpec ( org . apache . druid . java . util . common . Intervals . of ( "2017-12-02T19:00:00/2017-12-03T11:00:00" ) , new org . joda . time . Period ( "PT16H" ) , 257000 , 1 ) , new org . apache . druid . server . coordinator . helper . NewestSegmentFirstPolicyTest . SegmentGenerateSpec ( org . apache . druid . java . util . common . Intervals . of ( "PT17H" 2 ) , new org . joda . time . Period ( "PT17H" 0 ) , 200 , 150 ) , new org . apache . druid . server . coordinator . helper . NewestSegmentFirstPolicyTest . SegmentGenerateSpec ( org . apache . druid . java . util . common . Intervals . of ( "2017-12-01T18:00:00/2017-12-02T11:00:00" ) , new org . joda . time . Period ( "PT17H" ) , 257000 , 1 ) , new org . apache . druid . server . coordinator . helper . NewestSegmentFirstPolicyTest . SegmentGenerateSpec ( org . apache . druid . java . util . common . Intervals . of ( "2017-12-01T09:00:00/2017-12-01T18:00:00" ) , new org . joda . time . Period ( "PT17H" 0 ) , 200 , 150 ) ) ) , java . util . Collections . emptyMap ( ) ) ; "<AssertPlaceHolder>" ; } hasNext ( ) { final boolean hasNext = iterator . hasNext ( ) ; if ( ! hasNext ) { try { it . close ( ) ; } catch ( java . io . IOException e ) { throw new java . lang . RuntimeException ( e ) ; } } return hasNext ; }
org . junit . Assert . assertFalse ( iterator . hasNext ( ) )
testFetchByPrimaryKeyExisting ( ) { com . liferay . portal . workflow . kaleo . model . KaleoNode newKaleoNode = addKaleoNode ( ) ; com . liferay . portal . workflow . kaleo . model . KaleoNode existingKaleoNode = _persistence . fetchByPrimaryKey ( newKaleoNode . getPrimaryKey ( ) ) ; "<AssertPlaceHolder>" ; } getPrimaryKey ( ) { return _amImageEntryId ; }
org . junit . Assert . assertEquals ( existingKaleoNode , newKaleoNode )
testIndexOfFactTable ( ) { final org . pentaho . metadata . model . LogicalModel logicalModel = mock ( org . pentaho . metadata . model . LogicalModel . class ) ; final org . pentaho . metadata . model . LogicalTable logicalTable1 = mock ( org . pentaho . metadata . model . LogicalTable . class ) ; when ( logicalTable1 . getProperty ( eq ( DefaultPropertyID . TABLE_TYPE . getId ( ) ) ) ) . thenReturn ( TableType . DIMENSION ) ; final org . pentaho . metadata . model . LogicalTable logicalTable2 = mock ( org . pentaho . metadata . model . LogicalTable . class ) ; when ( logicalTable2 . getProperty ( eq ( DefaultPropertyID . TABLE_TYPE . getId ( ) ) ) ) . thenReturn ( TableType . FACT ) ; final org . pentaho . metadata . model . LogicalTable logicalTable3 = mock ( org . pentaho . metadata . model . LogicalTable . class ) ; when ( logicalTable3 . getProperty ( eq ( DefaultPropertyID . TABLE_TYPE . getId ( ) ) ) ) . thenReturn ( TableType . DIMENSION ) ; when ( logicalModel . getLogicalTables ( ) ) . thenReturn ( new java . util . LinkedList < org . pentaho . metadata . model . LogicalTable > ( ) { { add ( logicalTable1 ) ; add ( logicalTable2 ) ; add ( logicalTable3 ) ; } } ) ; final int indexOfFactTable = org . pentaho . di . starmodeler . ConceptUtil . indexOfFactTable ( logicalModel ) ; "<AssertPlaceHolder>" ; } indexOfFactTable ( org . pentaho . metadata . model . LogicalModel ) { for ( int i = 0 ; i < ( logicalModel . getLogicalTables ( ) . size ( ) ) ; i ++ ) { org . pentaho . metadata . model . LogicalTable logicalTable = logicalModel . getLogicalTables ( ) . get ( i ) ; org . pentaho . metadata . model . concept . types . TableType type = org . pentaho . di . starmodeler . ConceptUtil . getTableType ( logicalTable ) ; if ( type == ( org . pentaho . metadata . model . concept . types . TableType . FACT ) ) { return i ; } } return - 1 ; }
org . junit . Assert . assertEquals ( 1 , indexOfFactTable )
shouldAddEntriesToCache ( ) { service . putInCache ( uk . gov . gchq . gaffer . cache . impl . HashMapCacheServiceTest . CACHE_NAME , "test" , 1 ) ; "<AssertPlaceHolder>" ; } getFromCache ( java . lang . String , K ) { return null ; }
org . junit . Assert . assertEquals ( ( ( java . lang . Integer ) ( 1 ) ) , service . getFromCache ( uk . gov . gchq . gaffer . cache . impl . HashMapCacheServiceTest . CACHE_NAME , "test" ) )
testInstallStatusEvent ( ) { classUnderTest = new net . sourceforge . squirrel_sql . client . update . gui . installer . event . InstallStatusEvent ( net . sourceforge . squirrel_sql . client . update . gui . installer . event . InstallEventType . BACKUP_COMPLETE ) ; "<AssertPlaceHolder>" ; } getType ( ) { return _type ; }
org . junit . Assert . assertEquals ( net . sourceforge . squirrel_sql . client . update . gui . installer . event . InstallEventType . BACKUP_COMPLETE , classUnderTest . getType ( ) )
parameterFieldInject ( ) { org . easydevelop . business . domain . UserOrder order = new org . easydevelop . business . domain . UserOrder ( ) ; java . lang . Integer orderId = keyTest . parameterFieldInject ( order ) ; "<AssertPlaceHolder>" ; } parameterFieldInject ( org . easydevelop . business . domain . UserOrder ) { return order . getOrderId ( ) ; }
org . junit . Assert . assertTrue ( ( orderId != null ) )
words ( ) { int n = randomint ( ) ; java . lang . String s = loremIpsum . words ( n ) ; testString ( s ) ; int c = countWords ( s ) ; log . debug ( ( ( ( "expecting<sp>" + n ) + "<sp>words,<sp>counted<sp>" ) + c ) ) ; "<AssertPlaceHolder>" ; } countWords ( java . lang . String ) { return countChunks ( s , "[\\s]" ) ; }
org . junit . Assert . assertEquals ( n , c )
shouldReturnTasksWithTaskCandidateUserOrTaskCandidateGroupWithIncludeAssignedTasks ( ) { org . camunda . bpm . engine . task . Task task1 = taskService . newTask ( ) ; taskService . saveTask ( task1 ) ; taskService . addCandidateUser ( task1 . getId ( ) , "John<sp>Doe" ) ; taskService . setAssignee ( task1 . getId ( ) , "John<sp>Doe" ) ; org . camunda . bpm . engine . task . Task task2 = taskService . newTask ( ) ; taskService . saveTask ( task2 ) ; taskService . addCandidateGroup ( task2 . getId ( ) , "Controlling" ) ; java . util . List < org . camunda . bpm . engine . task . Task > tasks = taskService . createTaskQuery ( ) . or ( ) . taskCandidateUser ( "John<sp>Doe" ) . taskCandidateGroup ( "Controlling" ) . includeAssignedTasks ( ) . endOr ( ) . list ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return ( ( ( historicProcessInstanceIds . size ( ) ) + ( historicDecisionInstanceIds . size ( ) ) ) + ( historicCaseInstanceIds . size ( ) ) ) + ( historicBatchIds . size ( ) ) ; }
org . junit . Assert . assertEquals ( 2 , tasks . size ( ) )
testFileMd5SumEquals_OtherFile_SameContent ( ) { java . nio . file . Path path1 = java . nio . file . Paths . get ( nl . jpoint . vertx . deploy . agent . util . FileDigestUtilTest . class . getResource ( "file1.txt" ) . toURI ( ) ) ; java . nio . file . Path path2 = java . nio . file . Paths . get ( nl . jpoint . vertx . deploy . agent . util . FileDigestUtilTest . class . getResource ( "file2.txt" ) . toURI ( ) ) ; byte [ ] digest1 = fileDigestUtil . getFileMd5Sum ( path1 ) ; byte [ ] digest2 = fileDigestUtil . getFileMd5Sum ( path2 ) ; "<AssertPlaceHolder>" ; } getFileMd5Sum ( java . nio . file . Path ) { if ( ( ( md ) == null ) || ( ! ( unpackFile . toFile ( ) . exists ( ) ) ) ) { nl . jpoint . vertx . deploy . agent . util . FileDigestUtil . LOG . debug ( "MD<sp>is<sp>null<sp>{},<sp>or<sp>file<sp>does<sp>not<sp>exist<sp>{}" , md , unpackFile ) ; return new byte [ 0 ] ; } try ( java . io . InputStream is = java . nio . file . Files . newInputStream ( unpackFile ) ) { java . security . DigestInputStream dis = new java . security . DigestInputStream ( is , md ) ; while ( ( dis . read ( ) ) != ( - 1 ) ) ; byte [ ] digest = md . digest ( ) ; md . reset ( ) ; return digest ; } catch ( java . io . IOException e ) { nl . jpoint . vertx . deploy . agent . util . FileDigestUtil . LOG . error ( "Error<sp>calculating<sp>MD5<sp>sum" , e ) ; return new byte [ 0 ] ; } }
org . junit . Assert . assertTrue ( java . util . Arrays . equals ( digest1 , digest2 ) )
testRemoveHtmlClassStringNoMatch ( ) { com . github . bordertech . wcomponents . AbstractWComponent comp = new com . github . bordertech . wcomponents . AbstractWComponent_Test . SimpleComponent ( ) ; comp . setHtmlClass ( "foo" ) ; comp . removeHtmlClass ( "bar" ) ; "<AssertPlaceHolder>" ; } getHtmlClass ( ) { throw new java . lang . UnsupportedOperationException ( "Not<sp>supported<sp>yet." ) ; }
org . junit . Assert . assertEquals ( "foo" , comp . getHtmlClass ( ) )
testGetRegistrationDate ( ) { "<AssertPlaceHolder>" ; } getRegistrationDate ( ) { return null ; }
org . junit . Assert . assertNull ( meta . getRegistrationDate ( ) )
testIp ( ) { byte [ ] bytes = org . bouncycastle . util . encoders . Hex . decode ( "41043e96222332ea7848323c08116dddafbfa917b8e37f0bdf63841628267148588a09a43540942d58d49717ad3fabfe14978cf4f0a8b84d2435dad16e9aa4d7f935ac" ) ; com . google . bitcoin . script . Script s = new com . google . bitcoin . script . Script ( bytes ) ; "<AssertPlaceHolder>" ; } isSentToRawPubKey ( ) { return ( ( ( ( chunks . size ( ) ) == 2 ) && ( chunks . get ( 1 ) . equalsOpCode ( com . google . bitcoin . script . OP_CHECKSIG ) ) ) && ( ! ( chunks . get ( 0 ) . isOpCode ( ) ) ) ) && ( ( chunks . get ( 0 ) . data . length ) > 1 ) ; }
org . junit . Assert . assertTrue ( s . isSentToRawPubKey ( ) )
testGetSchema4SpecialName ( ) { org . talend . components . jdbc . dataset . JDBCDatasetProperties dataset = createDatasetProperties ( false , org . talend . components . jdbc . dataprep . JDBCDatasetTestIT . special_table_name ) ; org . talend . components . jdbc . runtime . dataprep . JDBCDatasetRuntime runtime = new org . talend . components . jdbc . runtime . dataprep . JDBCDatasetRuntime ( ) ; runtime . initialize ( null , dataset ) ; org . apache . avro . Schema schema = runtime . getSchema ( ) ; "<AssertPlaceHolder>" ; org . talend . components . jdbc . common . DBTestUtils . testMetadata4SpecialName ( schema . getFields ( ) ) ; } getSchema ( ) { return schema ; }
org . junit . Assert . assertNotNull ( schema )
testBeansProjectXMLConfigWithExternalConfigSet ( ) { org . eclipse . core . resources . IProject secondProject = org . springsource . ide . eclipse . commons . tests . util . StsTestUtil . createPredefinedProject ( "beans-config-tests-2" , Activator . PLUGIN_ID ) ; org . springframework . ide . eclipse . beans . core . internal . model . BeansProject secondBeansProject = new org . springframework . ide . eclipse . beans . core . internal . model . BeansProject ( model , secondProject ) ; model . addProject ( secondBeansProject ) ; beansProject . addConfig ( "basic-bean-config.xml" , IBeansConfig . Type . MANUAL ) ; secondBeansProject . addConfig ( "second-bean-config.xml" , IBeansConfig . Type . MANUAL ) ; org . springframework . ide . eclipse . beans . core . internal . model . BeansConfigSet configSet = new org . springframework . ide . eclipse . beans . core . internal . model . BeansConfigSet ( beansProject , "test-set" , IBeansConfigSet . Type . MANUAL ) ; configSet . addConfig ( "basic-bean-config.xml" ) ; configSet . addConfig ( "/beans-config-tests-2/second-bean-config.xml" ) ; beansProject . addConfigSet ( configSet ) ; org . springframework . ide . eclipse . beans . core . model . IBeansConfigSet set = beansProject . getConfigSet ( "test-set" ) ; java . util . Set < org . springframework . ide . eclipse . beans . core . model . IBeansConfig > configs = set . getConfigs ( ) ; "<AssertPlaceHolder>" ; secondProject . delete ( true , null ) ; } size ( ) { return orderedStorage . size ( ) ; }
org . junit . Assert . assertEquals ( 2 , configs . size ( ) )
testIsEmpty ( ) { io . netty . handler . codec . http2 . Http2Headers headers = io . netty . handler . codec . http2 . ReadOnlyHttp2Headers . trailers ( false ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return delegate . isEmpty ( ) ; }
org . junit . Assert . assertTrue ( headers . isEmpty ( ) )
testIsAllocation2 ( ) { net . sourceforge . pmd . lang . java . ast . ASTBlockStatement bs = new net . sourceforge . pmd . lang . java . ast . ASTBlockStatement ( 0 ) ; bs . jjtAddChild ( new net . sourceforge . pmd . lang . java . ast . ASTAssertStatement ( 1 ) , 0 ) ; "<AssertPlaceHolder>" ; } isAllocation ( ) { return hasDescendantOfType ( net . sourceforge . pmd . lang . java . ast . ASTAllocationExpression . class ) ; }
org . junit . Assert . assertFalse ( bs . isAllocation ( ) )
stop ( ) { nginxCommandLineInterface . killAll ( ) . thenCompose ( ( nginxResponse ) -> nginxCommandLineInterface . stop ( ) ) . thenCompose ( ( nginxResponse ) -> nginxCommandLineInterface . start ( ) ) . thenCompose ( ( nginxResponse ) -> nginxCommandLineInterface . stop ( ) ) . thenAccept ( ( nginxResponse ) -> { if ( nginxResponse . error ( ) ) { com . jslsolucoes . nginx . admin . agent . model . response . NginxExceptionResponse nginxExceptionResponse = ( ( com . jslsolucoes . nginx . admin . agent . model . response . NginxExceptionResponse ) ( nginxResponse ) ) ; org . junit . Assert . fail ( nginxExceptionResponse . getStackTrace ( ) ) ; } else if ( nginxResponse . forbidden ( ) ) { com . jslsolucoes . nginx . admin . agent . model . response . NginxAuthenticationFailResponse nginxAuthenticationFailResponse = ( ( com . jslsolucoes . nginx . admin . agent . model . response . NginxAuthenticationFailResponse ) ( nginxResponse ) ) ; org . junit . Assert . fail ( nginxAuthenticationFailResponse . getMessage ( ) ) ; } else { com . jslsolucoes . nginx . admin . agent . model . response . NginxCommandLineInterfaceResponse nginxCommandLineInterfaceResponse = ( ( com . jslsolucoes . nginx . admin . agent . model . response . NginxCommandLineInterfaceResponse ) ( nginxResponse ) ) ; "<AssertPlaceHolder>" ; } } ) . join ( ) ; } getSuccess ( ) { return success ; }
org . junit . Assert . assertTrue ( nginxCommandLineInterfaceResponse . getSuccess ( ) )
runTestObjectSensitivity1 ( ) { soot . jimple . infoflow . results . InfoflowResults res = analyzeAPKFile ( "FieldAndObjectSensitivity/ObjectSensitivity1.apk" ) ; if ( res != null ) "<AssertPlaceHolder>" ; } size ( ) { return set . size ( ) ; }
org . junit . Assert . assertEquals ( 0 , res . size ( ) )
shouldReturnFalseAndAddErrorWhenValidateTransferAndTimeIsNull ( ) { given ( transfer . getStringField ( com . qcadoo . mes . materialFlow . hooks . TYPE ) ) . willReturn ( com . qcadoo . mes . materialFlow . hooks . TRANSPORT . getStringValue ( ) ) ; given ( transfer . getField ( com . qcadoo . mes . materialFlow . hooks . TIME ) ) . willReturn ( null ) ; given ( transfer . getBelongsToField ( com . qcadoo . mes . materialFlow . hooks . LOCATION_FROM ) ) . willReturn ( locationFrom ) ; given ( transfer . getBelongsToField ( com . qcadoo . mes . materialFlow . hooks . LOCATION_TO ) ) . willReturn ( locationTo ) ; boolean result = transferModelValidators . validateTransfer ( transferDD , transfer ) ; "<AssertPlaceHolder>" ; verify ( transfer , times ( 1 ) ) . addError ( org . mockito . Mockito . any ( com . qcadoo . model . api . FieldDefinition . class ) , org . mockito . Mockito . anyString ( ) ) ; } validateTransfer ( com . qcadoo . model . api . DataDefinition , com . qcadoo . model . api . Entity ) { boolean isValid = true ; boolean result = true ; java . lang . String type = transfer . getStringField ( com . qcadoo . mes . materialFlow . hooks . TYPE ) ; java . util . Date time = ( ( java . util . Date ) ( transfer . getField ( com . qcadoo . mes . materialFlow . hooks . TIME ) ) ) ; if ( type == null ) { transfer . addError ( transferDD . getField ( com . qcadoo . mes . materialFlow . hooks . TYPE ) , com . qcadoo . mes . materialFlow . hooks . TransferModelValidators . L_MATERIAL_FLOW_VALIDATE_GLOBAL_ERROR_FILL_TYPE ) ; isValid = false ; } else { result = validateLocation ( transferDD , transfer , type ) ; } if ( time == null ) { transfer . addError ( transferDD . getField ( com . qcadoo . mes . materialFlow . hooks . TIME ) , com . qcadoo . mes . materialFlow . hooks . TransferModelValidators . L_MATERIAL_FLOW_VALIDATE_GLOBAL_ERROR_FILL_DATE ) ; isValid = false ; } if ( isValid ) { isValid = result ; } return isValid ; }
org . junit . Assert . assertFalse ( result )
testParseNullKey ( ) { final org . apache . kafka . connect . sink . SinkRecord sinkRecord = new org . apache . kafka . connect . sink . SinkRecord ( "test" , 0 , null , null , null , null , 0 ) ; final java . util . Map < java . lang . String , byte [ ] > keys = eventParser . parseKey ( sinkRecord ) ; "<AssertPlaceHolder>" ; } parseKey ( org . apache . kafka . connect . sink . SinkRecord ) { return this . parse ( sr . topic ( ) , sr . keySchema ( ) , sr . key ( ) , true ) ; }
org . junit . Assert . assertTrue ( keys . isEmpty ( ) )
testGetSecurityRole ( ) { securityRoleDaoTestHelper . createSecurityRoleEntity ( org . finra . herd . service . SECURITY_ROLE , org . finra . herd . service . DESCRIPTION ) ; org . finra . herd . model . api . xml . SecurityRole securityRole = securityRoleService . getSecurityRole ( new org . finra . herd . model . api . xml . SecurityRoleKey ( SECURITY_ROLE ) ) ; "<AssertPlaceHolder>" ; } getSecurityRole ( java . lang . String ) { return securityRoleService . getSecurityRole ( new org . finra . herd . model . api . xml . SecurityRoleKey ( securityRoleName ) ) ; }
org . junit . Assert . assertEquals ( new org . finra . herd . model . api . xml . SecurityRole ( SECURITY_ROLE , DESCRIPTION ) , securityRole )
leftNotNullAndRightNullShouldBeFalse ( ) { org . apache . metron . stellar . dsl . Token < java . lang . Double > left = mock ( org . apache . metron . stellar . dsl . Token . class ) ; when ( left . getValue ( ) ) . thenReturn ( 1.0 ) ; org . apache . metron . stellar . dsl . Token < java . lang . Long > right = mock ( org . apache . metron . stellar . dsl . Token . class ) ; when ( right . getValue ( ) ) . thenReturn ( null ) ; org . apache . metron . stellar . common . generated . StellarParser . ComparisonOpContext op = mock ( StellarParser . ComparisonOpContext . class ) ; when ( op . EQ ( ) ) . thenReturn ( mock ( org . antlr . v4 . runtime . tree . TerminalNode . class ) ) ; boolean evaluated = evaluator . evaluate ( left , right , op ) ; "<AssertPlaceHolder>" ; } evaluate ( org . apache . metron . stellar . dsl . Token , org . apache . metron . stellar . dsl . Token , org . apache . metron . stellar . common . generated . StellarParser$ComparisonOpContext ) { if ( ( ( left . getValue ( ) ) == null ) || ( ( right . getValue ( ) ) == null ) ) { return false ; } else if ( ( ( left . getValue ( ) ) instanceof java . lang . Number ) && ( ( right . getValue ( ) ) instanceof java . lang . Number ) ) { return compareNumbers ( ( ( java . lang . Number ) ( left . getValue ( ) ) ) , ( ( java . lang . Number ) ( right . getValue ( ) ) ) , op ) ; } else if ( ( ( ( left . getValue ( ) . getClass ( ) ) == ( right . getValue ( ) . getClass ( ) ) ) && ( ( left . getValue ( ) ) instanceof java . lang . Comparable ) ) && ( ( right . getValue ( ) ) instanceof java . lang . Comparable ) ) { return compare ( ( ( java . lang . Comparable < ? > ) ( left . getValue ( ) ) ) , ( ( java . lang . Comparable < ? > ) ( right . getValue ( ) ) ) , op ) ; } throw new org . apache . metron . stellar . dsl . ParseException ( ( ( ( "Unsupported<sp>operations.<sp>The<sp>following<sp>expression<sp>is<sp>invalid:<sp>" + ( left . getValue ( ) ) ) + op ) + ( right . getValue ( ) ) ) ) ; }
org . junit . Assert . assertFalse ( evaluated )
testOpWithMissingNamespace ( ) { java . net . URI resource = getClass ( ) . getResource ( "/corrupted/op_without_namespace.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>source[op_without_namespace.sl]<sp>namespace<sp>cannot<sp>be<sp>empty." ) ; throw result . getErrors ( ) . get ( 0 ) ; } getErrors ( ) { return errors ; }
org . junit . Assert . assertTrue ( ( ( result . getErrors ( ) . size ( ) ) > 0 ) )