input
stringlengths 28
18.7k
| output
stringlengths 39
1.69k
|
|---|---|
refinementWithConjunctionAndDisjunction ( ) { generateDrugHierarchy ( ) ; generateTisselKit ( ) ; final com . b2international . index . query . Expression actual = eval ( java . lang . String . format ( "<%s:%s=%s<sp>OR<sp>(%s=%s<sp>AND<sp>%s=%s)" , com . b2international . snowowl . snomed . core . ecl . SnomedEclEvaluationRequestTest . DRUG_ROOT , com . b2international . snowowl . snomed . core . ecl . SnomedEclEvaluationRequestTest . HAS_ACTIVE_INGREDIENT , com . b2international . snowowl . snomed . core . ecl . SnomedEclEvaluationRequestTest . INGREDIENT2 , com . b2international . snowowl . snomed . core . ecl . SnomedEclEvaluationRequestTest . HAS_ACTIVE_INGREDIENT , com . b2international . snowowl . snomed . core . ecl . SnomedEclEvaluationRequestTest . INGREDIENT4 , com . b2international . snowowl . snomed . core . ecl . SnomedEclEvaluationRequestTest . HAS_ACTIVE_INGREDIENT , com . b2international . snowowl . snomed . core . ecl . SnomedEclEvaluationRequestTest . INGREDIENT2 ) ) ; final com . b2international . index . query . Expression expected = com . b2international . index . query . Expressions . builder ( ) . should ( com . b2international . snowowl . snomed . core . ecl . SnomedEclEvaluationRequestTest . and ( descendantsOf ( com . b2international . snowowl . snomed . core . ecl . SnomedEclEvaluationRequestTest . DRUG_ROOT ) , ids ( com . google . common . collect . ImmutableSet . of ( com . b2international . snowowl . snomed . core . ecl . SnomedEclEvaluationRequestTest . TRIPHASIL_TABLET ) ) ) ) . should ( com . b2international . snowowl . snomed . core . ecl . SnomedEclEvaluationRequestTest . and ( com . b2international . snowowl . snomed . core . ecl . SnomedEclEvaluationRequestTest . and ( descendantsOf ( com . b2international . snowowl . snomed . core . ecl . SnomedEclEvaluationRequestTest . DRUG_ROOT ) , ids ( com . google . common . collect . ImmutableSet . of ( com . b2international . snowowl . snomed . core . ecl . SnomedEclEvaluationRequestTest . TISSEL_KIT ) ) ) , com . b2international . snowowl . snomed . core . ecl . SnomedEclEvaluationRequestTest . and ( descendantsOf ( com . b2international . snowowl . snomed . core . ecl . SnomedEclEvaluationRequestTest . DRUG_ROOT ) , ids ( com . google . common . collect . ImmutableSet . of ( com . b2international . snowowl . snomed . core . ecl . SnomedEclEvaluationRequestTest . TRIPHASIL_TABLET ) ) ) ) ) . build ( ) ; "<AssertPlaceHolder>" ; } build ( ) { return build ( ( ( java . lang . Void ) ( null ) ) ) ; }
|
org . junit . Assert . assertEquals ( expected , actual )
|
testCreate ( ) { org . oscarehr . common . model . HL7HandlerMSHMapping entity = new org . oscarehr . common . model . HL7HandlerMSHMapping ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( entity ) ; dao . persist ( entity ) ; "<AssertPlaceHolder>" ; } getId ( ) { return this . id ; }
|
org . junit . Assert . assertNotNull ( entity . getId ( ) )
|
generateSessionIdIfLengthIsPositive ( ) { when ( propertyChain . getProperty ( ( ( io . tracee . configuration . PropertiesBasedTraceeFilterConfiguration . TRACEE_DEFAULT_PROFILE_PREFIX ) + ( io . tracee . configuration . PropertiesBasedTraceeFilterConfiguration . GENERATE_SESSION_ID ) ) ) ) . thenReturn ( "1" ) ; "<AssertPlaceHolder>" ; } shouldGenerateSessionId ( ) { return true ; }
|
org . junit . Assert . assertThat ( unit . shouldGenerateSessionId ( ) , org . hamcrest . Matchers . is ( true ) )
|
testLength ( ) { final com . salesforce . zsync . internal . util . RollingBuffer b = new com . salesforce . zsync . internal . util . RollingBuffer ( newChannel ( new java . io . ByteArrayInputStream ( new byte [ 2 ] ) ) , 1 , 2 ) ; "<AssertPlaceHolder>" ; } length ( ) { return ( ( this . last ) - ( this . first ) ) + 1 ; }
|
org . junit . Assert . assertEquals ( 1 , b . length ( ) )
|
shouldEvaluateFlipConditionToFalseGivenFlipConditionIsDefinedWithConditionEvaluatingToFalse ( ) { org . springframework . context . ApplicationContext applicationContext = mock ( org . springframework . context . ApplicationContext . class ) ; org . flips . model . FeatureContext featureContext = mock ( org . flips . model . FeatureContext . class ) ; java . lang . annotation . Annotation [ ] annotations = new java . lang . annotation . Annotation [ 1 ] ; java . lang . Class conditionClass = org . flips . condition . SpringProfileFlipCondition . class ; org . flips . annotation . FlipOnOff annotationFlipOnOff = mock ( org . flips . annotation . FlipOnOff . class ) ; org . flips . condition . SpringProfileFlipCondition condition = mock ( org . flips . condition . SpringProfileFlipCondition . class ) ; org . flips . model . FlipAnnotationAttributes annotationAttributes = mock ( org . flips . model . FlipAnnotationAttributes . class ) ; org . powermock . api . mockito . PowerMockito . mockStatic ( org . flips . utils . AnnotationUtils . class ) ; when ( org . flips . utils . AnnotationUtils . isMetaAnnotationDefined ( annotations [ 0 ] , org . flips . annotation . FlipOnOff . class ) ) . thenReturn ( true ) ; when ( org . flips . utils . AnnotationUtils . getAnnotationOfType ( annotations [ 0 ] , org . flips . annotation . FlipOnOff . class ) ) . thenReturn ( annotationFlipOnOff ) ; when ( annotationFlipOnOff . value ( ) ) . thenReturn ( conditionClass ) ; when ( org . flips . utils . AnnotationUtils . getAnnotationAttributes ( annotations [ 0 ] ) ) . thenReturn ( annotationAttributes ) ; when ( applicationContext . getBean ( conditionClass ) ) . thenReturn ( condition ) ; when ( condition . evaluateCondition ( featureContext , annotationAttributes ) ) . thenReturn ( false ) ; org . flips . model . DefaultFlipConditionEvaluator conditionEvaluator = new org . flips . model . DefaultFlipConditionEvaluator ( applicationContext , featureContext , annotations ) ; boolean result = conditionEvaluator . evaluate ( ) ; "<AssertPlaceHolder>" ; verify ( applicationContext ) . getBean ( conditionClass ) ; verify ( condition ) . evaluateCondition ( featureContext , annotationAttributes ) ; verify ( annotationFlipOnOff ) . value ( ) ; org . powermock . api . mockito . PowerMockito . verifyStatic ( ) ; org . flips . utils . AnnotationUtils . isMetaAnnotationDefined ( annotations [ 0 ] , org . flips . annotation . FlipOnOff . class ) ; org . flips . utils . AnnotationUtils . getAnnotationOfType ( annotations [ 0 ] , org . flips . annotation . FlipOnOff . class ) ; org . flips . utils . AnnotationUtils . getAnnotationAttributes ( annotations [ 0 ] ) ; } evaluate ( ) { return flipConditions . entrySet ( ) . stream ( ) . map ( ( entry ) -> evaluateFlipCondition ( org . flips . model . applicationContext , org . flips . model . featureContext , entry . getKey ( ) , entry . getValue ( ) ) ) . filter ( ( result ) -> result == Boolean . FALSE ) . findFirst ( ) . orElse ( true ) ; }
|
org . junit . Assert . assertEquals ( false , result )
|
testFetchByPrimaryKeyExisting ( ) { com . liferay . knowledge . base . model . KBComment newKBComment = addKBComment ( ) ; com . liferay . knowledge . base . model . KBComment existingKBComment = _persistence . fetchByPrimaryKey ( newKBComment . getPrimaryKey ( ) ) ; "<AssertPlaceHolder>" ; } getPrimaryKey ( ) { return _amImageEntryId ; }
|
org . junit . Assert . assertEquals ( existingKBComment , newKBComment )
|
testCacheByPage ( ) { long begin = java . lang . System . currentTimeMillis ( ) ; java . util . List < com . xiaolyuh . domain . model . Person > persons = personService . findAll ( ) ; long ing = java . lang . System . currentTimeMillis ( ) ; personService . findAll ( ) ; long end = java . lang . System . currentTimeMillis ( ) ; logger . debug ( ( ( "" + ( ing - begin ) ) + "ms" ) ) ; logger . debug ( ( ( ":" + ( end - ing ) ) + "ms" ) ) ; "<AssertPlaceHolder>" ; logger . debug ( persons . toString ( ) ) ; logger . debug ( com . alibaba . fastjson . JSON . toJSONString ( persons ) ) ; } findAll ( ) { return ruleMapper . findAll ( ) ; }
|
org . junit . Assert . assertNotNull ( persons )
|
getRequestIdGets ( ) { final byte [ ] actualData = new byte [ ] { } ; com . microsoft . azure . sdk . iot . device . transport . IotHubTransportMessage msg = new com . microsoft . azure . sdk . iot . device . transport . IotHubTransportMessage ( actualData , com . microsoft . azure . sdk . iot . device . MessageType . DEVICE_TWIN ) ; msg . setRequestId ( "12" ) ; java . lang . String requestId = msg . getRequestId ( ) ; "<AssertPlaceHolder>" ; } getRequestId ( ) { return this . requestId ; }
|
org . junit . Assert . assertEquals ( requestId , "12" )
|
retrieve ( ) { org . jdom2 . Document xml1 = new org . jdom2 . Document ( new org . jdom2 . Element ( "root" ) ) ; int id = getMetaDataStore ( ) . create ( new org . mycore . common . content . MCRJDOMContent ( xml1 ) ) . getID ( ) ; org . mycore . datamodel . ifs2 . MCRStoredMetadata sm1 = getMetaDataStore ( ) . retrieve ( id ) ; org . mycore . common . content . MCRContent xml2 = sm1 . getMetadata ( ) ; "<AssertPlaceHolder>" ; } asString ( ) { return this . text ; }
|
org . junit . Assert . assertEquals ( new org . mycore . common . content . MCRJDOMContent ( xml1 ) . asString ( ) , xml2 . asString ( ) )
|
testSetProperty_invalidValue ( ) { org . kuali . rice . core . impl . services . ConfigurationServiceImpl . PropertyHolder propertyHolder = new org . kuali . rice . core . impl . services . ConfigurationServiceImpl . PropertyHolder ( ) ; boolean failedAsExpected = false ; try { propertyHolder . setProperty ( org . kuali . rice . core . impl . services . PropertyHolderTest . KNOWN_KEY1 , null ) ; } catch ( java . lang . IllegalArgumentException e ) { failedAsExpected = true ; } "<AssertPlaceHolder>" ; } setProperty ( java . lang . String , java . lang . String ) { validateKey ( key ) ; validateValue ( value ) ; if ( ( parent ) == null ) { org . kuali . rice . core . api . util . collect . PropertiesMap . PropertyTree . LOG . debug ( ( ( ( ( "setting<sp>(k,v)<sp>(" + key ) + "," ) + value ) + ")" ) ) ; } if ( org . apache . commons . lang . StringUtils . contains ( key , '.' ) ) { java . lang . String prefix = org . apache . commons . lang . StringUtils . substringBefore ( key , "." ) ; java . lang . String suffix = org . apache . commons . lang . StringUtils . substringAfter ( key , "." ) ; org . kuali . rice . core . api . util . collect . PropertiesMap . PropertyTree node = getChild ( prefix ) ; node . setProperty ( suffix , value ) ; } else { org . kuali . rice . core . api . util . collect . PropertiesMap . PropertyTree node = getChild ( key ) ; node . setDirectValue ( value ) ; } }
|
org . junit . Assert . assertTrue ( failedAsExpected )
|
testExchangePartitionCustomTableAndPartLocation ( ) { org . apache . hadoop . hive . metastore . api . Table source = createTable ( org . apache . hadoop . hive . metastore . client . TestExchangePartitions . DB_NAME , "/2019j23" 1 , org . apache . hadoop . hive . metastore . client . TestExchangePartitions . getYearMonthAndDayPartCols ( ) , ( ( metaStore . getWarehouseRoot ( ) ) + "/sourceTable" ) ) ; org . apache . hadoop . hive . metastore . api . Table dest = createTable ( org . apache . hadoop . hive . metastore . client . TestExchangePartitions . DB_NAME , "test_dest_table_cust_loc" , org . apache . hadoop . hive . metastore . client . TestExchangePartitions . getYearMonthAndDayPartCols ( ) , ( ( metaStore . getWarehouseRoot ( ) ) + "/destTable" ) ) ; org . apache . hadoop . hive . metastore . api . Partition [ ] parts = new org . apache . hadoop . hive . metastore . api . Partition [ 2 ] ; parts [ 0 ] = createPartition ( source , com . google . common . collect . Lists . newArrayList ( "2019" , "may" , "11" ) , ( ( source . getSd ( ) . getLocation ( ) ) + "/2019j23" 0 ) ) ; parts [ 1 ] = createPartition ( source , com . google . common . collect . Lists . newArrayList ( "2019" , "july" , "23" ) , ( ( source . getSd ( ) . getLocation ( ) ) + "/2019j23" ) ) ; java . util . Map < java . lang . String , java . lang . String > partitionSpecs = org . apache . hadoop . hive . metastore . client . TestExchangePartitions . getPartitionSpec ( parts [ 1 ] ) ; try { client . exchange_partition ( partitionSpecs , source . getDbName ( ) , source . getTableName ( ) , dest . getDbName ( ) , dest . getTableName ( ) ) ; org . junit . Assert . fail ( "MetaException<sp>should<sp>have<sp>been<sp>thrown." ) ; } catch ( org . apache . hadoop . hive . metastore . api . MetaException e ) { } checkRemainingPartitions ( source , dest , com . google . common . collect . Lists . newArrayList ( parts [ 0 ] , parts [ 1 ] ) ) ; java . util . List < org . apache . hadoop . hive . metastore . api . Partition > destTablePartitions = client . listPartitions ( dest . getDbName ( ) , dest . getTableName ( ) , ( ( short ) ( - 1 ) ) ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { com . google . common . base . Preconditions . checkNotNull ( getPath ( ) ) ; try { org . apache . hadoop . fs . FileSystem fs = org . apache . hadoop . fs . FileSystem . get ( getPath ( ) . toUri ( ) , org . apache . hadoop . hive . ql . session . SessionState . getSessionConf ( ) ) ; return ( ! ( fs . exists ( getPath ( ) ) ) ) || ( ( fs . listStatus ( getPath ( ) , FileUtils . HIDDEN_FILES_PATH_FILTER ) . length ) == 0 ) ; } catch ( java . io . IOException e ) { throw new org . apache . hadoop . hive . ql . metadata . HiveException ( e ) ; } }
|
org . junit . Assert . assertTrue ( destTablePartitions . isEmpty ( ) )
|
testVisitInsnWithProbe ( ) { instrumenter . visitInsnWithProbe ( Opcodes . RETURN , 3 ) ; expectedVisitor . visitLdcInsn ( "Probe<sp>3" ) ; expectedVisitor . visitInsn ( Opcodes . RETURN ) ; "<AssertPlaceHolder>" ; } visitInsn ( int ) { switch ( opcode ) { case org . objectweb . asm . Opcodes . RET : throw new java . lang . AssertionError ( "Subroutines<sp>not<sp>supported." ) ; case org . objectweb . asm . Opcodes . IRETURN : case org . objectweb . asm . Opcodes . LRETURN : case org . objectweb . asm . Opcodes . FRETURN : case org . objectweb . asm . Opcodes . DRETURN : case org . objectweb . asm . Opcodes . ARETURN : case org . objectweb . asm . Opcodes . RETURN : case org . objectweb . asm . Opcodes . ATHROW : successor = false ; break ; default : successor = true ; break ; } first = false ; }
|
org . junit . Assert . assertEquals ( expected , actual )
|
testAvroBasedWritablePipeline ( ) { java . lang . String customersInputPath = tmpDir . copyResourceFileName ( "customers.txt" ) ; org . apache . crunch . Pipeline pipeline = new org . apache . crunch . impl . mr . MRPipeline ( org . apache . crunch . io . avro . AvroWritableIT . class , tmpDir . getDefaultConfiguration ( ) ) ; pipeline . enableDebug ( ) ; org . apache . crunch . PCollection < java . lang . String > customerLines = pipeline . readTextFile ( customersInputPath ) ; java . util . Map < java . lang . Integer , org . apache . hadoop . io . DoubleWritable > outputMap = customerLines . parallelDo ( new org . apache . crunch . MapFn < java . lang . String , org . apache . crunch . Pair < java . lang . Integer , org . apache . hadoop . io . DoubleWritable > > ( ) { @ org . apache . crunch . io . avro . Override public org . apache . crunch . Pair < java . lang . Integer , org . apache . hadoop . io . DoubleWritable > map ( java . lang . String input ) { int len = input . length ( ) ; return org . apache . crunch . Pair . of ( len , new org . apache . hadoop . io . DoubleWritable ( len ) ) ; } } , tableOf ( ints ( ) , writables ( org . apache . hadoop . io . DoubleWritable . class ) ) ) . groupByKey ( ) . combineValues ( new org . apache . crunch . CombineFn < java . lang . Integer , org . apache . hadoop . io . DoubleWritable > ( ) { @ org . apache . crunch . io . avro . Override public void process ( org . apache . crunch . Pair < java . lang . Integer , java . lang . Iterable < org . apache . hadoop . io . DoubleWritable > > input , org . apache . crunch . Emitter < org . apache . crunch . Pair < java . lang . Integer , org . apache . hadoop . io . DoubleWritable > > emitter ) { double sum = 0.0 ; for ( org . apache . hadoop . io . DoubleWritable dw : input . second ( ) ) { sum += dw . get ( ) ; } emitter . emit ( org . apache . crunch . Pair . of ( input . first ( ) , new org . apache . hadoop . io . DoubleWritable ( sum ) ) ) ; } } ) . materializeToMap ( ) ; java . util . Map < java . lang . Integer , org . apache . hadoop . io . DoubleWritable > expectedMap = com . google . common . collect . Maps . newHashMap ( ) ; expectedMap . put ( 17 , new org . apache . hadoop . io . DoubleWritable ( 17.0 ) ) ; expectedMap . put ( 16 , new org . apache . hadoop . io . DoubleWritable ( 16.0 ) ) ; expectedMap . put ( 12 , new org . apache . hadoop . io . DoubleWritable ( 24.0 ) ) ; "<AssertPlaceHolder>" ; pipeline . done ( ) ; } put ( int , java . lang . Object ) { switch ( field$ ) { case 0 : subrecords = ( ( java . util . List < java . lang . CharSequence > ) ( value$ ) ) ; break ; default : throw new org . apache . avro . AvroRuntimeException ( "Bad<sp>index" ) ; } }
|
org . junit . Assert . assertEquals ( expectedMap , outputMap )
|
testFilterModification ( ) { org . opengis . filter . Filter filterIn = ddf . catalog . filter . delegate . CopyFilterDelegateTest . FF . equals ( ddf . catalog . filter . delegate . CopyFilterDelegateTest . TEST_PROPERTY , ddf . catalog . filter . delegate . CopyFilterDelegateTest . FOO_LITERAL ) ; ddf . catalog . filter . FilterBuilder filterBuilder = new ddf . catalog . filter . proxy . builder . GeotoolsFilterBuilder ( ) ; ddf . catalog . filter . FilterDelegate < org . opengis . filter . Filter > delegate = new ddf . catalog . filter . delegate . FilterModifierDelegate ( filterBuilder ) ; ddf . catalog . filter . FilterAdapter fa = new ddf . catalog . filter . proxy . adapter . GeotoolsFilterAdapterImpl ( ) ; org . opengis . filter . Filter modifiedFilter = null ; try { modifiedFilter = fa . adapt ( filterIn , delegate ) ; } catch ( ddf . catalog . source . UnsupportedQueryException e ) { org . junit . Assert . fail ( e . getMessage ( ) ) ; } org . geotools . feature . simple . SimpleFeatureTypeBuilder b = new org . geotools . feature . simple . SimpleFeatureTypeBuilder ( ) ; b . setName ( "testFeatureType" ) ; b . add ( ddf . catalog . filter . delegate . CopyFilterDelegateTest . TEST_PROPERTY_VALUE , java . lang . String . class ) ; b . add ( "classification" , java . lang . String . class ) ; org . opengis . feature . simple . SimpleFeatureType featureType = b . buildFeatureType ( ) ; org . geotools . feature . simple . SimpleFeatureBuilder builder = new org . geotools . feature . simple . SimpleFeatureBuilder ( featureType ) ; builder . add ( ddf . catalog . filter . delegate . CopyFilterDelegateTest . FOO_LITERAL_VALUE ) ; builder . add ( "UNCLASS" ) ; org . opengis . feature . simple . SimpleFeature feature = builder . buildFeature ( "test" ) ; "<AssertPlaceHolder>" ; } evaluate ( java . lang . Object ) { return filter . evaluate ( object ) ; }
|
org . junit . Assert . assertTrue ( modifiedFilter . evaluate ( feature ) )
|
testNullConstructor ( ) { try { new com . twelvemonkeys . io . StringArrayReader ( null ) ; org . junit . Assert . fail ( "Should<sp>not<sp>allow<sp>null<sp>argument" ) ; } catch ( java . lang . RuntimeException e ) { "<AssertPlaceHolder>" ; } }
|
org . junit . Assert . assertNotNull ( e . getMessage ( ) )
|
signedByDifferentKeyWithSlop ( ) { org . eclipse . jgit . transport . HMACSHA1NonceGenerator other = new org . eclipse . jgit . transport . HMACSHA1NonceGenerator ( "other" ) ; java . lang . String sent = gen . createNonce ( db , ( ( org . eclipse . jgit . transport . HMACSHA1NonceGeneratorTest . TS ) - 10 ) ) ; java . lang . String received = other . createNonce ( db , org . eclipse . jgit . transport . HMACSHA1NonceGeneratorTest . TS ) ; "<AssertPlaceHolder>" ; } verify ( java . lang . String , java . lang . String , org . eclipse . jgit . lib . Repository , boolean , int ) { if ( received . isEmpty ( ) ) { return org . eclipse . jgit . transport . PushCertificate . NonceStatus . MISSING ; } else if ( sent . isEmpty ( ) ) { return org . eclipse . jgit . transport . PushCertificate . NonceStatus . UNSOLICITED ; } else if ( received . equals ( sent ) ) { return org . eclipse . jgit . transport . PushCertificate . NonceStatus . OK ; } if ( ! allowSlop ) { return org . eclipse . jgit . transport . PushCertificate . NonceStatus . BAD ; } int idxSent = sent . indexOf ( '-' ) ; int idxRecv = received . indexOf ( '-' ) ; if ( ( idxSent == ( - 1 ) ) || ( idxRecv == ( - 1 ) ) ) { return org . eclipse . jgit . transport . PushCertificate . NonceStatus . BAD ; } java . lang . String signedStampStr = received . substring ( 0 , idxRecv ) ; java . lang . String advertisedStampStr = sent . substring ( 0 , idxSent ) ; long signedStamp ; long advertisedStamp ; try { signedStamp = java . lang . Long . parseLong ( signedStampStr ) ; advertisedStamp = java . lang . Long . parseLong ( advertisedStampStr ) ; } catch ( java . lang . IllegalArgumentException e ) { return org . eclipse . jgit . transport . PushCertificate . NonceStatus . BAD ; } java . lang . String expect = createNonce ( db , signedStamp ) ; if ( ! ( expect . equals ( received ) ) ) { return org . eclipse . jgit . transport . PushCertificate . NonceStatus . BAD ; } long nonceStampSlop = java . lang . Math . abs ( ( advertisedStamp - signedStamp ) ) ; if ( nonceStampSlop <= slop ) { return org . eclipse . jgit . transport . PushCertificate . NonceStatus . OK ; } else { return org . eclipse . jgit . transport . PushCertificate . NonceStatus . SLOP ; } }
|
org . junit . Assert . assertEquals ( NonceStatus . BAD , gen . verify ( received , sent , db , true , 100 ) )
|
defaultPathIsEmpty ( ) { de . taimos . pipeline . aws . S3FindFilesStep step = new de . taimos . pipeline . aws . S3FindFilesStep ( "my-bucket" , false , false ) ; "<AssertPlaceHolder>" ; } getPath ( ) { return this . path ; }
|
org . junit . Assert . assertEquals ( "" , step . getPath ( ) )
|
testResolveRoutingKeyCommunicationWithChargingStationEvent ( ) { org . axonframework . domain . EventMessage message = new org . axonframework . domain . GenericEventMessage ( new io . motown . domain . api . chargingstation . HardResetChargingStationRequestedEvent ( CHARGING_STATION_ID , PROTOCOL , ROOT_IDENTITY_CONTEXT ) ) ; java . lang . String routingKey = resolver . resolveRoutingKey ( message ) ; java . lang . String expected = ( routingKeyPrefix ) + ( PROTOCOL ) ; "<AssertPlaceHolder>" ; } resolveRoutingKey ( org . axonframework . domain . EventMessage ) { if ( ( eventMessage . getPayload ( ) ) instanceof io . motown . domain . api . chargingstation . CommunicationWithChargingStationRequestedEvent ) { io . motown . domain . api . chargingstation . CommunicationWithChargingStationRequestedEvent event = ( ( io . motown . domain . api . chargingstation . CommunicationWithChargingStationRequestedEvent ) ( eventMessage . getPayload ( ) ) ) ; return ( io . motown . domain . utils . axon . MotownRoutingKeyResolver . ROUTING_KEY_PREFIX ) + ( event . getProtocol ( ) ) ; } else { return this . routingKeyResolver . resolveRoutingKey ( eventMessage ) ; } }
|
org . junit . Assert . assertEquals ( expected , routingKey )
|
testChartLocationsDialog ( ) { org . eclipse . debug . core . ILaunchConfiguration config = createConfiguration ( proj . getProject ( ) ) ; doLaunch ( config , "testChartCallback" ) ; org . eclipse . linuxtools . internal . valgrind . massif . MassifViewPart view = ( ( org . eclipse . linuxtools . internal . valgrind . massif . MassifViewPart ) ( org . eclipse . linuxtools . internal . valgrind . ui . ValgrindUIPlugin . getDefault ( ) . getView ( ) . getDynamicView ( ) ) ) ; org . eclipse . linuxtools . internal . valgrind . massif . MassifSnapshot snapshot = view . getSnapshots ( ) [ 7 ] ; "<AssertPlaceHolder>" ; org . eclipse . swt . widgets . Shell parent = org . eclipse . ui . PlatformUI . getWorkbench ( ) . getActiveWorkbenchWindow ( ) . getShell ( ) ; org . eclipse . linuxtools . internal . valgrind . massif . charting . ChartLocationsDialog dialog = new org . eclipse . linuxtools . internal . valgrind . massif . charting . ChartLocationsDialog ( parent ) ; dialog . setInput ( snapshot ) ; dialog . setBlockOnOpen ( false ) ; dialog . open ( ) ; org . eclipse . linuxtools . internal . valgrind . massif . MassifHeapTreeNode element = snapshot . getRoot ( ) . getChildren ( ) [ 1 ] ; dialog . getTableViewer ( ) . setSelection ( new org . eclipse . jface . viewers . StructuredSelection ( element ) ) ; dialog . getOkButton ( ) . notifyListeners ( SWT . Selection , null ) ; dialog . openEditorForResult ( ) ; checkFile ( proj . getProject ( ) , element ) ; checkLine ( element ) ; } isDetailed ( ) { return ! ( type . equals ( org . eclipse . linuxtools . internal . valgrind . massif . MassifSnapshot . SnapshotType . EMPTY ) ) ; }
|
org . junit . Assert . assertTrue ( snapshot . isDetailed ( ) )
|
testGetSettings ( ) { org . apache . maven . settings . Settings settings = org . rioproject . resolver . aether . util . SettingsUtil . getSettings ( ) ; "<AssertPlaceHolder>" ; } getSettings ( ) { org . apache . maven . settings . building . DefaultSettingsBuilder defaultSettingsBuilder = new org . apache . maven . settings . building . DefaultSettingsBuilder ( ) ; org . apache . maven . settings . building . DefaultSettingsBuildingRequest request = new org . apache . maven . settings . building . DefaultSettingsBuildingRequest ( ) ; java . io . File userSettingsFile = new java . io . File ( java . lang . System . getProperty ( "user.home" ) , ( ( ".m2" + ( java . io . File . separator ) ) + "settings.xml" ) ) ; request . setUserSettingsFile ( userSettingsFile ) ; defaultSettingsBuilder . setSettingsWriter ( new org . apache . maven . settings . io . DefaultSettingsWriter ( ) ) ; defaultSettingsBuilder . setSettingsReader ( new org . apache . maven . settings . io . DefaultSettingsReader ( ) ) ; defaultSettingsBuilder . setSettingsValidator ( new org . apache . maven . settings . validation . DefaultSettingsValidator ( ) ) ; org . apache . maven . settings . building . SettingsBuildingResult build = defaultSettingsBuilder . build ( request ) ; return build . getEffectiveSettings ( ) ; }
|
org . junit . Assert . assertNotNull ( settings )
|
getResourceAsStream_A$String ( ) { org . junithelper . core . file . FileReaderCommonsIOImpl target = new org . junithelper . core . file . FileReaderCommonsIOImpl ( ) ; java . lang . String name = "junithelper-config.properties" ; java . io . InputStream actual = target . getResourceAsStream ( name ) ; "<AssertPlaceHolder>" ; org . apache . commons . io . IOUtils . closeQuietly ( actual ) ; } getResourceAsStream ( java . lang . String ) { org . junithelper . core . util . Assertion . on ( "name" ) . mustNotBeNull ( name ) ; return org . junithelper . core . file . FileReaderCommonsIOImpl . class . getClassLoader ( ) . getResourceAsStream ( name ) ; }
|
org . junit . Assert . assertNotNull ( actual )
|
testUnmarshalling ( ) { java . io . InputStream is = au . edu . federation . utils . MarshallingUtilTest . class . getResourceAsStream ( "/sampleMarshalledChain.xml" ) ; au . edu . federation . caliko . FabrikChain3D unmarhsalledChain = au . edu . federation . utils . MarshallingUtil . unmarshallChain ( is , au . edu . federation . caliko . FabrikChain3D . class ) ; "<AssertPlaceHolder>" ; } unmarshallChain ( java . io . InputStream , java . lang . Class ) { javax . xml . bind . JAXBContext context = javax . xml . bind . JAXBContext . newInstance ( clazz ) ; javax . xml . bind . Unmarshaller m = context . createUnmarshaller ( ) ; T chain = ( ( T ) ( m . unmarshal ( is ) ) ) ; chain . updateChainLength ( ) ; return chain ; }
|
org . junit . Assert . assertNotNull ( unmarhsalledChain )
|
testSchedule_withSetTolerance ( ) { final com . twitter . whiskey . nio . RunLoopTest . Counter events = new com . twitter . whiskey . nio . RunLoopTest . Counter ( ) ; runLoop . schedule ( new java . lang . Runnable ( ) { @ com . twitter . whiskey . nio . Override public void run ( ) { ( events . count ) ++ ; } } , 100 , 10 , TimeUnit . MILLISECONDS ) ; runLoop . run ( false ) ; clock . tick ( 200 , TimeUnit . MILLISECONDS ) ; runLoop . run ( false ) ; runLoop . schedule ( new java . lang . Runnable ( ) { @ com . twitter . whiskey . nio . Override public void run ( ) { ( events . count ) ++ ; } } , 100 , 10 , TimeUnit . MILLISECONDS ) ; runLoop . run ( false ) ; clock . tick ( 110 , TimeUnit . MILLISECONDS ) ; runLoop . run ( false ) ; runLoop . schedule ( new java . lang . Runnable ( ) { @ com . twitter . whiskey . nio . Override public void run ( ) { ( events . count ) ++ ; } } , 100 , 10 , TimeUnit . MILLISECONDS ) ; runLoop . run ( false ) ; clock . tick ( 109 , TimeUnit . MILLISECONDS ) ; runLoop . run ( false ) ; "<AssertPlaceHolder>" ; } run ( boolean ) { ( loops ) ++ ; signal . set ( false ) ; java . lang . Runnable currentTask ; while ( ( currentTask = tasks . poll ( ) ) != null ) { ( executions ) ++ ; currentTask . run ( ) ; } long selectTimeout = 0 ; com . twitter . whiskey . nio . RunLoop . ScheduledRunnable nextScheduledTask ; while ( ! ( scheduledTasks . isEmpty ( ) ) ) { nextScheduledTask = scheduledTasks . peek ( ) ; long now = clock . now ( ) ; if ( ( ( nextScheduledTask . tolerance ) > 0 ) && ( ( nextScheduledTask . triggerPoint ) <= ( now - ( nextScheduledTask . tolerance ) ) ) ) { scheduledTasks . poll ( ) ; } else if ( ( nextScheduledTask . triggerPoint ) <= now ) { ( executions ) ++ ; nextScheduledTask . run ( ) ; scheduledTasks . poll ( ) ; } else { selectTimeout = ( nextScheduledTask . triggerPoint ) - now ; break ; } } int readyChannels = 0 ; try { selecting = true ; if ( ( blocking && ( tasks . isEmpty ( ) ) ) && ( ! ( signal . get ( ) ) ) ) { readyChannels = selector . select ( selectTimeout ) ; } else { readyChannels = selector . selectNow ( ) ; } selecting = false ; } catch ( java . io . IOException e ) { throw new java . lang . RuntimeException ( e ) ; } if ( readyChannels > 0 ) { java . util . Set < java . nio . channels . SelectionKey > selected = selector . selectedKeys ( ) ; for ( java . util . Iterator < java . nio . channels . SelectionKey > iterator = selected . iterator ( ) ; iterator . hasNext ( ) ; ) { java . nio . channels . SelectionKey key = iterator . next ( ) ; iterator . remove ( ) ; java . lang . Object attachment = key . attachment ( ) ; if ( attachment instanceof com . twitter . whiskey . nio . Selectable ) { com . twitter . whiskey . nio . Selectable selectable = ( ( com . twitter . whiskey . nio . Selectable ) ( attachment ) ) ; if ( key . isConnectable ( ) ) { ( executions ) ++ ; selectable . onConnect ( ) ; } else if ( key . isReadable ( ) ) { ( executions ) ++ ; selectable . onReadable ( ) ; } else if ( key . isWritable ( ) ) { ( executions ) ++ ; selectable . onWriteable ( ) ; } } } } }
|
org . junit . Assert . assertEquals ( 1 , events . count )
|
skipStreamThenAcceptWithCommentsOk ( ) { java . lang . String script = "#Stream<sp>#1\n" + ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "connect<sp>\'tcp://localhost:8080\'\n" + "#Middle<sp>Comment\n" 4 ) + "#Middle<sp>Comment\n" ) + "close\n" ) + "closed\n" ) + "#Middle<sp>Comment\n" 3 ) + "connect<sp>\'tcp://localhost:8081\'\n" ) + "#Middle<sp>Comment\n" 4 ) + "\n" ) + "#Middle<sp>Comment\n" ) + "close\n" ) + "closed\n" ) + "#Middle<sp>Comment\n" 2 ) + "accept<sp>\'tcp://localhost:8082\'\n" ) + "#Middle<sp>Comment\n" 0 ) + "\n" ) + "#Middle<sp>Comment\n" 1 ) + "#Middle<sp>Comment\n" 4 ) + "#Middle<sp>Comment\n" ) + "close\n" ) + "closed\n" ) ; org . kaazing . k3po . lang . internal . parser . ScriptParser parser = new org . kaazing . k3po . lang . internal . parser . ScriptParserImpl ( ) ; org . kaazing . k3po . lang . internal . ast . AstScriptNode scriptAST = parser . parse ( new java . io . ByteArrayInputStream ( script . getBytes ( org . kaazing . k3po . driver . internal . behavior . UTF_8 ) ) ) ; org . kaazing . k3po . lang . internal . ast . AstStreamNode connectAST = scriptAST . getStreams ( ) . get ( 1 ) ; org . kaazing . k3po . lang . internal . RegionInfo scriptInfo = scriptAST . getRegionInfo ( ) ; org . kaazing . k3po . driver . internal . behavior . ScriptProgress progress = new org . kaazing . k3po . driver . internal . behavior . ScriptProgress ( scriptInfo , script ) ; progress . addScriptFailure ( connectAST . getRegionInfo ( ) , "connect<sp>refused" ) ; java . lang . String observedScript = progress . getObservedScript ( ) ; java . lang . String expectedScript = "#Stream<sp>#1\n" + ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "connect<sp>\'tcp://localhost:8080\'\n" + "#Middle<sp>Comment\n" 4 ) + "#Middle<sp>Comment\n" ) + "close\n" ) + "closed\n" ) + "#Middle<sp>Comment\n" 3 ) + "connect<sp>refused\n" ) + "#Middle<sp>Comment\n" 2 ) + "accept<sp>\'tcp://localhost:8082\'\n" ) + "#Middle<sp>Comment\n" 0 ) + "\n" ) + "#Middle<sp>Comment\n" 1 ) + "#Middle<sp>Comment\n" 4 ) + "#Middle<sp>Comment\n" ) + "close\n" ) + "closed\n" ) ; "<AssertPlaceHolder>" ; } getObservedScript ( ) { return ( progress ) != null ? progress . getObservedScript ( ) : null ; }
|
org . junit . Assert . assertEquals ( expectedScript , observedScript )
|
testGetMinOrder ( ) { java . math . BigInteger expResult = java . math . BigInteger . valueOf ( 2 ) ; java . math . BigInteger result = ch . bfh . unicrypt . math . algebra . general . classes . BooleanSet . getInstance ( ) . getOrderLowerBound ( ) ; "<AssertPlaceHolder>" ; } getOrderLowerBound ( ) { if ( ( this . lowerBound ) == null ) { if ( this . hasKnownOrder ( ) ) { this . lowerBound = this . getOrder ( ) ; } else { this . lowerBound = this . defaultGetOrderLowerBound ( ) ; } } return this . lowerBound ; }
|
org . junit . Assert . assertEquals ( expResult , result )
|
testEnterAndExit ( ) { turin . context . ContextTest . MyContext ctx = new turin . context . ContextTest . MyContext ( ) ; ctx . enterContext ( "foo" ) ; ctx . exitContext ( ) ; "<AssertPlaceHolder>" ; } get ( ) { java . util . Stack < V > ctx = values . get ( ) ; if ( ctx . isEmpty ( ) ) { return java . util . Optional . empty ( ) ; } else { return java . util . Optional . of ( ctx . get ( ( ( ctx . size ( ) ) - 1 ) ) ) ; } }
|
org . junit . Assert . assertEquals ( java . util . Optional . empty ( ) , ctx . get ( ) )
|
testGetHeight ( ) { System . out . println ( "getHeight" ) ; final int imageWidth = 150 ; final int imageHeight = 50 ; java . awt . image . BufferedImage image = new java . awt . image . BufferedImage ( imageWidth , imageHeight , java . awt . image . BufferedImage . TYPE_INT_ARGB ) ; java . awt . Graphics g = image . getGraphics ( ) ; mudmap2 . backend . legend . LegendEntrySeparator instance = new mudmap2 . backend . legend . LegendEntrySeparator ( ) ; int expResult = LegendEntrySeparator . HEIGHT_REQUEST ; int result = instance . getHeight ( g ) ; "<AssertPlaceHolder>" ; } getHeight ( java . awt . Graphics ) { return mudmap2 . backend . legend . LegendEntrySeparator . HEIGHT_REQUEST ; }
|
org . junit . Assert . assertEquals ( expResult , result )
|
shouldRejectConnectionPutwithOutRegEx ( ) { hm = org . openstack . atlas . api . validation . validators . HealthMonitorValidatorTest . whenValidatingPut . initHealthMonitor ( null , org . openstack . atlas . api . validation . validators . CONNECT , "10" , "20" , "10" , "/mnt/pfft" , null , null ) ; result = hmv . validate ( hm , org . openstack . atlas . api . validation . validators . PUT ) ; "<AssertPlaceHolder>" ; } resultMessage ( org . openstack . atlas . api . validation . results . ValidatorResult , java . lang . Enum ) { java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; if ( ! ( result . passedValidation ( ) ) ) { java . util . List < org . openstack . atlas . api . validation . results . ExpectationResult > ers = result . getValidationResults ( ) ; sb . append ( java . lang . String . format ( "ON<sp>%s<sp>result.withMessage([" , ctx . toString ( ) ) ) ; for ( org . openstack . atlas . api . validation . results . ExpectationResult er : ers ) { sb . append ( java . lang . String . format ( "%s" , er . getMessage ( ) ) ) ; sb . append ( "])" ) ; } } else { sb . append ( java . lang . String . format ( "On<sp>%s<sp>All<sp>Expectations<sp>PASSED\n" , ctx . toString ( ) ) ) ; } return sb . toString ( ) ; }
|
org . junit . Assert . assertFalse ( resultMessage ( result , org . openstack . atlas . api . validation . validators . PUT ) , result . passedValidation ( ) )
|
testGetServiceWithGeoServerRef ( ) { org . geoserver . wms . WMSInfo service = new org . geoserver . wms . WMSInfoImpl ( ) ; ( ( org . geoserver . wms . WMSInfoImpl ) ( service ) ) . setId ( "WMS-TEST" ) ; service . setName ( "WMS" ) ; service . setMaintainer ( "Foo" ) ; service = database . add ( service ) ; database . clearCache ( service ) ; service = database . getAll ( org . geoserver . wms . WMSInfo . class ) . iterator ( ) . next ( ) ; "<AssertPlaceHolder>" ; } getGeoServer ( ) { return ( ( org . geoserver . config . GeoServer ) ( org . geoserver . platform . GeoServerExtensions . bean ( "geoServer" ) ) ) ; }
|
org . junit . Assert . assertNotNull ( service . getGeoServer ( ) )
|
testAndMultiPath ( ) { java . util . List < java . lang . String > expected = java . util . Collections . emptyList ( ) ; org . eclipse . jgit . treewalk . filter . TreeFilter [ ] tf = new org . eclipse . jgit . treewalk . filter . TreeFilter [ ] { org . eclipse . jgit . treewalk . filter . PathFilter . create ( "sub1" ) , org . eclipse . jgit . treewalk . filter . PathFilter . create ( "sub2" ) } ; java . util . List < java . lang . String > paths = getMatchingPaths ( treeId , org . eclipse . jgit . treewalk . filter . AndTreeFilter . create ( tf ) ) ; "<AssertPlaceHolder>" ; } create ( org . eclipse . jgit . treewalk . filter . TreeFilter [ ] ) { if ( ( list . length ) == 2 ) return org . eclipse . jgit . treewalk . filter . AndTreeFilter . create ( list [ 0 ] , list [ 1 ] ) ; if ( ( list . length ) < 2 ) throw new java . lang . IllegalArgumentException ( org . eclipse . jgit . internal . JGitText . get ( ) . atLeastTwoFiltersNeeded ) ; final org . eclipse . jgit . treewalk . filter . TreeFilter [ ] subfilters = new org . eclipse . jgit . treewalk . filter . TreeFilter [ list . length ] ; java . lang . System . arraycopy ( list , 0 , subfilters , 0 , list . length ) ; return new org . eclipse . jgit . treewalk . filter . AndTreeFilter . List ( subfilters ) ; }
|
org . junit . Assert . assertEquals ( expected , paths )
|
should_not_collapse_non_overlapping_end_paths ( ) { int k = 4 ; java . util . List < au . edu . wehi . idsv . debruijn . positional . KmerPathNode > input = new java . util . ArrayList < au . edu . wehi . idsv . debruijn . positional . KmerPathNode > ( ) ; input . add ( KPN ( k , "GTAC" , 1 , 2 , false ) ) ; input . add ( KPN ( k , "TACT" , 2 , 3 , false ) ) ; input . add ( KPN ( k , "ACTG" , 3 , 4 , false ) ) ; input . add ( KPN ( k , "CTGATT" , 5 , 5 , false ) ) ; input . add ( KPN ( k , "TACC" , 2 , 3 , false , 2 ) ) ; input . add ( KPN ( k , "ACCG" , 3 , 4 , false , 2 ) ) ; input . add ( KPN ( k , "CCGTTT" , 4 , 4 , false , 2 ) ) ; input . add ( KPN ( k , "CTGGCGTAGA" , 4 , 4 , false ) ) ; input . add ( KPN ( k , "CCGGGCAACT" , 5 , 5 , false ) ) ; au . edu . wehi . idsv . debruijn . positional . KmerPathNode . addEdge ( input . get ( 0 ) , input . get ( 1 ) ) ; au . edu . wehi . idsv . debruijn . positional . KmerPathNode . addEdge ( input . get ( 1 ) , input . get ( 2 ) ) ; au . edu . wehi . idsv . debruijn . positional . KmerPathNode . addEdge ( input . get ( 2 ) , input . get ( 3 ) ) ; au . edu . wehi . idsv . debruijn . positional . KmerPathNode . addEdge ( input . get ( 0 ) , input . get ( 4 ) ) ; au . edu . wehi . idsv . debruijn . positional . KmerPathNode . addEdge ( input . get ( 4 ) , input . get ( 5 ) ) ; au . edu . wehi . idsv . debruijn . positional . KmerPathNode . addEdge ( input . get ( 5 ) , input . get ( 6 ) ) ; au . edu . wehi . idsv . debruijn . positional . KmerPathNode . addEdge ( input . get ( 2 ) , input . get ( 7 ) ) ; au . edu . wehi . idsv . debruijn . positional . KmerPathNode . addEdge ( input . get ( 5 ) , input . get ( 8 ) ) ; java . util . List < au . edu . wehi . idsv . debruijn . positional . KmerNode > splitExpected = split ( input ) ; java . util . List < au . edu . wehi . idsv . debruijn . positional . KmerPathNode > result = go ( k , 100 , 2 , input ) ; java . util . List < au . edu . wehi . idsv . debruijn . positional . KmerNode > splitActual = split ( result ) ; "<AssertPlaceHolder>" ; } split ( java . util . List ) { java . util . List < au . edu . wehi . idsv . debruijn . positional . KmerNode > list = au . edu . wehi . idsv . debruijn . positional . ImmutableKmerNode . split ( in ) . collect ( java . util . stream . Collectors . toList ( ) ) ; list . sort ( KmerNodeUtil . ByLastStartEndKmerReferenceWeight ) ; return list ; }
|
org . junit . Assert . assertEquals ( splitExpected , splitActual )
|
testAsyncBulkWritePartialFailureBufferFailure ( ) { java . lang . String name = "distrlog-testAsyncBulkWritePartialFailure" ; org . apache . distributedlog . DistributedLogConfiguration confLocal = new org . apache . distributedlog . DistributedLogConfiguration ( ) ; confLocal . loadConf ( testConf ) ; confLocal . setOutputBufferSize ( 1024 ) ; org . apache . distributedlog . api . DistributedLogManager dlm = createNewDLM ( confLocal , name ) ; org . apache . distributedlog . BKAsyncLogWriter writer = ( ( org . apache . distributedlog . BKAsyncLogWriter ) ( dlm . startAsyncLogSegmentNonPartitioned ( ) ) ) ; final int goodRecs = 10 ; final java . util . List < org . apache . distributedlog . LogRecord > records = org . apache . distributedlog . DLMTestUtil . getLargeLogRecordInstanceList ( 1 , goodRecs ) ; records . add ( org . apache . distributedlog . DLMTestUtil . getLogRecordInstance ( goodRecs , ( ( org . apache . distributedlog . LogRecord . MAX_LOGRECORD_SIZE ) + 1 ) ) ) ; records . addAll ( org . apache . distributedlog . DLMTestUtil . getLargeLogRecordInstanceList ( 1 , goodRecs ) ) ; java . util . concurrent . CompletableFuture < java . util . List < java . util . concurrent . CompletableFuture < org . apache . distributedlog . DLSN > > > futureResults = writer . writeBulk ( records ) ; java . util . List < java . util . concurrent . CompletableFuture < org . apache . distributedlog . DLSN > > results = org . apache . distributedlog . DLMTestUtil . validateFutureSucceededAndGetResult ( futureResults ) ; "<AssertPlaceHolder>" ; for ( int i = 0 ; i < goodRecs ; i ++ ) { org . apache . distributedlog . DLSN dlsn = org . apache . distributedlog . DLMTestUtil . validateFutureSucceededAndGetResult ( results . get ( i ) ) ; } org . apache . distributedlog . DLMTestUtil . validateFutureFailed ( results . get ( goodRecs ) , org . apache . distributedlog . exceptions . LogRecordTooLongException . class ) ; for ( int i = goodRecs + 1 ; i < ( ( 2 * goodRecs ) + 1 ) ; i ++ ) { org . apache . distributedlog . DLMTestUtil . validateFutureFailed ( results . get ( i ) , org . apache . distributedlog . exceptions . WriteCancelledException . class ) ; } writer . closeAndComplete ( ) ; dlm . close ( ) ; } size ( ) { lock . readLock ( ) . lock ( ) ; try { long size = 0 ; for ( int i = 0 ; i < ( cacheIndexes . size ( ) ) ; i ++ ) { if ( i == ( currentSegmentIdx ) ) { size += currentSegmentOffset . get ( ) ; } else if ( ! ( cacheIndexes . get ( i ) . isEmpty ( ) ) ) { size += segmentSize ; } else { } } return size ; } finally { lock . readLock ( ) . unlock ( ) ; } }
|
org . junit . Assert . assertEquals ( ( ( 2 * goodRecs ) + 1 ) , results . size ( ) )
|
shouldNotFindNodeWithRemovedLabelInPrefixSearch ( ) { boolean needsValues = indexProvidesStringValues ( ) ; int label = token . nodeLabel ( "Node" ) ; int prop = token . propertyKey ( "prop" ) ; org . neo4j . internal . kernel . api . IndexReference index = schemaRead . index ( label , prop ) ; try ( org . neo4j . graphdb . org . neo4j . internal . kernel . api . Transaction tx = org . neo4j . internal . kernel . api . NodeValueIndexCursorTestBase . beginTransaction ( ) ; org . neo4j . internal . kernel . api . NodeValueIndexCursor node = cursors . allocateNodeValueIndexCursor ( ) ) { tx . dataWrite ( ) . nodeRemoveLabel ( org . neo4j . internal . kernel . api . NodeValueIndexCursorTestBase . strOne , label ) ; tx . dataRead ( ) . nodeIndexSeek ( index , node , IndexOrder . NONE , needsValues , org . neo4j . internal . kernel . api . IndexQuery . stringPrefix ( prop , org . neo4j . internal . kernel . api . NodeValueIndexCursorTestBase . stringValue ( "on" ) ) ) ; "<AssertPlaceHolder>" ; } } next ( ) { return entries . next ( ) ; }
|
org . junit . Assert . assertFalse ( node . next ( ) )
|
testBuildWithOrderBy ( ) { org . lnu . is . domain . enrolment . status . type . EnrolmentStatusType context = new org . lnu . is . domain . enrolment . status . type . EnrolmentStatusType ( ) ; org . lnu . is . pagination . OrderBy orderBy1 = new org . lnu . is . pagination . OrderBy ( "abbrName" , org . lnu . is . pagination . OrderByType . ASC ) ; org . lnu . is . pagination . OrderBy orderBy2 = new org . lnu . is . pagination . OrderBy ( "name" , org . lnu . is . pagination . OrderByType . DESC ) ; org . lnu . is . pagination . OrderBy orderBy3 = new org . lnu . is . pagination . OrderBy ( "description" , org . lnu . is . pagination . OrderByType . ASC ) ; java . util . List < org . lnu . is . pagination . OrderBy > orders = java . util . Arrays . asList ( orderBy1 , orderBy2 , orderBy3 ) ; java . lang . String expectedQuery = "SELECT<sp>e<sp>FROM<sp>EnrolmentStatusType<sp>e<sp>WHERE<sp>e.status=:status<sp>AND<sp>e.crtUserGroup<sp>IN<sp>(:userGroups)<sp>ORDER<sp>BY<sp>e.abbrName<sp>ASC,<sp>e.name<sp>DESC,<sp>e.description<sp>ASC" ; org . lnu . is . pagination . MultiplePagedSearch < org . lnu . is . domain . enrolment . status . type . EnrolmentStatusType > pagedSearch = new org . lnu . is . pagination . MultiplePagedSearch ( ) ; pagedSearch . setEntity ( context ) ; pagedSearch . setOrders ( orders ) ; java . lang . String actualQuery = unit . build ( pagedSearch ) ; "<AssertPlaceHolder>" ; } setOrders ( java . util . List ) { this . orders = orders ; }
|
org . junit . Assert . assertEquals ( expectedQuery , actualQuery )
|
testFourWeekRobustFitOutliers ( ) { double [ ] data = com . github . servicenow . ds . stats . stl . SimulatedWeeklyMetric . getFourWeekValues ( ) ; assert ( data . length ) == 4032 ; int periodicity = 1008 ; com . github . servicenow . ds . stats . stl . SeasonalTrendLoess . Builder builder = new com . github . servicenow . ds . stats . stl . SeasonalTrendLoess . Builder ( ) ; builder . setPeriodLength ( periodicity ) . setRobust ( ) . setPeriodic ( ) . setFlatTrend ( ) ; com . github . servicenow . ds . stats . stl . SeasonalTrendLoess stlSmoother = builder . buildSmoother ( data ) ; com . github . servicenow . ds . stats . stl . SeasonalTrendLoess . Decomposition stl = stlSmoother . decompose ( ) ; double [ ] weights = stl . getWeights ( ) ; int allZeroWeightCount = 0 ; for ( int i = 0 ; i < periodicity ; ++ i ) { boolean all = true ; for ( int j = 0 ; j < 4 ; ++ j ) all = all && ( ( weights [ ( i + ( j * periodicity ) ) ] ) == 0.0 ) ; if ( all ) ++ allZeroWeightCount ; } "<AssertPlaceHolder>" ; } getWeights ( ) { return fWeights ; }
|
org . junit . Assert . assertEquals ( 0 , allZeroWeightCount )
|
deveObterInfoCancelamentoComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe310 . classes . evento . cancelamento . NFRetornoCancelamento cancelamento = new com . fincatto . documentofiscal . nfe310 . classes . evento . cancelamento . NFRetornoCancelamento ( ) ; final com . fincatto . documentofiscal . nfe310 . classes . evento . cancelamento . NFRetornoInfoCancelamento infoCancelamento = new com . fincatto . documentofiscal . nfe310 . classes . evento . cancelamento . NFRetornoInfoCancelamento ( ) ; cancelamento . setInfoCancelamento ( infoCancelamento ) ; "<AssertPlaceHolder>" ; } getInfoCancelamento ( ) { return this . infoCancelamento ; }
|
org . junit . Assert . assertEquals ( infoCancelamento , cancelamento . getInfoCancelamento ( ) )
|
testBuildWithDisabledSecurityConstraitnsWithOrderBy ( ) { unit . setSecurity ( false ) ; org . lnu . is . domain . enrolment . benefit . EnrolmentBenefit context = new org . lnu . is . domain . enrolment . benefit . EnrolmentBenefit ( ) ; org . lnu . is . pagination . OrderBy orderBy1 = new org . lnu . is . pagination . OrderBy ( "enrolment" , org . lnu . is . pagination . OrderByType . ASC ) ; org . lnu . is . pagination . OrderBy orderBy2 = new org . lnu . is . pagination . OrderBy ( "benefit" , org . lnu . is . pagination . OrderByType . DESC ) ; org . lnu . is . pagination . OrderBy orderBy3 = new org . lnu . is . pagination . OrderBy ( "personPaper" , org . lnu . is . pagination . OrderByType . ASC ) ; java . util . List < org . lnu . is . pagination . OrderBy > orders = java . util . Arrays . asList ( orderBy1 , orderBy2 , orderBy3 ) ; java . lang . String expectedQuery = "SELECT<sp>e<sp>FROM<sp>EnrolmentBenefit<sp>e<sp>WHERE<sp>e.status=:status<sp>ORDER<sp>BY<sp>e.enrolment<sp>ASC,<sp>e.benefit<sp>DESC,<sp>e.personPaper<sp>ASC" ; org . lnu . is . pagination . MultiplePagedSearch < org . lnu . is . domain . enrolment . benefit . EnrolmentBenefit > pagedSearch = new org . lnu . is . pagination . MultiplePagedSearch ( ) ; pagedSearch . setEntity ( context ) ; pagedSearch . setOrders ( orders ) ; java . lang . String actualQuery = unit . build ( pagedSearch ) ; "<AssertPlaceHolder>" ; } setOrders ( java . util . List ) { this . orders = orders ; }
|
org . junit . Assert . assertEquals ( expectedQuery , actualQuery )
|
testGet ( ) { org . netbeans . modules . editor . lib2 . actions . MacroRecording macroRecording = org . netbeans . modules . editor . lib2 . actions . MacroRecording . get ( ) ; "<AssertPlaceHolder>" ; } get ( ) { return org . netbeans . modules . editor . lib2 . actions . MacroRecording . INSTANCE ; }
|
org . junit . Assert . assertNotNull ( macroRecording )
|
equalsContractHashCode ( ) { final org . jboss . aerogear . simplepush . server . datastore . model . AckDTO x = new org . jboss . aerogear . simplepush . server . datastore . model . AckDTO ( new org . jboss . aerogear . simplepush . server . datastore . model . UserAgentDTO ( uaid ) , channelId , version ) ; final org . jboss . aerogear . simplepush . server . datastore . model . AckDTO y = new org . jboss . aerogear . simplepush . server . datastore . model . AckDTO ( new org . jboss . aerogear . simplepush . server . datastore . model . UserAgentDTO ( uaid ) , channelId , version ) ; "<AssertPlaceHolder>" ; } hashCode ( ) { final int prime = 31 ; int result = 1 ; result = ( prime * result ) + ( ( channelId ) == null ? 0 : channelId . hashCode ( ) ) ; return result ; }
|
org . junit . Assert . assertThat ( x . hashCode ( ) , org . hamcrest . CoreMatchers . is ( y . hashCode ( ) ) )
|
testResponseConnControlNoEntity ( ) { final org . apache . hc . core5 . http . protocol . HttpContext context = new org . apache . hc . core5 . http . protocol . BasicHttpContext ( null ) ; final org . apache . hc . core5 . http . ClassicHttpResponse response = new org . apache . hc . core5 . http . message . BasicClassicHttpResponse ( org . apache . hc . core5 . http . HttpStatus . SC_OK , "OK" ) ; final org . apache . hc . core5 . http . protocol . ResponseConnControl interceptor = new org . apache . hc . core5 . http . protocol . ResponseConnControl ( ) ; interceptor . process ( response , response . getEntity ( ) , context ) ; final org . apache . hc . core5 . http . Header header = response . getFirstHeader ( HttpHeaders . CONNECTION ) ; "<AssertPlaceHolder>" ; } getFirstHeader ( java . lang . String ) { return message . getFirstHeader ( name ) ; }
|
org . junit . Assert . assertNull ( header )
|
testXSMTPHEADER ( ) { java . util . List < com . aliyuncs . dm . simple . Email . Address > cc = new java . util . ArrayList < com . aliyuncs . dm . simple . Email . Address > ( ) ; cc . add ( new com . aliyuncs . dm . simple . Email . Address ( properties . getProperty ( "test.to.address" ) , "cc" ) ) ; com . aliyuncs . dm . simple . Email email = com . aliyuncs . dm . simple . Email . builder ( ) . from ( properties . getProperty ( "smtp.username" ) , "dm" ) . to ( properties . getProperty ( "test.to.address" ) ) . cc ( cc ) . subject ( "test<sp>text" ) . textHTML ( "hello" ) . replyToAddress ( new com . aliyuncs . dm . simple . Email . Address ( properties . getProperty ( "smtp.username" ) ) ) . templateContent ( "{\"sss\":\"sssss\",\"sss\":\"sssss\",\"sss\":\"sssss\",\"sss\":\"sssss\",\"sss\":\"sssss\",\"sss\":\"sssss\",\"sss\":\"sssss\",\"sss\":\"sssss\",\"sss\":\"sssss\",\"sss\":\"sssss\"<sp>}" ) . build ( ) ; java . lang . String result = mailSender . sendMail ( email ) ; "<AssertPlaceHolder>" ; } sendMail ( com . aliyuncs . dm . simple . Email ) { try { com . aliyuncs . dm . simple . MimeMessage mimeMessage = getMimeMessage ( email ) ; com . aliyuncs . dm . simple . Transport . send ( mimeMessage ) ; } catch ( com . aliyuncs . dm . simple . MessagingException e ) { e . printStackTrace ( ) ; return e . getMessage ( ) ; } catch ( java . io . UnsupportedEncodingException e ) { e . printStackTrace ( ) ; return e . getMessage ( ) ; } return "success" ; }
|
org . junit . Assert . assertEquals ( "hello" 0 , result )
|
testMinimum ( ) { double finalScore = executeAndFetchScore ( "scorecards_min" ) ; "<AssertPlaceHolder>" ; } executeAndFetchScore ( java . lang . String ) { org . kie . api . io . Resource resource = org . kie . internal . io . ResourceFactory . newClassPathResource ( "scoremodel_scoring_strategies.xls" ) . setResourceType ( ResourceType . SCARD ) ; org . kie . internal . builder . ScoreCardConfiguration resConf = new org . drools . core . builder . conf . impl . ScoreCardConfigurationImpl ( ) ; resConf . setWorksheetName ( sheetName ) ; resource . setConfiguration ( resConf ) ; org . kie . pmml . pmml_4_2 . PMML4ExecutionHelper helper = org . kie . pmml . pmml_4_2 . PMML4ExecutionHelper . PMML4ExecutionHelperFactory . getExecutionHelper ( "SampleScore" , resource , null ) ; helper . addPossiblePackageName ( "org.drools.scorecards.example" ) ; org . kie . api . pmml . PMMLRequestData request = new org . kie . api . pmml . PMMLRequestData ( "123" , helper . getModelName ( ) ) ; request . addRequestParam ( "age" , 10.0 ) ; request . addRequestParam ( "validLicense" , false ) ; org . kie . api . pmml . PMML4Result resultHolder = helper . submitRequest ( request ) ; org . junit . Assert . assertEquals ( "OK" , resultHolder . getResultCode ( ) ) ; return resultHolder . getResultValue ( "Scorecard__calculatedScore" , "value" , org . drools . scorecards . Double . class ) . orElse ( null ) ; }
|
org . junit . Assert . assertEquals ( ( - 1.0 ) , finalScore , 0.0 )
|
testGetParametersWithDefaultEntityAndDisabledStatus ( ) { unit . setActive ( false ) ; org . lnu . is . domain . degree . type . DegreeType entity = new org . lnu . is . domain . degree . type . DegreeType ( ) ; 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 )
|
clear_by_int_range ( ) { int maxId = dao . getMaxId ( org . nutz . dao . test . meta . Pet . class ) ; int num = dao . clear ( org . nutz . dao . test . meta . Pet . class , org . nutz . dao . Cnd . where ( "id" , "IN" , new int [ ] { maxId , maxId - 1 } ) ) ; "<AssertPlaceHolder>" ; } getMaxId ( java . lang . Class ) { org . nutz . dao . entity . Entity < ? > en = holder . getEntity ( classOfT ) ; return func ( en . getViewName ( ) , "MAX" , en . getIdField ( ) . getColumnName ( ) ) ; }
|
org . junit . Assert . assertEquals ( 2 , num )
|
hasCurrentUserSubscriptions_SubscriptionManger_Authorized ( ) { java . lang . reflect . Method method = beanClass . getMethod ( "hasCurrentUserSubscriptions" ) ; boolean isSubscriptionManagerRoleAllowed = isRoleAllowed ( method , UserRoleType . SUBSCRIPTION_MANAGER ) ; "<AssertPlaceHolder>" ; } isRoleAllowed ( java . lang . reflect . Method , org . oscm . internal . types . enumtypes . UserRoleType ) { javax . annotation . security . RolesAllowed rolesAllowed = method . getAnnotation ( javax . annotation . security . RolesAllowed . class ) ; if ( rolesAllowed == null ) { return true ; } for ( java . lang . String role : rolesAllowed . value ( ) ) { if ( role . equals ( roleType . name ( ) ) ) { return true ; } } return false ; }
|
org . junit . Assert . assertTrue ( isSubscriptionManagerRoleAllowed )
|
hasPermissionToTemplateModifyWhenUserIsShakedownAdminAndIsTestingMode ( ) { ch . puzzle . itc . mobiliar . business . security . control . ResourceEntity as = resourceEntityBuilder . mockAppServerEntity ( "as" , null , null , null ) ; when ( sessionContext . isCallerInRole ( ch . puzzle . itc . mobiliar . business . security . control . PermissionServiceTest . SHAKEDOWN_ADMIN ) ) . thenReturn ( true ) ; when ( sessionContext . getCallerPrincipal ( ) ) . thenReturn ( principal ) ; myRoles = new ch . puzzle . itc . mobiliar . business . security . control . HashMap ( ) ; ch . puzzle . itc . mobiliar . business . security . control . RestrictionEntity res = new ch . puzzle . itc . mobiliar . business . security . control . RestrictionEntity ( ) ; res . setAction ( Action . ALL ) ; myRoles . put ( ch . puzzle . itc . mobiliar . business . security . control . PermissionServiceTest . SHAKEDOWN_ADMIN , ch . puzzle . itc . mobiliar . business . security . control . Arrays . asList ( new ch . puzzle . itc . mobiliar . builders . RestrictionDTOBuilder ( ) . mockRestrictionDTO ( Permission . SHAKEDOWN_TEST_MODE , res ) ) ) ; permissionService . rolesWithRestrictions = myRoles ; boolean result = permissionService . hasPermissionToAddResourceTemplate ( as , true ) ; "<AssertPlaceHolder>" ; } hasPermissionToAddResourceTemplate ( java . lang . Integer , boolean ) { ch . puzzle . itc . mobiliar . business . resourcegroup . entity . ResourceEntity res = entityManager . find ( ch . puzzle . itc . mobiliar . business . resourcegroup . entity . ResourceEntity . class , resourceId ) ; return permissionService . hasPermissionToAddResourceTemplate ( res , testingMode ) ; }
|
org . junit . Assert . assertTrue ( result )
|
badValueOfReturnType ( ) { com . pholser . util . properties . BindingUntypedResourceBundlesToTypedInterfacesTest . BadValueOfTypeHaver . Thing thing = new com . pholser . util . properties . BindingUntypedResourceBundlesToTypedInterfacesTest . BadValueOfTypeHaver . Thing ( ) ; java . util . ResourceBundle bundle = bundleWith ( "bad.value.of.type" , thing ) ; com . pholser . util . properties . PropertyBinder < com . pholser . util . properties . BindingUntypedResourceBundlesToTypedInterfacesTest . BadValueOfTypeHaver > binder = com . pholser . util . properties . PropertyBinder . forType ( com . pholser . util . properties . BindingUntypedResourceBundlesToTypedInterfacesTest . BadValueOfTypeHaver . class ) ; com . pholser . util . properties . BindingUntypedResourceBundlesToTypedInterfacesTest . BadValueOfTypeHaver bound = binder . bind ( bundle ) ; "<AssertPlaceHolder>" ; } bind ( com . pholser . util . properties . PropertySource ) { return evaluate ( source ) ; }
|
org . junit . Assert . assertSame ( thing , bound . thing ( ) )
|
localName_contextItem_empty ( ) { final org . xmldb . api . base . ResourceSet result = org . exist . xquery . XQueryFunctionsTest . existEmbeddedServer . executeQuery ( ( "let<sp>$a<sp>:=<sp><a><b/></a>" + "return<sp>$a/b/c/fn:local-name()" ) ) ; final java . lang . String r = ( ( java . lang . String ) ( result . getResource ( 0 ) . getContent ( ) ) ) ; "<AssertPlaceHolder>" ; } getContent ( ) { if ( ( content ) != null ) { return new org . exist . xquery . value . StringValue ( content ) . getStringValue ( true ) ; } final java . lang . Object res = super . getContent ( ) ; if ( res != null ) { if ( res instanceof byte [ ] ) { return new java . lang . String ( ( ( byte [ ] ) ( res ) ) , UTF_8 ) ; } else { return res ; } } return null ; }
|
org . junit . Assert . assertEquals ( "" , r )
|
toPrimitiveByteForNumber ( ) { java . lang . Integer i = java . lang . Integer . valueOf ( 1 ) ; "<AssertPlaceHolder>" ; } toPrimitiveByte ( java . lang . Object ) { java . lang . Byte b = org . slim3 . util . ByteUtil . toByte ( o ) ; if ( b == null ) { return 0 ; } return b . byteValue ( ) ; }
|
org . junit . Assert . assertThat ( org . slim3 . util . ByteUtil . toPrimitiveByte ( i ) , org . hamcrest . CoreMatchers . is ( ( ( byte ) ( 1 ) ) ) )
|
_ ( ) { java . lang . String targetFileName = java . lang . String . format ( "adsWriteFailure_%s.log.%d" , "000" , 1234567890L ) ; "<AssertPlaceHolder>" ; } checkAcceptResult ( java . lang . String ) { java . io . File file = new java . io . File ( targetFileName ) ; file . deleteOnExit ( ) ; try { file . createNewFile ( ) ; com . fujitsu . dc . common . ads . AdsWriteFailureLogFilter filter = new com . fujitsu . dc . common . ads . AdsWriteFailureLogFilter ( "000" ) ; return filter . accept ( new java . io . File ( "." ) , targetFileName ) ; } finally { file . delete ( ) ; } }
|
org . junit . Assert . assertFalse ( checkAcceptResult ( targetFileName ) )
|
testFunction2 ( ) { net . objecthunter . exp4j . function . Function custom = new net . objecthunter . exp4j . function . Function ( "loglog" ) { @ net . objecthunter . exp4j . Override public double apply ( double ... values ) { return java . lang . Math . Math . log ( java . lang . Math . Math . log ( values [ 0 ] ) ) ; } } ; net . objecthunter . exp4j . Expression e = new net . objecthunter . exp4j . ExpressionBuilder ( "loglog(x)" ) . variables ( "x" ) . function ( custom ) . build ( ) . setVariable ( "x" , 1 ) ; double result = e . evaluate ( ) ; "<AssertPlaceHolder>" ; } evaluate ( ) { final net . objecthunter . exp4j . ArrayStack output = new net . objecthunter . exp4j . ArrayStack ( ) ; for ( int i = 0 ; i < ( tokens . length ) ; i ++ ) { net . objecthunter . exp4j . tokenizer . Token t = tokens [ i ] ; else if ( ( t . getType ( ) ) == ( net . objecthunter . exp4j . tokenizer . Token . TOKEN_VARIABLE ) ) { final java . lang . String name = ( ( net . objecthunter . exp4j . tokenizer . VariableToken ) ( t ) ) . getName ( ) ; final java . lang . Double value = this . variables . get ( name ) ; if ( value == null ) { throw new java . lang . IllegalArgumentException ( ( ( "No<sp>value<sp>has<sp>been<sp>set<sp>for<sp>the<sp>setVariable<sp>'" + name ) + "'." ) ) ; } output . push ( value ) ; } else if ( ( t . getType ( ) ) == ( net . objecthunter . exp4j . tokenizer . Token . TOKEN_OPERATOR ) ) { net . objecthunter . exp4j . tokenizer . OperatorToken op = ( ( net . objecthunter . exp4j . tokenizer . OperatorToken ) ( t ) ) ; if ( ( output . size ( ) ) < ( op . getOperator ( ) . getNumOperands ( ) ) ) { throw new java . lang . IllegalArgumentException ( ( ( "Invalid<sp>number<sp>of<sp>operands<sp>available<sp>for<sp>'" + ( op . getOperator ( ) . getSymbol ( ) ) ) + "'<sp>operator" ) ) ; } if ( ( op . getOperator ( ) . getNumOperands ( ) ) == 2 ) { double rightArg = output . pop ( ) ; double leftArg = output . pop ( ) ; output . push ( op . getOperator ( ) . apply ( leftArg , rightArg ) ) ; } else if ( ( op . getOperator ( ) . getNumOperands ( ) ) == 1 ) { double arg = output . pop ( ) ; output . push ( op . getOperator ( ) . apply ( arg ) ) ; } } else if ( ( t . getType ( ) ) == ( net . objecthunter . exp4j . tokenizer . Token . TOKEN_FUNCTION ) ) { net . objecthunter . exp4j . tokenizer . FunctionToken func = ( ( net . objecthunter . exp4j . tokenizer . FunctionToken ) ( t ) ) ; final int numArguments = func . getFunction ( ) . getNumArguments ( ) ; if ( ( output . size ( ) ) < numArguments ) { throw new java . lang . IllegalArgumentException ( ( ( "Invalid<sp>number<sp>of<sp>arguments<sp>available<sp>for<sp>'" + ( func . getFunction ( ) . getName ( ) ) ) + "'<sp>function" ) ) ; } double [ ] args = new double [ numArguments ] ; for ( int j = numArguments - 1 ; j >= 0 ; j -- ) { args [ j ] = output . pop ( ) ; } output . push ( func . getFunction ( ) . apply ( args ) ) ; } } if ( ( output . size ( ) ) > 1 ) { throw new java . lang . IllegalArgumentException ( "Invalid<sp>number<sp>of<sp>items<sp>on<sp>the<sp>output<sp>queue.<sp>Might<sp>be<sp>caused<sp>by<sp>an<sp>invalid<sp>number<sp>of<sp>arguments<sp>for<sp>a<sp>function." ) ; } return output . pop ( ) ; }
|
org . junit . Assert . assertTrue ( ( result == ( java . lang . Math . Math . log ( java . lang . Math . Math . log ( 1 ) ) ) ) )
|
testDynamicQueryByProjectionMissing ( ) { com . liferay . portal . kernel . dao . orm . DynamicQuery dynamicQuery = com . liferay . portal . kernel . dao . orm . DynamicQueryFactoryUtil . forClass ( com . liferay . portal . tools . service . builder . test . model . LVEntryVersion . class , _dynamicQueryClassLoader ) ; dynamicQuery . setProjection ( com . liferay . portal . kernel . dao . orm . ProjectionFactoryUtil . property ( "lvEntryVersionId" ) ) ; dynamicQuery . add ( com . liferay . portal . kernel . dao . orm . RestrictionsFactoryUtil . in ( "lvEntryVersionId" , new java . lang . Object [ ] { com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) } ) ) ; java . util . List < java . lang . Object > result = _persistence . findWithDynamicQuery ( dynamicQuery ) ; "<AssertPlaceHolder>" ; } size ( ) { if ( ( _workflowTaskAssignees ) != null ) { return _workflowTaskAssignees . size ( ) ; } return _kaleoTaskAssignmentInstanceLocalService . getKaleoTaskAssignmentInstancesCount ( _kaleoTaskInstanceToken . getKaleoTaskInstanceTokenId ( ) ) ; }
|
org . junit . Assert . assertEquals ( 0 , result . size ( ) )
|
whenCreatingAdvanceDockerClient_thenReturnInstance ( ) { com . github . dockerjava . core . DefaultDockerClientConfig config = com . github . dockerjava . core . DefaultDockerClientConfig . createDefaultConfigBuilder ( ) . withRegistryEmail ( "info@bealdung.com" ) . withRegistryUrl ( "register.bealdung.io/v2/" ) . withRegistryPassword ( "strongpassword" ) . withRegistryUsername ( "bealdung" ) . withDockerCertPath ( "/home/bealdung/public/.docker/certs" ) . withDockerConfig ( "/home/bealdung/public/.docker/" ) . withDockerTlsVerify ( "1" ) . withDockerHost ( "tcp://docker.beauldung.com:2376" ) . build ( ) ; com . github . dockerjava . api . DockerClient dockerClient = com . github . dockerjava . core . DockerClientBuilder . getInstance ( config ) . build ( ) ; "<AssertPlaceHolder>" ; } build ( ) { return new com . baeldung . creational . builder . BankAccount ( this ) ; }
|
org . junit . Assert . assertNotNull ( dockerClient )
|
testCompileVideo ( ) { com . bixly . pastevid . recorders . RecorderTest . log ( "compileVideo" ) ; com . bixly . pastevid . recorders . Recorder instance = new com . bixly . pastevid . recorders . Recorder ( new com . bixly . pastevid . recorders . RecorderTest . TestMeasurable ( ) ) ; instance . cleanAndCreateFiles ( ) ; instance . setCaptureRectangle ( new java . awt . Rectangle ( 200 , 100 ) ) ; instance . recordVideo ( ) ; while ( ( instance . getSecondsTime ( ) ) < 10 ) { } instance . stopVideo ( ) ; java . lang . Boolean expResult = true ; java . lang . Boolean result = instance . compileVideo ( ) ; "<AssertPlaceHolder>" ; } compileVideo ( ) { return videoRecorder . compileVideo ( ) ; }
|
org . junit . Assert . assertEquals ( expResult , result )
|
read ( ) { com . asakusafw . runtime . io . json . value . ByteOptionPropertyAdapter adapter = builder . build ( ) ; com . asakusafw . runtime . value . ByteOption option = new com . asakusafw . runtime . value . ByteOption ( ) ; adapter . read ( new com . asakusafw . runtime . io . json . value . MockValue ( 100 ) , option ) ; "<AssertPlaceHolder>" ; } is ( java . lang . String ) { com . asakusafw . dmdl . java . util . JavaName jn = com . asakusafw . dmdl . java . util . JavaName . of ( new com . asakusafw . dmdl . model . AstSimpleName ( null , name ) ) ; jn . addFirst ( "is" ) ; java . lang . Object result = invoke ( jn . toMemberName ( ) ) ; return ( ( java . lang . Boolean ) ( result ) ) ; }
|
org . junit . Assert . assertThat ( option , is ( new com . asakusafw . runtime . value . ByteOption ( ( ( byte ) ( 100 ) ) ) ) )
|
testLoopingParserIteration ( ) { org . petitparser . parser . combinators . SettableParser parser1 = undefined ( ) ; org . petitparser . parser . combinators . SettableParser parser2 = undefined ( ) ; org . petitparser . parser . combinators . SettableParser parser3 = undefined ( ) ; parser1 . set ( parser2 ) ; parser2 . set ( parser3 ) ; parser3 . set ( parser1 ) ; org . petitparser . utils . Mirror mirror = org . petitparser . utils . Mirror . of ( parser1 ) ; java . util . List < org . petitparser . parser . Parser > parsers = mirror . stream ( ) . collect ( java . util . stream . Collectors . toList ( ) ) ; "<AssertPlaceHolder>" ; } stream ( ) { return java . util . stream . StreamSupport . stream ( java . util . Spliterators . spliteratorUnknownSize ( iterator ( ) , ( ( java . util . Spliterator . DISTINCT ) | ( java . util . Spliterator . NONNULL ) ) ) , false ) ; }
|
org . junit . Assert . assertEquals ( java . util . Arrays . < org . petitparser . parser . Parser > asList ( parser1 , parser2 , parser3 ) , parsers )
|
testConvertToDatumDouble ( ) { double expected = 1234.5678 ; org . talend . daikon . avro . converter . AvroConverter < java . lang . Object , java . lang . Object > converter = org . talend . codegen . converter . IdentityConverter . getInstance ( ) ; double actual = ( ( java . lang . Double ) ( converter . convertToDatum ( expected ) ) ) ; "<AssertPlaceHolder>" ; } convertToDatum ( java . lang . String ) { return new java . math . BigDecimal ( value ) ; }
|
org . junit . Assert . assertEquals ( expected , actual , 0 )
|
testSetCallerMethodName ( ) { final org . bonitasoft . engine . queriablelogger . model . builder . SQueriableLogBuilder builder = fact . createNewInstance ( ) ; builder . callerMethodName ( "insertRecord" ) . rawMessage ( "successfully<sp>executed" ) . severity ( SQueriableLogSeverity . BUSINESS ) ; builder . actionType ( "variable_update" ) . actionScope ( "myVar" ) . actionStatus ( 1 ) ; final org . bonitasoft . engine . queriablelogger . model . SQueriableLog queriableLog = builder . done ( ) ; "<AssertPlaceHolder>" ; } getCallerMethodName ( ) { return callerMethodName ; }
|
org . junit . Assert . assertEquals ( "insertRecord" , queriableLog . getCallerMethodName ( ) )
|
messageModifiedByNextProcessorIsPropagated ( ) { org . mule . runtime . core . api . event . CoreEvent modifiedMessageEvent = org . mule . runtime . core . api . event . CoreEvent . builder ( initialEvent ) . message ( org . mule . runtime . core . internal . policy . AbstractPolicyProcessorTestCase . MESSAGE ) . build ( ) ; mockFlowReturningEvent ( modifiedMessageEvent ) ; when ( policy . getPolicyChain ( ) . apply ( any ( ) ) ) . thenAnswer ( ( invocation ) -> subscriberContext ( ) . flatMap ( ( ctx ) -> reactor . core . publisher . Mono . < org . mule . runtime . core . api . event . CoreEvent > from ( invocation . getArgument ( 0 ) ) . transform ( ctx . get ( POLICY_NEXT_OPERATION ) ) ) ) ; org . mule . runtime . core . api . event . CoreEvent resultEvent = reactor . core . publisher . Mono . just ( initialEvent ) . transform ( policyProcessor ) . block ( ) ; "<AssertPlaceHolder>" ; } getMessage ( ) { if ( ( java . lang . Boolean . valueOf ( java . lang . System . getProperty ( org . mule . runtime . module . artifact . api . classloader . exception . MULE_LOG_VERBOSE_CLASSLOADING ) ) ) || ( org . mule . runtime . module . artifact . api . classloader . exception . NotExportedClassException . logger . isTraceEnabled ( ) ) ) { return ( ( super . getMessage ( ) ) + ( java . lang . System . lineSeparator ( ) ) ) + ( filter . toString ( ) ) ; } else { return super . getMessage ( ) ; } }
|
org . junit . Assert . assertEquals ( resultEvent . getMessage ( ) , org . mule . runtime . core . internal . policy . AbstractPolicyProcessorTestCase . MESSAGE )
|
testSerializationEmpty ( ) { final com . logsniffer . fields . FieldsMap map = new com . logsniffer . fields . FieldsMap ( ) ; final java . lang . String jsonStr = mapper . writeValueAsString ( map ) ; LOGGER . info ( "Serialized<sp>{}<sp>to:<sp>{}" , map , jsonStr ) ; final net . sf . json . JSONObject parsedJson = net . sf . json . JSONObject . fromObject ( jsonStr ) ; "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertTrue ( parsedJson . isEmpty ( ) )
|
testWrite ( ) { org . apache . poi . hslf . record . SlideAtom sa = new org . apache . poi . hslf . record . SlideAtom ( org . apache . poi . hslf . record . TestSlideAtom . data_a , 0 , org . apache . poi . hslf . record . TestSlideAtom . data_a . length ) ; java . io . ByteArrayOutputStream baos = new java . io . ByteArrayOutputStream ( ) ; sa . writeOut ( baos ) ; "<AssertPlaceHolder>" ; } toByteArray ( ) { byte [ ] result = new byte [ ( ( org . apache . poi . util . LittleEndianConsts . INT_SIZE ) * 2 ) + ( _value . length ) ] ; org . apache . poi . util . LittleEndianByteArrayOutputStream bos = new org . apache . poi . util . LittleEndianByteArrayOutputStream ( result , 0 ) ; try { bos . writeInt ( ( ( org . apache . poi . util . LittleEndianConsts . INT_SIZE ) + ( _value . length ) ) ) ; bos . writeInt ( _format ) ; bos . write ( _value ) ; return result ; } finally { org . apache . poi . util . IOUtils . closeQuietly ( bos ) ; } }
|
org . junit . Assert . assertArrayEquals ( org . apache . poi . hslf . record . TestSlideAtom . data_a , baos . toByteArray ( ) )
|
deveObterProtocoloCancelamentoComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe310 . classes . nota . consulta . NFNotaConsultaRetorno consultaRetorno = new com . fincatto . documentofiscal . nfe310 . classes . nota . consulta . NFNotaConsultaRetorno ( ) ; final com . fincatto . documentofiscal . nfe310 . classes . evento . cancelamento . NFRetornoCancelamento protocoloCancelamento = new com . fincatto . documentofiscal . nfe310 . classes . evento . cancelamento . NFRetornoCancelamento ( ) ; consultaRetorno . setProtocoloCancelamento ( protocoloCancelamento ) ; "<AssertPlaceHolder>" ; } getProtocoloCancelamento ( ) { return this . protocoloCancelamento ; }
|
org . junit . Assert . assertEquals ( protocoloCancelamento , consultaRetorno . getProtocoloCancelamento ( ) )
|
testListAllConnections ( ) { com . streamreduce . core . model . Account nAccount = testUser . getAccount ( ) ; java . util . List < com . streamreduce . core . model . Connection > nConnections = connectionService . getConnections ( null , testUser ) ; for ( com . streamreduce . core . model . Connection connection : nConnections ) { "<AssertPlaceHolder>" ; } } getAccount ( ) { return account ; }
|
org . junit . Assert . assertTrue ( connection . getAccount ( ) . getId ( ) . equals ( nAccount . getId ( ) ) )
|
setTransitVlanId ( ) { flow . setTransitVlanId ( org . openkilda . messaging . command . Constants . transitVlanId ) ; "<AssertPlaceHolder>" ; } getTransitVlanId ( ) { org . junit . Assert . assertEquals ( org . openkilda . messaging . command . Constants . transitVlanId , flow . getTransitVlanId ( ) . intValue ( ) ) ; }
|
org . junit . Assert . assertEquals ( org . openkilda . messaging . command . Constants . transitVlanId , flow . getTransitVlanId ( ) . intValue ( ) )
|
testGetWhiteListMissingDir ( ) { java . io . File dir = new java . io . File ( "target" , java . util . UUID . randomUUID ( ) . toString ( ) ) . getAbsoluteFile ( ) ; "<AssertPlaceHolder>" ; } getWhiteList ( java . lang . String , java . lang . String ) { java . util . Set < java . lang . String > set = null ; java . io . File whiteListFile = new java . io . File ( configDir , com . streamsets . pipeline . BootstrapMain . WHITE_LIST_FILE ) . getAbsoluteFile ( ) ; if ( whiteListFile . exists ( ) ) { try ( java . io . InputStream is = new java . io . FileInputStream ( whiteListFile ) ) { java . util . Properties props = new java . util . Properties ( ) ; props . load ( is ) ; java . lang . String whiteList = props . getProperty ( property ) ; if ( whiteList == null ) { throw new java . lang . IllegalArgumentException ( java . lang . String . format ( com . streamsets . pipeline . BootstrapMain . WHITE_LIST_PROPERTY_MISSING_MSG , property , whiteListFile ) ) ; } whiteList = whiteList . trim ( ) ; if ( ! ( whiteList . equals ( com . streamsets . pipeline . BootstrapMain . ALL_VALUES ) ) ) { set = new java . util . HashSet ( ) ; for ( java . lang . String name : whiteList . split ( "," ) ) { name = name . trim ( ) ; if ( ! ( name . isEmpty ( ) ) ) { set . add ( ( "+" + ( name . trim ( ) ) ) ) ; } } } } catch ( java . io . IOException ex ) { throw new java . lang . IllegalArgumentException ( java . lang . String . format ( com . streamsets . pipeline . BootstrapMain . WHITE_LIST_COULD_NOT_LOAD_FILE_MSG , whiteListFile , ex . toString ( ) ) , ex ) ; } } return set ; }
|
org . junit . Assert . assertNull ( com . streamsets . pipeline . BootstrapMain . getWhiteList ( dir . getAbsolutePath ( ) , null ) )
|
Select_with_Resource_Binding_no_Match ( ) { com . mysema . rdfbean . model . SPARQLQuery query = connection . createQuery ( QueryLanguage . SPARQL , com . mysema . rdfbean . jena . SPARQLQueryTest . SELECT_LIMIT_10 ) ; query . setBinding ( "p" , new com . mysema . rdfbean . model . UID ( com . mysema . rdfbean . TEST . NS , ( "p" + ( java . lang . System . currentTimeMillis ( ) ) ) ) ) ; com . mysema . commons . lang . CloseableIterator < java . util . Map < java . lang . String , com . mysema . rdfbean . model . NODE > > rows = query . getTuples ( ) ; try { "<AssertPlaceHolder>" ; } finally { rows . close ( ) ; } } hasNext ( ) { try { return statements . hasNext ( ) ; } catch ( com . mysema . rdfbean . sesame . org . openrdf e ) { throw new com . mysema . rdfbean . model . RepositoryException ( e ) ; } }
|
org . junit . Assert . assertFalse ( rows . hasNext ( ) )
|
testInitDynAnyFromAny ( ) { java . lang . String msg ; org . jacorb . test . NonEmptyException type ; org . omg . CORBA . Any any = null ; org . omg . CORBA . TypeCode tc = null ; org . omg . DynamicAny . DynStruct dynAny = null ; org . omg . DynamicAny . DynStruct dynAny2 = null ; tc = org . jacorb . test . NonEmptyExceptionHelper . type ( ) ; dynAny = createDynAnyFromTypeCode ( tc ) ; type = new org . jacorb . test . NonEmptyException ( 1 , "Hello" ) ; any = orb . create_any ( ) ; org . jacorb . test . NonEmptyExceptionHelper . insert ( any , type ) ; dynAny2 = createDynAnyFromAny ( any ) ; msg = "Failed<sp>to<sp>initialize<sp>a<sp>DynAny<sp>object<sp>from<sp>an<sp>Any<sp>object<sp>" ; msg += "using<sp>the<sp>DynAny::from_any<sp>operation" ; try { dynAny . from_any ( any ) ; } catch ( java . lang . Throwable ex ) { org . junit . Assert . fail ( ( ( msg + ":<sp>" ) + ex ) ) ; } "<AssertPlaceHolder>" ; } equal ( java . lang . Object ) { if ( ( obj1 == null ) || ( ( current ) == null ) ) { throw new org . jacorb . collection . util . ObjectInvalid ( ) ; } check_object ( obj1 ) ; return ops . equal ( current , ( ( org . omg . CORBA . Any ) ( obj1 ) ) ) ; }
|
org . junit . Assert . assertTrue ( msg , dynAny . equal ( dynAny2 ) )
|
fieldAccess ( ) { final org . apache . johnzon . mapper . MapperTest . FieldAccess value = new org . apache . johnzon . mapper . MapperBuilder ( ) . setAccessModeName ( "field" ) . build ( ) . readObject ( new java . io . ByteArrayInputStream ( "{\"value\":1}" . getBytes ( ) ) , org . apache . johnzon . mapper . MapperTest . FieldAccess . class ) ; "<AssertPlaceHolder>" ; } readObject ( javax . json . JsonStructure , java . lang . reflect . Type ) { return new org . apache . johnzon . mapper . MappingParserImpl ( config , mappings , new javax . json . JsonReader ( ) { @ org . apache . johnzon . mapper . Override public javax . json . JsonStructure read ( ) { return value ; } @ org . apache . johnzon . mapper . Override public javax . json . JsonValue readValue ( ) { return value ; } @ org . apache . johnzon . mapper . Override public javax . json . JsonObject readObject ( ) { return value . asJsonObject ( ) ; } @ org . apache . johnzon . mapper . Override public javax . json . JsonArray readArray ( ) { return value . asJsonArray ( ) ; } @ org . apache . johnzon . mapper . Override public void close ( ) { } } , isDedup ( clazz ) ) . readObject ( clazz ) ; }
|
org . junit . Assert . assertEquals ( 1 , value . value )
|
createPrimeFaces ( ) { wizardAction . openNewLiferayJsfProjectWizard ( ) ; wizardAction . newLiferayJsf . prepareMaven ( project . getName ( ) , com . liferay . ide . ui . jsf . tests . PRIMEFACES ) ; wizardAction . finish ( ) ; jobAction . waitForNoRunningProjectBuildingJobs ( ) ; "<AssertPlaceHolder>" ; viewAction . project . closeAndDelete ( project . getName ( ) ) ; } 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 ( project . getName ( ) ) )
|
test12 ( ) { java . lang . String sql = "set<sp>TRANSACTION<sp>ISOLATION<sp>LEVEL<sp>SERIALIZABLE" ; com . alibaba . druid . sql . parser . SQLStatementParser parser = new com . alibaba . druid . sql . dialect . mysql . parser . MySqlStatementParser ( sql ) ; java . util . List < com . alibaba . druid . sql . ast . SQLStatement > stmtList = parser . parseStatementList ( ) ; com . alibaba . druid . sql . dialect . mysql . ast . statement . MySqlSetTransactionStatement x = ( ( com . alibaba . druid . sql . dialect . mysql . ast . statement . MySqlSetTransactionStatement ) ( stmtList . get ( 0 ) ) ) ; "<AssertPlaceHolder>" ; } getSession ( ) { return session ; }
|
org . junit . Assert . assertTrue ( ( ( x . getSession ( ) ) == null ) )
|
testCommit ( ) { org . gitlab4j . api . models . Commit commit = org . gitlab4j . api . JsonUtils . unmarshalResource ( org . gitlab4j . api . models . Commit . class , "commit.json" ) ; "<AssertPlaceHolder>" ; } compareJson ( T , java . lang . String ) { java . io . InputStreamReader reader = new java . io . InputStreamReader ( org . gitlab4j . api . TestGitLabApiBeans . class . getResourceAsStream ( filename ) ) ; return org . gitlab4j . api . JsonUtils . compareJson ( apiObject , reader ) ; }
|
org . junit . Assert . assertTrue ( org . gitlab4j . api . JsonUtils . compareJson ( commit , "commit.json" ) )
|
testAndMultiSubPath ( ) { java . util . List < java . lang . String > expected = java . util . Collections . emptyList ( ) ; org . eclipse . jgit . treewalk . filter . TreeFilter [ ] tf = new org . eclipse . jgit . treewalk . filter . TreeFilter [ ] { org . eclipse . jgit . treewalk . filter . PathFilter . create ( "sub1" ) , org . eclipse . jgit . treewalk . filter . PathFilter . create ( "sub2/suba" ) } ; java . util . List < java . lang . String > paths = getMatchingPaths ( treeId , org . eclipse . jgit . treewalk . filter . AndTreeFilter . create ( tf ) ) ; "<AssertPlaceHolder>" ; } create ( org . eclipse . jgit . treewalk . filter . TreeFilter [ ] ) { if ( ( list . length ) == 2 ) return org . eclipse . jgit . treewalk . filter . AndTreeFilter . create ( list [ 0 ] , list [ 1 ] ) ; if ( ( list . length ) < 2 ) throw new java . lang . IllegalArgumentException ( org . eclipse . jgit . internal . JGitText . get ( ) . atLeastTwoFiltersNeeded ) ; final org . eclipse . jgit . treewalk . filter . TreeFilter [ ] subfilters = new org . eclipse . jgit . treewalk . filter . TreeFilter [ list . length ] ; java . lang . System . arraycopy ( list , 0 , subfilters , 0 , list . length ) ; return new org . eclipse . jgit . treewalk . filter . AndTreeFilter . List ( subfilters ) ; }
|
org . junit . Assert . assertEquals ( expected , paths )
|
testHasScope_1 ( ) { org . jinstagram . auth . model . OAuthConfig fixture = new org . jinstagram . auth . model . OAuthConfig ( "key" , "secret" , "callback" , "scope" , "display" ) ; fixture . setRequestProxy ( org . jinstagram . auth . model . OAuthConfigTest . proxy ) ; boolean result = fixture . hasScope ( ) ; "<AssertPlaceHolder>" ; } hasScope ( ) { return ( scope ) != null ; }
|
org . junit . Assert . assertTrue ( result )
|
isTypeOf_fail ( ) { "<AssertPlaceHolder>" ; javax . lang . model . type . TypeMirror method = getOnlyElement ( typeElementFor ( com . google . auto . common . MoreTypesIsTypeOfTest . DeclaredVoid . class ) . getEnclosedElements ( ) ) . asType ( ) ; try { com . google . auto . common . MoreTypes . isTypeOf ( java . lang . String . class , method ) ; org . junit . Assert . fail ( ) ; } catch ( java . lang . IllegalArgumentException expected ) { } } isType ( javax . lang . model . type . TypeMirror ) { return type . accept ( com . google . auto . common . MoreTypes . IsTypeVisitor . INSTANCE , null ) ; }
|
org . junit . Assert . assertFalse ( com . google . auto . common . MoreTypes . isType ( getOnlyElement ( typeElementFor ( com . google . auto . common . MoreTypesIsTypeOfTest . DeclaredVoid . class ) . getEnclosedElements ( ) ) . asType ( ) ) )
|
testGetConnectionSourceTablePrefersNullSourceIfArgNull ( ) { java . util . List < java . io . Closeable > toClose = new java . util . ArrayList ( ) ; com . pentaho . big . data . bundles . impl . shim . hbase . connectionPool . HBaseConnectionHandle connectionHandle = hBaseConnectionPool . getConnectionHandle ( ) ; com . pentaho . big . data . bundles . impl . shim . hbase . HBaseConnectionWrapper connection = connectionHandle . getConnection ( ) ; toClose . add ( connectionHandle ) ; for ( int i = 0 ; i < 100 ; i ++ ) { toClose . add ( hBaseConnectionPool . getConnectionHandle ( "source" ) ) ; } for ( java . io . Closeable closeable : toClose ) { closeable . close ( ) ; } "<AssertPlaceHolder>" ; } getConnectionHandle ( java . lang . String ) { com . pentaho . big . data . bundles . impl . shim . hbase . connectionPool . HBaseConnectionPoolConnection result = findBestMatch ( sourceTable ) ; if ( result != null ) { availableConnections . remove ( result ) ; } else { result = create ( ) ; } if ( ( sourceTable != null ) && ( ! ( sourceTable . equals ( result . getSourceTable ( ) ) ) ) ) { try { result . newSourceTableInternal ( sourceTable ) ; } catch ( java . lang . Exception e ) { throw new java . io . IOException ( e ) ; } } inUseConnections . add ( result ) ; return new com . pentaho . big . data . bundles . impl . shim . hbase . connectionPool . HBaseConnectionHandleImpl ( this , result ) ; }
|
org . junit . Assert . assertEquals ( connection , hBaseConnectionPool . getConnectionHandle ( null ) . getConnection ( ) )
|
testSerialization ( ) { org . jfree . chart . renderer . category . LineAndShapeRenderer r1 = new org . jfree . chart . renderer . category . LineAndShapeRenderer ( ) ; org . jfree . chart . renderer . category . LineAndShapeRenderer r2 = ( ( org . jfree . chart . renderer . category . LineAndShapeRenderer ) ( org . jfree . chart . TestUtilities . serialised ( r1 ) ) ) ; "<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 ( r1 , r2 )
|
testHasBodyOnNewMessage ( ) { org . apache . qpid . jms . provider . amqp . message . AmqpJmsBytesMessageFacade amqpBytesMessageFacade = createNewBytesMessageFacade ( ) ; "<AssertPlaceHolder>" ; } hasBody ( ) { try { return ( getText ( ) ) != null ; } catch ( java . lang . Exception e ) { return false ; } }
|
org . junit . Assert . assertFalse ( amqpBytesMessageFacade . hasBody ( ) )
|
testFixedSizeChar ( ) { org . apache . tajo . catalog . Schema schema = org . apache . tajo . catalog . SchemaBuilder . builder ( ) . add ( "col1" , org . apache . tajo . catalog . CatalogUtil . newDataTypeWithLen ( Type . CHAR , 5 ) ) . build ( ) ; org . apache . tajo . engine . util . Tuple tuple = new org . apache . tajo . engine . util . VTuple ( 1 ) ; tuple . put ( new org . apache . tajo . datum . Datum [ ] { org . apache . tajo . datum . DatumFactory . createChar ( "abc
|
org . junit . Assert . assertEquals ( tuple , tuple2 )
|
testGetAvailableSignalsAbortedProcess ( ) { long processInstanceId = processService . startProcess ( deploymentUnit . getIdentifier ( ) , org . jbpm . kie . services . test . ProcessServiceImplPerProcessInstanceTest . PROCESS_ID_SIGNAL ) ; "<AssertPlaceHolder>" ; processService . abortProcessInstance ( processInstanceId ) ; try { processService . getAvailableSignals ( processInstanceId ) ; org . junit . Assert . fail ( "Getting<sp>available<sp>signals<sp>of<sp>already<sp>aborted<sp>process<sp>instance<sp>should<sp>throw<sp>ProcessInstanceNotFoundException." ) ; } catch ( org . jbpm . services . api . ProcessInstanceNotFoundException e ) { } } getIdentifier ( ) { return org . jbpm . services . task . test . TestStatefulKnowledgeSession . testSessionId ; }
|
org . junit . Assert . assertNotNull ( processInstanceId )
|
testRandomNBit ( ) { for ( int bits = 1 ; bits <= 32 ; bits ++ ) { byte [ ] data = org . jcodec . common . io . BitStreamTest . randomData ( ( bits * 10000 ) ) ; org . jcodec . common . io . BitReader in1 = reader ( data ) ; org . jcodec . common . io . DummyBitstreamReader in2 = new org . jcodec . common . io . DummyBitstreamReader ( new java . io . ByteArrayInputStream ( data ) ) ; for ( int i = 0 ; i < 80000 ; i ++ ) { int exp = in2 . readNBit ( bits ) ; int exp1 = in1 . readNBit ( bits ) ; "<AssertPlaceHolder>" ; } } } readNBit ( int ) { if ( n > 32 ) throw new java . lang . IllegalArgumentException ( "Can<sp>not<sp>read<sp>more<sp>then<sp>32<sp>bit" ) ; int val = 0 ; for ( int i = 0 ; i < n ; i ++ ) { val <<= 1 ; val |= read1BitInt ( ) ; } return val ; }
|
org . junit . Assert . assertEquals ( exp , exp1 )
|
equalsDiffStackTest ( ) { java . lang . StackTraceElement [ ] stack1 = java . lang . Thread . currentThread ( ) . getStackTrace ( ) ; org . threadly . util . debug . Profiler . Trace t1 = new org . threadly . util . debug . Profiler . Trace ( stack1 ) ; java . lang . StackTraceElement [ ] stack2 = new java . lang . StackTraceElement [ ( stack1 . length ) - 1 ] ; java . lang . System . arraycopy ( stack1 , 0 , stack2 , 0 , stack2 . length ) ; org . threadly . util . debug . Profiler . Trace t2 = new org . threadly . util . debug . Profiler . Trace ( stack2 ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == o ) { return true ; } else { try { org . threadly . util . debug . ComparableTrace t = ( ( org . threadly . util . debug . ComparableTrace ) ( o ) ) ; if ( ( t . hash ) != ( hash ) ) { return false ; } else { return java . util . Arrays . equals ( t . elements , elements ) ; } } catch ( java . lang . ClassCastException e ) { return false ; } } }
|
org . junit . Assert . assertFalse ( t1 . equals ( t2 ) )
|
testOk ( ) { new nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijstBuilder ( ) . build ( ) ; setup ( true ) ; "<AssertPlaceHolder>" ; } setup ( boolean ) { org . mockito . Mockito . when ( plControleBevatDatumIngangBlokkering . controleer ( org . mockito . Matchers . any ( nl . bzk . migratiebrp . synchronisatie . runtime . service . synchronisatie . verwerker . context . VerwerkingsContext . class ) , org . mockito . Matchers . any ( nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijst . class ) ) ) . thenReturn ( plControleBevatDatumIngangBlokkeringResult ) ; }
|
org . junit . Assert . assertTrue ( subject . controleer ( new nl . bzk . migratiebrp . synchronisatie . runtime . service . synchronisatie . verwerker . context . VerwerkingsContext ( null , null , null , null ) ) )
|
should_check_if_a_project_exists ( ) { org . kohsuke . github . GHRepository ghRepository = mock ( org . kohsuke . github . GHRepository . class ) ; org . kohsuke . github . GHUser ghUser = mock ( org . kohsuke . github . GHUser . class ) ; when ( ghUser . getLogin ( ) ) . thenReturn ( "test_user" ) ; when ( ghRepository . getOwner ( ) ) . thenReturn ( ghUser ) ; when ( ghRepository . getName ( ) ) . thenReturn ( "test_job" ) ; "<AssertPlaceHolder>" ; } projectExists ( org . kohsuke . github . GHRepository ) { final com . groupon . jenkins . dynamic . organizationcontainer . OrganizationContainer folder = this . organizationRepository . getOrganizationContainer ( repository . getOwner ( ) . getLogin ( ) ) ; return ( folder != null ) && ( ( folder . getItem ( repository . getName ( ) ) ) != null ) ; }
|
org . junit . Assert . assertTrue ( repo . projectExists ( ghRepository ) )
|
testSingleCacheCheckpointNode ( ) { await ( repository . pushAndUpdateHeads ( commits ( asLong ( ( g ) -> { g . add ( 1 , 2 , add ( 1 ) ) ; g . add ( 2 , 3 , add ( 1 ) ) ; g . add ( 3 , 4 , add ( 1 ) ) ; g . add ( 4 , 5 , add ( 1 ) ) ; g . add ( 5 , 6 , add ( 1 ) ) ; g . add ( 5 , 7 , add ( 1 ) ) ; } ) ) ) ) ; await ( repository . saveSnapshot ( 1L , emptyList ( ) ) ) ; java . util . List < io . datakernel . ot . TestOp > diffs = await ( checkout ( repository , io . datakernel . ot . OTRepositoryMySqlTest . SYSTEM , 5L ) ) ; await ( repository . saveSnapshot ( 5L , diffs ) ) ; await ( repository . cleanup ( 5L ) ) ; int result = io . datakernel . ot . OTRepositoryMySqlTest . apply ( await ( checkout ( repository , io . datakernel . ot . OTRepositoryMySqlTest . SYSTEM , 7L ) ) ) ; "<AssertPlaceHolder>" ; } checkout ( io . datakernel . ot . OTRepository , io . datakernel . ot . OTSystem , K ) { io . datakernel . util . ref . Ref < io . datakernel . ot . List < D > > cachedSnapshot = new io . datakernel . util . ref . Ref ( ) ; return repository . getHeads ( ) . then ( ( heads ) -> findParent ( repository , system , union ( heads , singleton ( commitId ) ) , io . datakernel . ot . DiffsReducer . toVoid ( ) , ( commit ) -> repository . loadSnapshot ( commit . getId ( ) ) . map ( ( maybeSnapshot ) -> ( cachedSnapshot . value = maybeSnapshot . orElse ( null ) ) != null ) ) . then ( ( findResult ) -> diff ( repository , system , findResult . commit , commitId ) . map ( ( diff ) -> concat ( cachedSnapshot . value , diff ) ) ) ) . whenComplete ( toLogger ( io . datakernel . ot . OTAlgorithms . logger , thisMethod ( ) , commitId ) ) ; }
|
org . junit . Assert . assertEquals ( 5 , result )
|
testSetting_CommonSourceDateFormat ( ) { java . lang . String actualCommand = com . thinkbiganalytics . kylo . nifi . teradata . tdch . core . processor . utils . TdchBuilderTest . getBaseTdchBuilder ( ) . setCommonSourceDateFormat ( "yyyy-MM-dd" ) . build ( ) ; java . lang . String expectedCommand = ( ( ( ( ( com . thinkbiganalytics . kylo . nifi . teradata . tdch . core . processor . utils . TdchBuilderTest . getBaseTdchCommand1 ( ) ) + ( com . thinkbiganalytics . kylo . nifi . teradata . tdch . core . processor . utils . TdchBuilderTest . SPACE ) ) + ( com . thinkbiganalytics . kylo . nifi . teradata . tdch . core . processor . utils . TdchBuilderTest . getBaseTdchCommand2 ( ) ) ) + ( com . thinkbiganalytics . kylo . nifi . teradata . tdch . core . processor . utils . TdchBuilderTest . SPACE ) ) + "-sourcedateformat<sp>\"yyyy-MM-dd\"" ) + ( com . thinkbiganalytics . kylo . nifi . teradata . tdch . core . processor . utils . TdchBuilderTest . SPACE ) ; "<AssertPlaceHolder>" ; } getBaseTdchCommand2 ( ) { return "-jobtype<sp>\"hive\"" ; }
|
org . junit . Assert . assertEquals ( expectedCommand , actualCommand )
|
AccessInstanceVariableConstant ( ) { java . lang . String fromClass = "Domain.Direct.Violating.AccessInstanceVariableConstant" ; java . lang . String toClass = "Technology.Direct.Dao.UserDAO" ; java . util . ArrayList < java . lang . String > typesToFind = new java . util . ArrayList < java . lang . String > ( ) ; typesToFind . add ( "Access" ) ; "<AssertPlaceHolder>" ; } areDependencyTypesDetected ( java . lang . String , java . lang . String , java . util . ArrayList , boolean ) { return areDependencyTypesDetected ( classFrom , classTo , dependencyTypes , "" , isIndirect ) ; }
|
org . junit . Assert . assertTrue ( areDependencyTypesDetected ( fromClass , toClass , typesToFind , false ) )
|
changeConfigurationRejectedVerifyReturnValue ( ) { when ( chargePointService . changeConfiguration ( any ( io . motown . ocpp . v12 . soap . chargepoint . ChangeConfigurationRequest . class ) , eq ( io . motown . ocpp . v12 . soap . chargepoint . CHARGING_STATION_ID . getId ( ) ) ) ) . thenReturn ( getChangeConfigurationResponse ( ConfigurationStatus . REJECTED ) ) ; boolean hasConfigurationChanged = client . changeConfiguration ( io . motown . ocpp . v12 . soap . chargepoint . CHARGING_STATION_ID , io . motown . ocpp . v12 . soap . chargepoint . CONFIGURATION_ITEM ) ; "<AssertPlaceHolder>" ; } changeConfiguration ( io . motown . ocpp . v15 . soap . chargepoint . ChargingStationId , io . motown . ocpp . v15 . soap . chargepoint . ConfigurationItem ) { checkNotNull ( id ) ; checkNotNull ( configurationItem ) ; final java . lang . String key = configurationItem . getKey ( ) ; final java . lang . String value = configurationItem . getValue ( ) ; io . motown . ocpp . v15 . soap . chargepoint . ChargePointService chargePointService = this . createChargingStationService ( id ) ; io . motown . ocpp . v15 . soap . chargepoint . ChangeConfigurationRequest request = new io . motown . ocpp . v15 . soap . chargepoint . ChangeConfigurationRequest ( ) ; request . setKey ( key ) ; request . setValue ( value ) ; io . motown . ocpp . v15 . soap . chargepoint . ChangeConfigurationResponse response = chargePointService . changeConfiguration ( request , id . getId ( ) ) ; boolean hasConfigurationChanged ; switch ( response . getStatus ( ) ) { case ACCEPTED : io . motown . ocpp . v15 . soap . chargepoint . ChargingStationOcpp15SoapClient . LOG . info ( "Configuration<sp>change<sp>of<sp>{}<sp>on<sp>{}<sp>has<sp>been<sp>accepted" , key , id ) ; hasConfigurationChanged = true ; break ; case REJECTED : io . motown . ocpp . v15 . soap . chargepoint . ChargingStationOcpp15SoapClient . LOG . info ( "Configuration<sp>change<sp>of<sp>{}<sp>on<sp>{}<sp>was<sp>rejected" , key , id ) ; hasConfigurationChanged = false ; break ; case NOT_SUPPORTED : io . motown . ocpp . v15 . soap . chargepoint . ChargingStationOcpp15SoapClient . LOG . info ( "Configuration<sp>change<sp>of<sp>{}<sp>on<sp>{}<sp>was<sp>not<sp>supported" , key , id ) ; hasConfigurationChanged = false ; break ; default : throw new java . lang . AssertionError ( ( "Configuration<sp>change<sp>returned<sp>unknown<sp>response<sp>status<sp>" + ( response . getStatus ( ) ) ) ) ; } return hasConfigurationChanged ; }
|
org . junit . Assert . assertFalse ( hasConfigurationChanged )
|
testStatusFilter ( ) { ru . codeinside . gws . api . impl . FileClientLog log = createClient ( 3L , "client" , "3" , true , false , "RESULT" ) ; log . log ( ru . codeinside . gws . core . ExceptionProducer . fire ( "foo3" ) ) ; log . close ( ) ; "<AssertPlaceHolder>" ; } createLogDir ( ru . codeinside . gws . api . impl . FileLog ) { java . lang . String logDir = log . getDirName ( ) ; int len = logDir . length ( ) ; return new java . io . File ( logs , ( ( ( ( ( "smev/" + ( logDir . charAt ( ( len - 2 ) ) ) ) + "/" ) + ( logDir . charAt ( ( len - 1 ) ) ) ) + "/" ) + logDir ) ) ; }
|
org . junit . Assert . assertFalse ( createLogDir ( log ) . exists ( ) )
|
testCalcErrorDiffValues ( ) { org . ebayopensource . turmeric . monitoring . provider . model . ExtendedErrorViewData errorViewData = new org . ebayopensource . turmeric . monitoring . provider . model . ExtendedErrorViewData ( ) ; errorViewData . setErrorCount1 ( 1L ) ; errorViewData . setErrorCount2 ( 2L ) ; errorViewData . setErrorCall1 ( 1L ) ; errorViewData . setErrorCall2 ( 2L ) ; errorViewData . setErrorCallRatio1 ( 1L ) ; errorViewData . setErrorCallRatio2 ( 2L ) ; service . calcErrorDiffValues ( errorViewData ) ; java . lang . Double expectedValue = java . lang . Double . valueOf ( 100.0 ) ; "<AssertPlaceHolder>" ; } getErrorDiff ( ) { return errorDiff ; }
|
org . junit . Assert . assertEquals ( expectedValue , java . lang . Double . valueOf ( errorViewData . getErrorDiff ( ) ) )
|
testGetAllEntityOrReferentToEntity ( ) { final java . util . Map < uk . gov . dstl . baleen . types . semantic . ReferenceTarget , uk . gov . dstl . baleen . types . semantic . Entity > referentMap = new java . util . HashMap ( ) ; final java . util . List < uk . gov . dstl . baleen . types . Base > list = uk . gov . dstl . baleen . uima . utils . ReferentUtils . getAllEntityOrReferentToEntity ( jCas , referentMap ) ; "<AssertPlaceHolder>" ; } size ( ) { return ( ( int ) ( flattened ( ) . count ( ) ) ) ; }
|
org . junit . Assert . assertEquals ( 5 , list . size ( ) )
|
testRemove ( ) { com . liferay . portal . kernel . model . Ticket newTicket = addTicket ( ) ; _persistence . remove ( newTicket ) ; com . liferay . portal . kernel . model . Ticket existingTicket = _persistence . fetchByPrimaryKey ( newTicket . getPrimaryKey ( ) ) ; "<AssertPlaceHolder>" ; } getPrimaryKey ( ) { return _amImageEntryId ; }
|
org . junit . Assert . assertNull ( existingTicket )
|
isoDateFormatWithLeadingNoFractions ( ) { java . util . Date date = dateFormat . parse ( "2011-04-21T10:13:40" ) ; "<AssertPlaceHolder>" ; } format ( java . util . Date ) { if ( date == null ) { return null ; } if ( date instanceof java . sql . Date ) { return format ( ( ( java . sql . Date ) ( date ) ) ) ; } else if ( date instanceof java . sql . Time ) { return format ( ( ( java . sql . Time ) ( date ) ) ) ; } else if ( date instanceof java . sql . Timestamp ) { return format ( ( ( java . sql . Timestamp ) ( date ) ) ) ; } else if ( date instanceof java . util . Date ) { return format ( new java . sql . Timestamp ( date . getTime ( ) ) ) ; } else { throw new java . lang . RuntimeException ( ( "Unknown<sp>type:<sp>" + ( date . getClass ( ) . getName ( ) ) ) ) ; } }
|
org . junit . Assert . assertEquals ( "2011-04-21T10:13:40" , dateFormat . format ( date ) )
|
testRulePlus ( ) { org . antlr . tool . Grammar g = new org . antlr . tool . Grammar ( ( "parser<sp>grammar<sp>P;\n" + ( "a<sp>:<sp>(b)+;\n" + "b<sp>:<sp>B;" ) ) ) ; java . lang . String expecting = "(rule<sp>a<sp>ARG<sp>RET<sp>scope<sp>(BLOCK<sp>(ALT<sp>(+<sp>(BLOCK<sp>(ALT<sp>b<sp><end-of-alt>)<sp><end-of-block>))<sp><end-of-alt>)<sp><end-of-block>)<sp><end-of-rule>)" ; java . lang . String found = g . getRule ( "a" ) . tree . toStringTree ( ) ; "<AssertPlaceHolder>" ; } toStringTree ( ) { if ( ( ( children ) == null ) || ( children . isEmpty ( ) ) ) { return this . toString ( ) ; } java . lang . StringBuilder buf = new java . lang . StringBuilder ( ) ; if ( ! ( isNil ( ) ) ) { buf . append ( "(" ) ; buf . append ( this . toString ( ) ) ; buf . append ( '<sp>' ) ; } for ( int i = 0 ; ( ( children ) != null ) && ( i < ( children . size ( ) ) ) ; i ++ ) { org . antlr . runtime . tree . Tree t = ( ( org . antlr . runtime . tree . Tree ) ( children . get ( i ) ) ) ; if ( i > 0 ) { buf . append ( '<sp>' ) ; } buf . append ( t . toStringTree ( ) ) ; } if ( ! ( isNil ( ) ) ) { buf . append ( ")" ) ; } return buf . toString ( ) ; }
|
org . junit . Assert . assertEquals ( expecting , found )
|
factoryBeanAvailableTest ( ) { factory . bean . ClientServicePrototypeFactoryBean factory = applicationContext . getBean ( factory . bean . ClientServicePrototypeFactoryBean . class ) ; factory . ClientService clientService = factory . getObject ( ) ; "<AssertPlaceHolder>" ; } getObject ( ) { logger . info ( "getObject<sp>called" ) ; factory . ClientService service = new factory . ClientService ( ) ; service . setClientDao ( factory . bean . ClientServicePrototypeFactoryBean . clientDao ) ; return service ; }
|
org . junit . Assert . assertNotNull ( clientService )
|
demonstrateHistoryAPI ( ) { java . util . List < com . blazegraph . gremlin . listener . BlazeGraphEdit > history = graph . history ( "a" ) . collect ( ) ; "<AssertPlaceHolder>" ; com . blazegraph . gremlin . structure . SampleCode . log . info ( ( ) -> history . stream ( ) ) ; } history ( java . util . List ) { final java . lang . StringBuilder vc = buildValuesClause ( new java . lang . StringBuilder ( ) , "?id" , uris ) ; final java . lang . String queryStr = HISTORY . replace ( com . blazegraph . gremlin . structure . SparqlGenerator . Templates . VALUES , vc . toString ( ) ) ; return queryStr ; }
|
org . junit . Assert . assertEquals ( 6 , history . size ( ) )
|
tesStringOneArgLocaleFrance_StringFormattedMessage ( ) { final java . lang . String testMsg = "Test<sp>message<sp>e<sp>=<sp>%+10.4f" ; final org . apache . logging . log4j . message . FormattedMessage msg = new org . apache . logging . log4j . message . FormattedMessage ( java . util . Locale . FRANCE , testMsg , Math . E ) ; final java . lang . String result = msg . getFormattedMessage ( ) ; final java . lang . String expected = "Test<sp>message<sp>e<sp>=<sp>+2,7183" ; "<AssertPlaceHolder>" ; } getFormattedMessage ( ) { return ( messageText ) != null ? messageText . toString ( ) : ( message ) == null ? null : message . getFormattedMessage ( ) ; }
|
org . junit . Assert . assertEquals ( expected , result )
|
testCollectionsSortSingleColumnPrimitiveAscending ( ) { com . liferay . portal . kernel . model . EmailAddress emailAddress1 = newEmailAddress ( 1 , newDate ( 0 , 1 , 2012 ) , "abc@liferay.com" ) ; com . liferay . portal . kernel . model . EmailAddress emailAddress2 = newEmailAddress ( 2 , newDate ( 0 , 2 , 2012 ) , "abc@liferay.com" ) ; java . util . List < com . liferay . portal . kernel . model . EmailAddress > expectedList = new java . util . ArrayList ( ) ; expectedList . add ( emailAddress1 ) ; expectedList . add ( emailAddress2 ) ; java . util . List < com . liferay . portal . kernel . model . EmailAddress > actualList = new java . util . ArrayList ( ) ; actualList . add ( emailAddress2 ) ; actualList . add ( emailAddress1 ) ; com . liferay . portal . kernel . util . OrderByComparator < com . liferay . portal . kernel . model . EmailAddress > obc = com . liferay . portal . kernel . util . OrderByComparatorFactoryUtil . create ( EmailAddressModelImpl . TABLE_NAME , "companyId" , true ) ; java . util . Collections . sort ( actualList , obc ) ; "<AssertPlaceHolder>" ; } toString ( ) { com . liferay . petra . string . StringBundler sb = new com . liferay . petra . string . StringBundler ( 23 ) ; sb . append ( ",<sp>width=" 1 ) ; sb . append ( uuid ) ; sb . append ( ",<sp>width=" 0 ) ; sb . append ( amImageEntryId ) ; sb . append ( ",<sp>groupId=" ) ; sb . append ( groupId ) ; sb . append ( ",<sp>companyId=" ) ; sb . append ( companyId ) ; sb . append ( ",<sp>createDate=" ) ; sb . append ( createDate ) ; sb . append ( ",<sp>configurationUuid=" ) ; sb . append ( configurationUuid ) ; sb . append ( ",<sp>fileVersionId=" ) ; sb . append ( fileVersionId ) ; sb . append ( ",<sp>mimeType=" ) ; sb . append ( mimeType ) ; sb . append ( ",<sp>height=" ) ; sb . append ( height ) ; sb . append ( ",<sp>width=" ) ; sb . append ( width ) ; sb . append ( ",<sp>size=" ) ; sb . append ( size ) ; sb . append ( "}" ) ; return sb . toString ( ) ; }
|
org . junit . Assert . assertEquals ( expectedList . toString ( ) , actualList . toString ( ) )
|
testGetParam ( ) { net . coobird . thumbnailator . ThumbnailParameter param = new net . coobird . thumbnailator . ThumbnailParameter ( new java . awt . Dimension ( 50 , 50 ) , null , true , "jpg" , net . coobird . thumbnailator . ThumbnailParameter . DEFAULT_FORMAT_TYPE , net . coobird . thumbnailator . ThumbnailParameter . DEFAULT_QUALITY , java . awt . image . BufferedImage . TYPE_INT_ARGB , null , net . coobird . thumbnailator . resizers . Resizers . PROGRESSIVE , true , true ) ; java . io . InputStream is = mock ( java . io . InputStream . class ) ; java . io . OutputStream os = mock ( java . io . OutputStream . class ) ; net . coobird . thumbnailator . tasks . StreamThumbnailTask task = new net . coobird . thumbnailator . tasks . StreamThumbnailTask ( param , is , os ) ; "<AssertPlaceHolder>" ; verifyZeroInteractions ( is ) ; verifyZeroInteractions ( os ) ; } getParam ( ) { return task . getParam ( ) ; }
|
org . junit . Assert . assertEquals ( param , task . getParam ( ) )
|
testMaxIn ( ) { java . util . Map < java . lang . String , java . lang . Object > map = com . google . common . collect . Maps . newHashMap ( ) ; java . util . List < java . lang . String > list = org . n3r . eql . util . C . classResourceToLines ( "order_no1.txt" ) ; map . put ( "list" , list ) ; long rows = new org . n3r . eql . Eql ( "mycat" ) . selectFirst ( "testMaxIn" ) . params ( map ) . execute ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return parts . size ( ) ; }
|
org . junit . Assert . assertTrue ( ( ( list . size ( ) ) >= rows ) )
|
sizeShouldBeZeroAfterInitialization ( ) { org . robobinding . widget . adapterview . LazyDataSetValueModelTest . DataSetValueModelUnderTest delegateValueModel = new org . robobinding . widget . adapterview . LazyDataSetValueModelTest . DataSetValueModelUnderTest ( org . robobinding . util . RandomValues . anyInteger ( ) ) ; org . robobinding . widget . adapterview . LazyDataSetValueModel valueModel = new org . robobinding . widget . adapterview . LazyDataSetValueModel ( delegateValueModel ) ; "<AssertPlaceHolder>" ; } size ( ) { return map . size ( ) ; }
|
org . junit . Assert . assertThat ( valueModel . size ( ) , org . hamcrest . CoreMatchers . is ( 0 ) )
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.