input
stringlengths 28
18.7k
| output
stringlengths 39
1.69k
|
|---|---|
shouldAcceptWhenOnlyWeightIsSet ( ) { node . setCondition ( null ) ; org . openstack . atlas . api . validation . results . ValidatorResult result = validator . validate ( node , org . openstack . atlas . api . validation . validators . PUT ) ; "<AssertPlaceHolder>" ; } passedValidation ( ) { return expectationResultList . isEmpty ( ) ; }
|
org . junit . Assert . assertTrue ( result . passedValidation ( ) )
|
statusRecordsTheStartTime ( ) { final java . time . LocalDateTime startTime = java . time . LocalDateTime . of ( 2017 , Month . APRIL , 1 , 19 , 9 ) ; final com . iluwatar . databus . data . StartingData startingData = new com . iluwatar . databus . data . StartingData ( startTime ) ; final com . iluwatar . databus . members . StatusMember statusMember = new com . iluwatar . databus . members . StatusMember ( 1 ) ; statusMember . accept ( startingData ) ; "<AssertPlaceHolder>" ; } getStarted ( ) { return started ; }
|
org . junit . Assert . assertEquals ( startTime , statusMember . getStarted ( ) )
|
testGetBasesForSample ( ) { java . lang . Long sampleID = 1L ; ca . corefacility . bioinformatics . irida . model . sample . Sample s = sampleService . read ( sampleID ) ; long bases = sampleService . getTotalBasesForSample ( s ) ; "<AssertPlaceHolder>" ; } getTotalBasesForSample ( ca . corefacility . bioinformatics . irida . model . sample . Sample ) { checkNotNull ( sample , "sample<sp>is<sp>null" ) ; long totalBases = 0 ; ca . corefacility . bioinformatics . irida . service . impl . sample . List < ca . corefacility . bioinformatics . irida . model . sample . SampleSequencingObjectJoin > sequencesForSample = ssoRepository . getSequencesForSample ( sample ) ; for ( ca . corefacility . bioinformatics . irida . model . sample . SampleSequencingObjectJoin join : sequencesForSample ) { for ( ca . corefacility . bioinformatics . irida . model . sequenceFile . SequenceFile sequenceFile : join . getObject ( ) . getFiles ( ) ) { final ca . corefacility . bioinformatics . irida . model . workflow . analysis . AnalysisFastQC sequenceFileFastQC = analysisRepository . findFastqcAnalysisForSequenceFile ( sequenceFile ) ; if ( ( sequenceFileFastQC == null ) || ( ( sequenceFileFastQC . getTotalBases ( ) ) == null ) ) { throw new ca . corefacility . bioinformatics . irida . exceptions . SequenceFileAnalysisException ( ( ( "Missing<sp>FastQC<sp>analysis<sp>for<sp>SequenceFile<sp>[" + ( sequenceFile . getId ( ) ) ) + "]" ) ) ; } totalBases += sequenceFileFastQC . getTotalBases ( ) ; } } return totalBases ; }
|
org . junit . Assert . assertEquals ( 1000 , bases )
|
testGetArtistHead ( ) { javax . ws . rs . core . Response response = spotify . getArtistHeadReq ( "0OdUWJ0sBjDrqHygGUXeCF" ) ; "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertEquals ( response . getStatus ( ) , 200 )
|
test_compare ( ) { comparisonStrategy = new net . codjo . test . release . util . comparisonstrategy . XmlComparisonStrategy ( toFile ( "FileAssertXml_expected.xml" ) , toFile ( "FileAssertXml.xml" ) ) ; "<AssertPlaceHolder>" ; } compare ( ) { org . apache . poi . hssf . usermodel . HSSFWorkbook expectedWorkbook = net . codjo . test . common . excel . ExcelUtil . loadWorkbook ( expectedFile ) ; org . apache . poi . hssf . usermodel . HSSFWorkbook actualWorkbook = net . codjo . test . common . excel . ExcelUtil . loadWorkbook ( actualFile ) ; final java . util . List < net . codjo . test . common . excel . matchers . SheetMatcher > sheetMatch = new java . util . ArrayList < net . codjo . test . common . excel . matchers . SheetMatcher > ( ) ; if ( styleTest ) { sheetMatch . addAll ( ExcelComparator . STYLE_MATCHER_LIST . values ( ) ) ; } return net . codjo . test . common . excel . ExcelComparator . execute ( expectedWorkbook , actualWorkbook , java . util . Collections . < java . lang . String > emptyList ( ) , sheetMatch ) ; }
|
org . junit . Assert . assertTrue ( comparisonStrategy . compare ( ) )
|
testReadWrite ( ) { org . apache . poi . hwpf . model . FileInformationBlock fib = _hWPFDocFixture . _fib ; byte [ ] tableStream = _hWPFDocFixture . _tableStream ; int listOffset = fib . getFcPlfLst ( ) ; int lfoOffset = fib . getFcPlfLfo ( ) ; int bLfoOffset = fib . getLcbPlfLfo ( ) ; if ( ( listOffset != 0 ) && ( bLfoOffset != 0 ) ) { org . apache . poi . hwpf . model . ListTables listTables = new org . apache . poi . hwpf . model . ListTables ( tableStream , listOffset , lfoOffset , bLfoOffset ) ; org . apache . poi . hwpf . model . io . HWPFFileSystem fileSys = new org . apache . poi . hwpf . model . io . HWPFFileSystem ( ) ; java . io . ByteArrayOutputStream tableOut = fileSys . getStream ( "1Table" ) ; listTables . writeListDataTo ( fib , tableOut ) ; listTables . writeListOverridesTo ( fib , tableOut ) ; org . apache . poi . hwpf . model . ListTables newTables = new org . apache . poi . hwpf . model . ListTables ( tableOut . toByteArray ( ) , fib . getFcPlfLst ( ) , fib . getFcPlfLfo ( ) , fib . getLcbPlfLfo ( ) ) ; "<AssertPlaceHolder>" ; } } getLcbPlfLfo ( ) { return _fieldHandler . getFieldSize ( FIBFieldHandler . PLFLFO ) ; }
|
org . junit . Assert . assertEquals ( listTables , newTables )
|
testNegativeAgainstUnsignedNone ( ) { java . lang . String query = "SELECT<sp>uint_key,<sp>ulong_key,<sp>string_key<sp>FROM<sp>HBASE_NATIVE<sp>WHERE<sp>ulong_key<sp><<sp>-1" ; java . lang . String url = ( ( ( ( PHOENIX_JDBC_URL ) + ";" ) + ( com . salesforce . phoenix . util . PhoenixRuntime . CURRENT_SCN_ATTRIB ) ) + "=" ) + ( ( com . salesforce . phoenix . end2end . NativeHBaseTypesTest . ts ) + 5 ) ; java . util . Properties props = new java . util . Properties ( TEST_PROPERTIES ) ; java . sql . Connection conn = java . sql . DriverManager . getConnection ( url , props ) ; try { java . sql . PreparedStatement statement = conn . prepareStatement ( query ) ; java . sql . ResultSet rs = statement . executeQuery ( ) ; "<AssertPlaceHolder>" ; } finally { conn . close ( ) ; } } next ( ) { if ( ! ( hasNext ( ) ) ) { throw new com . salesforce . phoenix . expression . visitor . NoSuchElementException ( ) ; } return children . get ( ( ( position ) ++ ) ) ; }
|
org . junit . Assert . assertFalse ( rs . next ( ) )
|
testRemoveInt ( ) { org . ccnx . ccn . impl . support . Log . info ( Log . FAC_TEST , "Starting<sp>testRemoveInt" ) ; org . ccnx . ccn . io . content . Collection cd = new org . ccnx . ccn . io . content . Collection ( ) ; for ( int i = 0 ; i < ( org . ccnx . ccn . io . content . CollectionTest . lrs . length ) ; ++ i ) { cd . add ( org . ccnx . ccn . io . content . CollectionTest . lrs [ i ] ) ; } cd . remove ( 0 ) ; "<AssertPlaceHolder>" ; org . ccnx . ccn . impl . support . Log . info ( Log . FAC_TEST , "Completed<sp>testRemoveInt" ) ; } get ( java . lang . Object ) { return _set . get ( key ) . getValue ( ) ; }
|
org . junit . Assert . assertEquals ( cd . get ( 0 ) , org . ccnx . ccn . io . content . CollectionTest . lrs [ 1 ] )
|
testArraySerialization ( ) { com . owlike . genson . Genson genson = createTimestampGenson ( java . time . LocalDateTime . class , TimestampFormat . ARRAY ) ; java . time . LocalDateTime dt = java . time . LocalDateTime . of ( 2011 , 11 , 10 , 9 , 8 , 7 , 1223 ) ; java . lang . String expectedJson = toJsonArray ( 2011 , 11 , 10 , 9 , 8 , 7 , 1223 ) ; "<AssertPlaceHolder>" ; } serialize ( java . lang . Object ) { com . owlike . genson . StringWriter sw = new com . owlike . genson . StringWriter ( ) ; com . owlike . genson . ObjectWriter writer = createWriter ( sw ) ; if ( object == null ) serializeNull ( writer ) ; else serialize ( object , object . getClass ( ) , writer , new com . owlike . genson . Context ( this ) ) ; return sw . toString ( ) ; }
|
org . junit . Assert . assertEquals ( expectedJson , genson . serialize ( dt ) )
|
testRemove ( ) { com . liferay . portal . workflow . kaleo . model . KaleoDefinitionVersion newKaleoDefinitionVersion = addKaleoDefinitionVersion ( ) ; _persistence . remove ( newKaleoDefinitionVersion ) ; com . liferay . portal . workflow . kaleo . model . KaleoDefinitionVersion existingKaleoDefinitionVersion = _persistence . fetchByPrimaryKey ( newKaleoDefinitionVersion . getPrimaryKey ( ) ) ; "<AssertPlaceHolder>" ; } getPrimaryKey ( ) { return _amImageEntryId ; }
|
org . junit . Assert . assertNull ( existingKaleoDefinitionVersion )
|
test_property_hashCode ( ) { org . joda . beans . sample . Person obj1 = new org . joda . beans . sample . Person ( ) ; org . joda . beans . sample . Person obj2 = new org . joda . beans . sample . Person ( ) ; org . joda . beans . Property < java . lang . String > p1 = obj1 . forename ( ) ; org . joda . beans . Property < java . lang . String > p2 = obj2 . forename ( ) ; obj1 . setForename ( "Stephen" ) ; obj2 . setForename ( "Stephen" ) ; "<AssertPlaceHolder>" ; } hashCode ( ) { return ( beanType . hashCode ( ) ) + 3 ; }
|
org . junit . Assert . assertEquals ( p1 . hashCode ( ) , p2 . hashCode ( ) )
|
testECDSAWrongPassphrase ( ) { java . security . KeyPair keyPair = instance . decodePrivateKey ( "src/test/resources/ecdsa_encrypted" , "wrong" ) ; "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertNull ( keyPair )
|
testWriteUsAsciiComposite ( ) { java . lang . String usAscii = "NettyRocks" ; io . netty . buffer . ByteBuf buf = io . netty . buffer . Unpooled . buffer ( 16 ) ; buf . writeBytes ( usAscii . getBytes ( CharsetUtil . US_ASCII ) ) ; io . netty . buffer . ByteBuf buf2 = io . netty . buffer . Unpooled . compositeBuffer ( ) . addComponent ( io . netty . buffer . Unpooled . buffer ( 8 ) ) . addComponent ( io . netty . buffer . Unpooled . buffer ( 24 ) ) ; buf2 . writeByte ( 1 ) ; io . netty . buffer . ByteBufUtil . writeAscii ( buf2 , usAscii ) ; "<AssertPlaceHolder>" ; buf . release ( ) ; buf2 . release ( ) ; } skipBytes ( int ) { int nBytes = java . lang . Math . min ( available ( ) , n ) ; buffer . skipBytes ( nBytes ) ; return nBytes ; }
|
org . junit . Assert . assertEquals ( buf , buf2 . skipBytes ( 1 ) )
|
testSetTextNotEditable ( ) { combo . setEditable ( false ) ; combo . setText ( "foo" ) ; "<AssertPlaceHolder>" ; } getText ( ) { checkWidget ( ) ; return getText ( 0 ) ; }
|
org . junit . Assert . assertEquals ( "foo" , combo . getText ( ) )
|
testSymmetric6 ( ) { com . oculusinfo . ml . feature . spatial . GeoSpatialFeature t1 = new com . oculusinfo . ml . feature . spatial . GeoSpatialFeature ( ) ; t1 . setValue ( ( - 82.8627519 ) , ( - 135.0 ) ) ; com . oculusinfo . ml . feature . spatial . GeoSpatialFeature t2 = new com . oculusinfo . ml . feature . spatial . GeoSpatialFeature ( ) ; t2 . setValue ( 82.8627519 , 45 ) ; com . oculusinfo . ml . feature . spatial . distance . EuclideanDistance d = new com . oculusinfo . ml . feature . spatial . distance . EuclideanDistance ( 1 ) ; double d1 = d . distance ( t1 , t2 ) ; double d2 = d . distance ( t2 , t1 ) ; "<AssertPlaceHolder>" ; } isEqual ( double , double ) { return ( java . lang . Math . abs ( ( d1 - d2 ) ) ) < ( epsilon ) ; }
|
org . junit . Assert . assertTrue ( isEqual ( d1 , d2 ) )
|
testAFileShouldNotHoldAnyDocument ( ) { info . novatec . testit . livingdoc . repository . List < java . lang . String > listing = repository . listDocuments ( createDocument ( root , "test.html" ) ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return messages . isEmpty ( ) ; }
|
org . junit . Assert . assertTrue ( listing . isEmpty ( ) )
|
testLower ( ) { jenkins . model . lazy . SortedIntList l = new jenkins . model . lazy . SortedIntList ( 5 ) ; l . add ( 0 ) ; l . add ( 5 ) ; l . add ( 10 ) ; "<AssertPlaceHolder>" ; } lower ( int ) { return Boundary . LOWER . apply ( find ( v ) ) ; }
|
org . junit . Assert . assertEquals ( 2 , l . lower ( Integer . MAX_VALUE ) )
|
testRetrieveActionsByServiceIDType ( ) { System . out . println ( "testRetrieveActionsByServiceIDType" ) ; createModel ( ) ; org . societies . personalisation . CAUI . api . model . UserIntentModelData modelData = modelManager . retrieveModel ( ) ; System . out . println ( ( "testRetrieveActionsByServiceIDType<sp>getActionModel<sp>" + ( modelData . getActionModel ( ) ) ) ) ; java . util . List < org . societies . personalisation . CAUI . api . model . IUserIntentAction > userActionList = modelManager . retrieveActionsByServiceType ( "css://nikosk@societies.org/HelloEarth" , "A-homePc" ) ; System . out . println ( ( "userActionList:" + userActionList ) ) ; "<AssertPlaceHolder>" ; org . societies . personalisation . CAUI . api . model . IUserIntentAction userActionA = userActionList . get ( 0 ) ; System . out . println ( ( "userAction<sp>service<sp>id<sp>:" + ( userActionA . getServiceID ( ) . getServiceInstanceIdentifier ( ) ) ) ) ; } size ( ) { for ( int k = 0 ; true ; k ++ ) { if ( ( ! ( secureStorage . contains ( org . societies . security . digsig . trust . Keywords . certificate ( k ) ) ) ) && ( ! ( secureStorage . contains ( org . societies . security . digsig . trust . Keywords . key ( k ) ) ) ) ) { return k ; } } }
|
org . junit . Assert . assertEquals ( 2 , userActionList . size ( ) )
|
testComplexRecord ( ) { io . cdap . cdap . api . data . schema . Schema complexSchema = io . cdap . cdap . api . data . schema . Schema . recordOf ( "record21:RECORD" 3 , Schema . Field . of ( "record21:RECORD" 0 , io . cdap . cdap . api . data . schema . Schema . mapOf ( io . cdap . cdap . api . data . schema . Schema . recordOf ( "i:INT" 1 , Schema . Field . of ( "record21:RECORD" 4 , io . cdap . cdap . api . data . schema . Schema . of ( Schema . Type . STRING ) ) , Schema . Field . of ( "y" , io . cdap . cdap . api . data . schema . Schema . arrayOf ( io . cdap . cdap . api . data . schema . Schema . of ( Schema . Type . STRING ) ) ) , Schema . Field . of ( "z" , io . cdap . cdap . api . data . schema . Schema . mapOf ( io . cdap . cdap . api . data . schema . Schema . of ( Schema . Type . BYTES ) , io . cdap . cdap . api . data . schema . Schema . of ( Schema . Type . DOUBLE ) ) ) ) , io . cdap . cdap . api . data . schema . Schema . arrayOf ( io . cdap . cdap . api . data . schema . Schema . recordOf ( "record22" , Schema . Field . of ( "a" , io . cdap . cdap . api . data . schema . Schema . mapOf ( io . cdap . cdap . api . data . schema . Schema . arrayOf ( io . cdap . cdap . api . data . schema . Schema . of ( Schema . Type . BYTES ) ) , io . cdap . cdap . api . data . schema . Schema . mapOf ( io . cdap . cdap . api . data . schema . Schema . of ( Schema . Type . BOOLEAN ) , io . cdap . cdap . api . data . schema . Schema . of ( Schema . Type . BYTES ) ) ) ) ) ) ) ) , Schema . Field . of ( "i" , io . cdap . cdap . api . data . schema . Schema . nullableOf ( io . cdap . cdap . api . data . schema . Schema . of ( Schema . Type . INT ) ) ) , Schema . Field . of ( "j" , io . cdap . cdap . api . data . schema . Schema . unionOf ( io . cdap . cdap . api . data . schema . Schema . of ( Schema . Type . INT ) , io . cdap . cdap . api . data . schema . Schema . of ( Schema . Type . LONG ) , io . cdap . cdap . api . data . schema . Schema . of ( Schema . Type . NULL ) ) ) ) ; io . cdap . cdap . api . data . schema . Schema anotherComplexSchema = io . cdap . cdap . api . data . schema . Schema . arrayOf ( io . cdap . cdap . api . data . schema . Schema . of ( Schema . Type . STRING ) ) ; io . cdap . cdap . api . data . schema . Schema superComplexSchema = io . cdap . cdap . api . data . schema . Schema . unionOf ( complexSchema , anotherComplexSchema , io . cdap . cdap . api . data . schema . Schema . of ( Schema . Type . NULL ) ) ; java . util . Set < java . lang . String > expected = com . google . common . collect . ImmutableSet . of ( "record21:RECORD" 0 , "record21:RECORD" 1 , "i:INT" 1 , "record21:RECORD" , "record21:RECORD" 4 , "record21:RECORD" 2 , "y" , "i:INT" 0 , "z" , "record21:RECORD" 8 , "record22" , "record21:RECORD" 7 , "a" , "record21:RECORD" 9 , "i" , "i:INT" , "j" , "j:UNION" , "record21:RECORD" 3 , "record21:RECORD" 6 ) ; io . cdap . cdap . data2 . metadata . indexer . SchemaIndexer indexer = new io . cdap . cdap . data2 . metadata . indexer . SchemaIndexer ( ) ; io . cdap . cdap . proto . id . DatasetId datasetInstance = new io . cdap . cdap . proto . id . DatasetId ( "record21:RECORD" 5 , "ds1" ) ; java . util . Set < java . lang . String > actual = indexer . getIndexes ( new io . cdap . cdap . data2 . metadata . dataset . MetadataEntry ( datasetInstance , io . cdap . cdap . data2 . metadata . indexer . SchemaIndexerTest . KEY , superComplexSchema . toString ( ) ) ) ; "<AssertPlaceHolder>" ; } addKeyPrefixAndPropertiesField ( java . util . Set ) { com . google . common . collect . ImmutableSet . Builder < java . lang . String > expected = com . google . common . collect . ImmutableSet . < java . lang . String > builder ( ) . addAll ( expectedValues ) ; for ( java . lang . String expectedValue : expectedValues ) { expected . add ( ( ( io . cdap . cdap . data2 . metadata . indexer . SchemaIndexerTest . KEY_PREFIX ) + expectedValue ) ) ; } expected . add ( "properties:schema" ) ; return expected . build ( ) ; }
|
org . junit . Assert . assertEquals ( addKeyPrefixAndPropertiesField ( expected ) , actual )
|
map_slot_3 ( ) { org . apache . jena . atlas . lib . tuple . TupleMap tmap = org . apache . jena . atlas . lib . tuple . TupleMap . create ( "POS" , "SPO" ) ; org . apache . jena . atlas . lib . tuple . Tuple < java . lang . String > tuple = org . apache . jena . atlas . lib . tuple . TupleFactory . tuple ( "P" , "O" , "S" ) ; org . apache . jena . atlas . lib . tuple . Tuple < java . lang . String > tuple1 = org . apache . jena . atlas . lib . tuple . TupleFactory . tuple ( tuple . get ( tmap . unmapIdx ( 0 ) ) , tuple . get ( tmap . unmapIdx ( 1 ) ) , tuple . get ( tmap . unmapIdx ( 2 ) ) ) ; org . apache . jena . atlas . lib . tuple . Tuple < java . lang . String > tuple2 = tmap . unmap ( tuple ) ; "<AssertPlaceHolder>" ; } unmap ( org . apache . jena . atlas . lib . tuple . Tuple ) { return org . apache . jena . atlas . lib . tuple . TupleMap . apply ( src , putTransform ) ; }
|
org . junit . Assert . assertEquals ( tuple2 , tuple1 )
|
testEmptyMailboxList ( ) { org . apache . james . mime4j . dom . address . MailboxList ml = new org . apache . james . mime4j . dom . address . MailboxList ( null , false ) ; "<AssertPlaceHolder>" ; try { ml . get ( ( - 1 ) ) ; org . junit . Assert . fail ( "Expected<sp>index<sp>out<sp>of<sp>bound<sp>exception!" ) ; } catch ( java . lang . IndexOutOfBoundsException e ) { } try { ml . get ( 0 ) ; org . junit . Assert . fail ( "Expected<sp>index<sp>out<sp>of<sp>bound<sp>exception!" ) ; } catch ( java . lang . IndexOutOfBoundsException e ) { } } size ( ) { return mailboxes . size ( ) ; }
|
org . junit . Assert . assertEquals ( 0 , ml . size ( ) )
|
testDeleteRule ( ) { System . out . println ( ( ( getTestTraceHead ( "[CygnusGroupingRules.deleteRule]" ) ) + "--------<sp>Deleting<sp>an<sp>existent<sp>rule<sp>works" ) ) ; java . util . ArrayList < java . lang . String > ruleFields = new java . util . ArrayList < java . lang . String > ( ) ; ruleFields . add ( "servicePath" ) ; java . lang . String ruleRegex = "/someServicePath" ; java . lang . String ruleDestination = "new_dest" ; java . lang . String ruleServicePath = "/new_svc_path" ; com . telefonica . iot . cygnus . interceptors . CygnusGroupingRules cygnusGroupingRules = createSingleRuleGroupingRules ( ruleFields , ruleRegex , ruleDestination , ruleServicePath , "deleteRule" ) ; cygnusGroupingRules . deleteRule ( 1 ) ; try { "<AssertPlaceHolder>" ; System . out . println ( ( ( getTestTraceHead ( "[CygnusGroupingRules.deleteRule]" ) ) + "-<sp>OK<sp>-<sp>Rule<sp>with<sp>ID<sp>1<sp>has<sp>been<sp>deleted" ) ) ; } catch ( java . lang . AssertionError e ) { System . out . println ( ( ( getTestTraceHead ( "[CygnusGroupingRules.deleteRule]" ) ) + "-<sp>FAIL<sp>-<sp>Rule<sp>with<sp>ID<sp>1<sp>has<sp>not<sp>been<sp>deleted" ) ) ; throw e ; } getRules ( ) { return groupingRules ; }
|
org . junit . Assert . assertTrue ( ( ( cygnusGroupingRules . getRules ( ) . size ( ) ) == 0 ) )
|
getAvailableLanguages ( ) { java . util . Set < java . lang . String > availableLanguages = org . mycore . services . i18n . MCRTranslation . getAvailableLanguages ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return oldIdentifiers . size ( ) ; }
|
org . junit . Assert . assertEquals ( 4 , availableLanguages . size ( ) )
|
testBlueOverHorizontal ( ) { expected = loadCompatibleImage ( org . jdesktop . swingx . graphics . BlendCompositeTest . class . getResourceAsStream ( "blue-over-horizontal.gif" ) ) ; java . awt . image . BufferedImage blue = org . jdesktop . swingx . util . GraphicsUtilities . createCompatibleImage ( org . jdesktop . swingx . graphics . BlendCompositeTest . VERTICAL_IMAGE ) ; java . awt . Graphics2D g = blue . createGraphics ( ) ; try { g . setColor ( Color . BLUE ) ; g . fillRect ( 0 , 0 , blue . getWidth ( ) , blue . getHeight ( ) ) ; } finally { g . dispose ( ) ; } blend ( org . jdesktop . swingx . graphics . BlendCompositeTest . HORIZONTAL_IMAGE , BlendComposite . Blue , blue ) ; "<AssertPlaceHolder>" ; } getPixels ( java . awt . image . BufferedImage , int , int , int , int , int [ ] ) { if ( ( w == 0 ) || ( h == 0 ) ) { return new int [ 0 ] ; } if ( pixels == null ) { pixels = new int [ w * h ] ; } else if ( ( pixels . length ) < ( w * h ) ) { throw new java . lang . IllegalArgumentException ( ( "pixels<sp>array<sp>must<sp>have<sp>a<sp>length" + "<sp>>=<sp>w*h" ) ) ; } int imageType = img . getType ( ) ; if ( ( imageType == ( java . awt . image . BufferedImage . TYPE_INT_ARGB ) ) || ( imageType == ( java . awt . image . BufferedImage . TYPE_INT_RGB ) ) ) { java . awt . image . Raster raster = img . getRaster ( ) ; return ( ( int [ ] ) ( raster . getDataElements ( x , y , w , h , pixels ) ) ) ; } return img . getRGB ( x , y , w , h , pixels , 0 , w ) ; }
|
org . junit . Assert . assertArrayEquals ( getPixels ( expected , 0 , 0 , expected . getWidth ( ) , expected . getHeight ( ) , null ) , getPixels ( actual , 0 , 0 , actual . getWidth ( ) , actual . getHeight ( ) , null ) )
|
testReadFileContents ( ) { java . lang . String expectedContents = "Hello,<sp>world!\nThis<sp>is<sp>a<sp>test<sp>with<sp>Unicode<sp>✓." ; java . lang . String testFile = com . hazelcast . kubernetes . HazelcastKubernetesDiscoveryStrategyTest . createTestFile ( expectedContents ) ; java . lang . String actualContents = com . hazelcast . kubernetes . HazelcastKubernetesDiscoveryStrategy . readFileContents ( testFile ) ; "<AssertPlaceHolder>" ; } readFileContents ( java . lang . String ) { java . io . InputStream is = null ; try { java . io . File file = new java . io . File ( tokenFile ) ; byte [ ] data = new byte [ ( ( int ) ( file . length ( ) ) ) ] ; is = new java . io . FileInputStream ( file ) ; is . read ( data ) ; return new java . lang . String ( data , "UTF-8" ) ; } catch ( java . io . IOException e ) { throw new java . lang . RuntimeException ( "Could<sp>not<sp>get<sp>token<sp>file" , e ) ; } finally { com . hazelcast . nio . IOUtil . closeResource ( is ) ; } }
|
org . junit . Assert . assertEquals ( expectedContents , actualContents )
|
testGetArgumentDesc ( ) { System . out . println ( "getArgumentDesc" ) ; kg . apc . jmeter . functions . IsDefined instance = new kg . apc . jmeter . functions . IsDefined ( ) ; java . util . List result = instance . getArgumentDesc ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return graphRow . size ( ) ; }
|
org . junit . Assert . assertEquals ( 1 , result . size ( ) )
|
validate_returnsTrue ( ) { boolean result = confirmation . validate ( ) ; "<AssertPlaceHolder>" ; } validate ( ) { return true ; }
|
org . junit . Assert . assertThat ( result , org . hamcrest . core . Is . is ( true ) )
|
test_collectFromMailContent ( ) { final de . metas . inbound . mail . MailContent expected = de . metas . inbound . mail . MailContent . builder ( ) . text ( "test<sp>text" ) . html ( "<div>some<sp>html</div>" ) . build ( ) ; final de . metas . inbound . mail . MailContent actual = de . metas . inbound . mail . MailContentCollector . newInstance ( ) . collectObject ( expected ) . toMailContent ( ) ; "<AssertPlaceHolder>" ; } toMailContent ( ) { return de . metas . inbound . mail . MailContent . builder ( ) . text ( text . toString ( ) ) . html ( html . toString ( ) ) . attachments ( attachments ) . build ( ) ; }
|
org . junit . Assert . assertEquals ( expected , actual )
|
testResumeOK ( ) { net . holmes . core . business . media . MediaManager mediaManager = createMock ( net . holmes . core . business . media . MediaManager . class ) ; net . holmes . core . business . streaming . StreamingManager streamingManager = createMock ( net . holmes . core . business . streaming . StreamingManager . class ) ; streamingManager . resume ( eq ( "deviceId" ) ) ; expectLastCall ( ) . atLeastOnce ( ) ; replay ( mediaManager , streamingManager ) ; net . holmes . core . backend . handler . StreamingHandler streamingHandler = new net . holmes . core . backend . handler . StreamingHandler ( mediaManager , streamingManager ) ; java . lang . String result = streamingHandler . resume ( "deviceId" ) ; "<AssertPlaceHolder>" ; verify ( mediaManager , streamingManager ) ; } resume ( java . lang . String ) { try { streamingManager . resume ( deviceId ) ; } catch ( net . holmes . core . business . streaming . device . UnknownDeviceException e ) { net . holmes . core . backend . handler . StreamingHandler . LOGGER . error ( e . getMessage ( ) , e ) ; return e . getMessage ( ) ; } return null ; }
|
org . junit . Assert . assertNull ( result )
|
testToStringWithoutWipVersion ( ) { java . lang . String componentVersion = "8.0.6-alpha" ; int wineryVersion = 1 ; int wipVersion = 0 ; org . eclipse . winery . common . version . WineryVersion v = new org . eclipse . winery . common . version . WineryVersion ( componentVersion , wineryVersion , wipVersion ) ; java . lang . String expected = ( ( componentVersion + ( WineryVersion . WINERY_VERSION_SEPARATOR ) ) + ( WineryVersion . WINERY_VERSION_PREFIX ) ) + wineryVersion ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( ( ( ( ( "PropertyKV{" + "key='" ) + ( key ) ) + '\'' ) + ",<sp>value='" ) + ( value ) ) + '\'' ) + '}' ; }
|
org . junit . Assert . assertEquals ( expected , v . toString ( ) )
|
testNullToBoolean ( ) { boolean b = converter . convertTo ( boolean . class , null ) ; "<AssertPlaceHolder>" ; } convertTo ( java . lang . Class , java . lang . Object ) { return convertTo ( type , null , value ) ; }
|
org . junit . Assert . assertFalse ( b )
|
testFetchByPrimaryKeysWithNoPrimaryKeys ( ) { java . util . Set < java . io . Serializable > primaryKeys = new java . util . HashSet < java . io . Serializable > ( ) ; java . util . Map < java . io . Serializable , com . liferay . journal . model . JournalArticleLocalization > journalArticleLocalizations = _persistence . fetchByPrimaryKeys ( primaryKeys ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return _portalCacheListeners . isEmpty ( ) ; }
|
org . junit . Assert . assertTrue ( journalArticleLocalizations . isEmpty ( ) )
|
handlesManyLargeMessages ( ) { System . out . println ( "handlesManyLargeMessages" ) ; rx . Scheduler scheduler = com . github . davidmoten . rx . internal . operators . OperatorBufferToFileTest . createSingleThreadScheduler ( ) ; com . github . davidmoten . rx . buffertofile . DataSerializer < java . lang . Integer > serializer = com . github . davidmoten . rx . internal . operators . OperatorBufferToFileTest . createLargeMessageSerializer ( ) ; int max = 100 ; int last = rx . Observable . range ( 1 , max ) . compose ( com . github . davidmoten . rx . Transformers . onBackpressureBufferToFile ( serializer , scheduler ) ) . doOnNext ( new rx . functions . Action1 < java . lang . Object > ( ) { int count = 0 ; @ com . github . davidmoten . rx . internal . operators . Override public void call ( java . lang . Object t ) { ( count ) ++ ; if ( ( count ) < 3 ) { try { java . lang . Thread . sleep ( 1000 ) ; } catch ( java . lang . InterruptedException e ) { } } } } ) . last ( ) . toBlocking ( ) . single ( ) ; "<AssertPlaceHolder>" ; com . github . davidmoten . rx . internal . operators . OperatorBufferToFileTest . waitUntilWorkCompleted ( scheduler ) ; } call ( java . lang . Throwable ) { return t instanceof java . lang . IllegalArgumentException ; }
|
org . junit . Assert . assertEquals ( max , last )
|
testCannotConvert ( ) { java . lang . Object result = com . orientechnologies . orient . core . metadata . schema . OType . convert ( true , com . orientechnologies . orient . core . metadata . schema . Long . class ) ; "<AssertPlaceHolder>" ; } convert ( java . lang . Object , java . lang . Class ) { if ( iValue == null ) return null ; if ( iTargetClass == null ) return iValue ; if ( iValue . getClass ( ) . equals ( iTargetClass ) ) return iValue ; if ( iTargetClass . isAssignableFrom ( iValue . getClass ( ) ) ) return iValue ; try { if ( ( iValue instanceof com . orientechnologies . common . types . OBinary ) && ( iTargetClass . isAssignableFrom ( byte [ ] . class ) ) ) return ( ( com . orientechnologies . common . types . OBinary ) ( iValue ) ) . toByteArray ( ) ; else if ( byte [ ] . class . isAssignableFrom ( iTargetClass ) ) { return com . orientechnologies . orient . core . serialization . serializer . OStringSerializerHelper . getBinaryContent ( iValue ) ; } else if ( byte [ ] . class . isAssignableFrom ( iValue . getClass ( ) ) ) { return iValue ; } else if ( iTargetClass . isEnum ( ) ) { if ( iValue instanceof java . lang . Number ) return ( ( java . lang . Class < java . lang . Enum > ) ( iTargetClass ) ) . getEnumConstants ( ) [ ( ( java . lang . Number ) ( iValue ) ) . intValue ( ) ] ; return java . lang . Enum . valueOf ( ( ( java . lang . Class < java . lang . Enum > ) ( iTargetClass ) ) , iValue . toString ( ) ) ; } else if ( ( iTargetClass . equals ( Byte . TYPE ) ) || ( iTargetClass . equals ( com . orientechnologies . orient . core . metadata . schema . Byte . class ) ) ) { if ( iValue instanceof java . lang . Byte ) return iValue ; else if ( iValue instanceof java . lang . String ) return java . lang . Byte . parseByte ( ( ( java . lang . String ) ( iValue ) ) ) ; else return ( ( java . lang . Number ) ( iValue ) ) . byteValue ( ) ; } else if ( ( iTargetClass . equals ( Short . TYPE ) ) || ( iTargetClass . equals ( com . orientechnologies . orient . core . metadata . schema . Short . class ) ) ) { if ( iValue instanceof java . lang . Short ) return iValue ; else if ( iValue instanceof java . lang . String ) return java . lang . Short . parseShort ( ( ( java . lang . String ) ( iValue ) ) ) ; else return ( ( java . lang . Number ) ( iValue ) ) . shortValue ( ) ; } else if ( ( iTargetClass . equals ( Integer . TYPE ) ) || ( iTargetClass . equals ( com . orientechnologies . orient . core . metadata . schema . Integer . class ) ) ) { if ( iValue instanceof java . lang . Integer ) return iValue ; else if ( iValue instanceof java . lang . String ) { if ( iValue . toString ( ) . equals ( "" ) ) { return null ; } return java . lang . Integer . parseInt ( ( ( java . lang . String ) ( iValue ) ) ) ; } else return ( ( java . lang . Number ) ( iValue ) ) . intValue ( ) ; } else if ( ( iTargetClass . equals ( Long . TYPE ) ) || ( iTargetClass . equals ( com . orientechnologies . orient . core . metadata . schema . Long . class ) ) ) { if ( iValue instanceof java . lang . Long ) return iValue ; else if ( iValue instanceof java . lang . String ) return java . lang . Long . parseLong ( ( ( java . lang . String ) ( iValue ) ) ) ; else if ( iValue instanceof java . util . Date ) return ( ( java . util . Date ) ( iValue ) ) . getTime ( ) ; else return ( ( java . lang . Number ) ( iValue ) ) . longValue ( ) ; } else if ( ( iTargetClass . equals ( Float . TYPE ) ) || ( iTargetClass . equals ( com . orientechnologies . orient . core . metadata . schema . Float . class ) ) ) { if ( iValue instanceof java . lang . Float ) return iValue ; else if ( iValue instanceof java . lang . String ) return java . lang . Float . parseFloat ( ( ( java . lang . String ) ( iValue ) ) ) ; else return ( ( java . lang . Number ) ( iValue ) ) . floatValue ( ) ; } else if ( iTargetClass . equals ( java . math . BigDecimal . class ) ) { if ( iValue instanceof java . lang . String ) return new java . math . BigDecimal ( ( ( java . lang . String ) ( iValue ) ) ) ; else if ( iValue instanceof java . lang . Number ) return new java . math . BigDecimal ( iValue . toString ( ) ) ; } else if ( ( iTargetClass . equals ( Double . TYPE ) ) || ( iTargetClass . equals ( com . orientechnologies . orient
|
org . junit . Assert . assertEquals ( result , null )
|
testIndexOf_02_TinyData ( ) { org . riversun . finbin . BinarySearcher bs = new org . riversun . finbin . BinarySearcher ( ) ; byte [ ] srcBytes = getBytes ( "hello<sp>world" ) ; java . lang . String searchText = "world" ; byte [ ] searchBytes = getBytes ( searchText ) ; final int expected = 6 ; final int resultVal = bs . indexOf ( srcBytes , searchBytes ) ; "<AssertPlaceHolder>" ; } indexOf ( byte [ ] , byte [ ] ) { final int startIndex = 0 ; final int endIndex = ( srcBytes . length ) - 1 ; return indexOf ( srcBytes , searchBytes , startIndex , endIndex ) ; }
|
org . junit . Assert . assertEquals ( expected , resultVal )
|
checkDate7 ( ) { char y0 = '2' ; char y1 = '1' ; char y2 = '0' ; char y3 = '0' ; char M0 = '0' ; char M1 = '
|
org . junit . Assert . assertEquals ( false , retval )
|
write ( ) { com . asakusafw . runtime . value . FloatOption option = new com . asakusafw . runtime . value . FloatOption ( ) ; option . modify ( 100 ) ; com . asakusafw . runtime . value . FloatOption restored = restore ( option ) ; "<AssertPlaceHolder>" ; } get ( ) { if ( canGet ) { return next ; } throw new java . io . IOException ( ) ; }
|
org . junit . Assert . assertThat ( restored . get ( ) , is ( option . get ( ) ) )
|
testCustomSuffixWithoutSeparator ( ) { testHandler = new org . apache . juli . FileHandler ( this . getTemporaryDirectory ( ) . toString ( ) , "juli." , "log" ) ; java . io . File logFile = new java . io . File ( this . getTemporaryDirectory ( ) , "juli.log" ) ; "<AssertPlaceHolder>" ; } exists ( ) { return war . exists ( ) ; }
|
org . junit . Assert . assertTrue ( logFile . exists ( ) )
|
testEasyrecDataModel_getNumItems ( ) { org . easyrec . mahout . model . EasyrecDataModel easyrecDataModel = new org . easyrec . mahout . model . EasyrecDataModel ( org . easyrec . mahout . EasyrecDataModelTest . TENANT_ID , org . easyrec . mahout . EasyrecDataModelTest . RATE_ACTION_TYPE_ID , org . easyrec . mahout . EasyrecDataModelTest . HAS_RATING_VALUES , mahoutDataModelMappingDAO ) ; int numberOfItems = easyrecDataModel . getNumItems ( ) ; "<AssertPlaceHolder>" ; } getNumItems ( ) { return inMemoryDelegate . getNumItems ( ) ; }
|
org . junit . Assert . assertEquals ( 3 , numberOfItems )
|
test006_Disconnect ( ) { locator . connectServer ( ) ; locator . disconnect ( ) ; "<AssertPlaceHolder>" ; } isConnected ( ) { if ( ( ( services ) == null ) || ( ( servicesDispatch ) == null ) ) { return false ; } try { servicesDispatch . queryInterface ( IJIDispatch . IID ) ; return true ; } catch ( org . jinterop . dcom . common . JIException e ) { if ( ( e . getErrorCode ( ) ) == - 2147352577 ) { cn . chenlichao . wmi4j . SWbemLocator . logger . debug ( "Connection<sp>has<sp>been<sp>disconnected." ) ; return false ; } else { throw new java . lang . IllegalStateException ( ) ; } } }
|
org . junit . Assert . assertFalse ( locator . isConnected ( ) )
|
testPredict ( ) { logger . info ( "testPredict" ) ; com . datumbox . framework . common . Configuration configuration = getConfiguration ( ) ; com . datumbox . framework . core . common . dataobjects . Dataframe [ ] data = com . datumbox . framework . core . Datasets . carsNumeric ( configuration ) ; com . datumbox . framework . core . common . dataobjects . Dataframe trainingData = data [ 0 ] ; com . datumbox . framework . core . common . dataobjects . Dataframe validationData = data [ 1 ] ; java . lang . String storageName = this . getClass ( ) . getSimpleName ( ) ; com . datumbox . framework . core . machinelearning . classification . BinarizedNaiveBayes instance = com . datumbox . framework . core . machinelearning . MLBuilder . create ( new com . datumbox . framework . core . machinelearning . classification . BinarizedNaiveBayes . TrainingParameters ( ) , configuration ) ; instance . fit ( trainingData ) ; instance . save ( storageName ) ; instance . close ( ) ; instance = com . datumbox . framework . core . machinelearning . MLBuilder . load ( com . datumbox . framework . core . machinelearning . classification . BinarizedNaiveBayes . class , storageName , configuration ) ; instance . predict ( validationData ) ; java . util . Map < java . lang . Integer , java . lang . Object > expResult = new java . util . HashMap ( ) ; java . util . Map < java . lang . Integer , java . lang . Object > result = new java . util . HashMap ( ) ; for ( Map . Entry < java . lang . Integer , com . datumbox . framework . core . common . dataobjects . Record > e : validationData . entries ( ) ) { java . lang . Integer rId = e . getKey ( ) ; com . datumbox . framework . core . common . dataobjects . Record r = e . getValue ( ) ; expResult . put ( rId , r . getY ( ) ) ; result . put ( rId , r . getYPredicted ( ) ) ; } "<AssertPlaceHolder>" ; instance . delete ( ) ; trainingData . close ( ) ; validationData . close ( ) ; } getYPredicted ( ) { return yPredicted ; }
|
org . junit . Assert . assertEquals ( expResult , result )
|
testToString ( ) { java . lang . String result = fixture . toString ( ) ; java . lang . String left = "[declaration]<sp>enum[" ; "<AssertPlaceHolder>" ; } toString ( ) { return fName ; }
|
org . junit . Assert . assertEquals ( left , result . substring ( 0 , left . length ( ) ) )
|
testGetInetIp ( ) { "<AssertPlaceHolder>" ; } getInetIp ( ) { lodsve . web . utils . List < java . lang . String > ips = lodsve . web . utils . IpUtils . getInetIps ( ) ; for ( java . lang . String ip : ips ) { if ( ! ( "127.0.0.1" . equals ( ip ) ) ) { return ip ; } } return "127.0.0.1" ; }
|
org . junit . Assert . assertNotNull ( lodsve . web . utils . IpUtils . getInetIp ( ) )
|
testGetDescription ( ) { java . lang . String description = ( ( ( ( ( d_threeArmModel . getTitle ( ) ) + "<sp>for<sp>\"" ) + ( d_threeArmStudy . getName ( ) ) ) + "\"<sp>on<sp>Endpoint<sp>\"" ) + ( d_endpoint . getName ( ) ) ) + "\"" ; "<AssertPlaceHolder>" ; } getDescription ( ) { return d_description ; }
|
org . junit . Assert . assertEquals ( description , d_threeArmModel . getDescription ( ) )
|
testIsInternalURL_SameHostOtherApp ( ) { java . lang . String serviceAccessURL = "https://localhost:8080/otherapp/subscriptions.jsp" ; boolean result = ctrl . isInternalURL ( serviceAccessURL ) ; "<AssertPlaceHolder>" ; } isInternalURL ( java . lang . String ) { if ( ( serviceAccessURL == null ) || ( ( serviceAccessURL . length ( ) ) == 0 ) ) { return false ; } return ( org . oscm . ui . dialog . mp . landingpage . EnterpriseLandingpageCtrl . isMatch ( serviceAccessURL , getApplicationBean ( ) . getServerBaseUrl ( ) ) ) || ( org . oscm . ui . dialog . mp . landingpage . EnterpriseLandingpageCtrl . isMatch ( serviceAccessURL , getApplicationBean ( ) . getServerBaseUrlHttps ( ) ) ) ; }
|
org . junit . Assert . assertFalse ( result )
|
a_property_of_a_class_can_be_overridden_with_full_setter_name ( ) { com . flextrade . jfixture . JFixture fixture = new com . flextrade . jfixture . JFixture ( ) ; fixture . customise ( ) . propertyOf ( component . customisation . TestOverrideProperties . OverridePropertiesType . class , "setSize" , ( - 123 ) ) ; component . customisation . TestOverrideProperties . OverridePropertiesType type = fixture . create ( component . customisation . TestOverrideProperties . OverridePropertiesType . class ) ; "<AssertPlaceHolder>" ; } getSize ( ) { return size ; }
|
org . junit . Assert . assertEquals ( ( - 123 ) , type . getSize ( ) )
|
testEmptyAuth ( ) { java . util . List < org . apache . hadoop . util . ZKUtil . ZKAuthInfo > result = org . apache . hadoop . util . ZKUtil . parseAuth ( "" ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return ( allocatedSlots . nextSetBit ( 0 ) ) == ( - 1 ) ; }
|
org . junit . Assert . assertTrue ( result . isEmpty ( ) )
|
testMergeRequestNote ( ) { org . gitlab4j . api . models . Note note = org . gitlab4j . api . JsonUtils . unmarshalResource ( org . gitlab4j . api . models . Note . class , "merge-request-note.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 ( note , "merge-request-note.json" ) )
|
testGoodDates2 ( ) { com . github . anno4j . model . Annotation annotation = this . anno4j . createObject ( com . github . anno4j . model . Annotation . class ) ; annotation . setCreated ( com . github . anno4j . model . CreationProvenanceTest . GOOD_DATE ) ; com . github . anno4j . model . Annotation result = this . anno4j . findByID ( com . github . anno4j . model . Annotation . class , annotation . getResourceAsString ( ) ) ; "<AssertPlaceHolder>" ; } getCreated ( ) { return this . created ; }
|
org . junit . Assert . assertEquals ( com . github . anno4j . model . CreationProvenanceTest . GOOD_DATE , result . getCreated ( ) )
|
testGroupByWithNullValue ( ) { org . apache . tajo . storage . fragment . FileFragment [ ] frags = org . apache . tajo . engine . planner . physical . StorageManager . splitNG ( org . apache . tajo . engine . planner . physical . TestPhysicalPlanner . conf , "score" , org . apache . tajo . engine . planner . physical . TestPhysicalPlanner . score . getMeta ( ) , org . apache . tajo . engine . planner . physical . TestPhysicalPlanner . score . getPath ( ) , Integer . MAX_VALUE ) ; org . apache . hadoop . fs . Path workDir = org . apache . tajo . util . CommonTestingUtil . getTestDir ( "target/test-data/testGroupByWithNullValue" ) ; org . apache . tajo . worker . TaskAttemptContext ctx = new org . apache . tajo . worker . TaskAttemptContext ( org . apache . tajo . engine . planner . physical . TestPhysicalPlanner . conf , org . apache . tajo . LocalTajoTestingUtility . newQueryUnitAttemptId ( org . apache . tajo . engine . planner . physical . TestPhysicalPlanner . masterPlan ) , new org . apache . tajo . storage . fragment . FileFragment [ ] { frags [ 0 ] } , workDir ) ; ctx . setEnforcer ( new org . apache . tajo . engine . planner . enforce . Enforcer ( ) ) ; org . apache . tajo . algebra . Expr context = org . apache . tajo . engine . planner . physical . TestPhysicalPlanner . analyzer . parse ( QUERIES [ 11 ] ) ; org . apache . tajo . engine . planner . physical . LogicalPlan plan = org . apache . tajo . engine . planner . physical . TestPhysicalPlanner . planner . createPlan ( context ) ; org . apache . tajo . engine . planner . physical . LogicalNode rootNode = org . apache . tajo . engine . planner . physical . TestPhysicalPlanner . optimizer . optimize ( plan ) ; org . apache . tajo . engine . planner . physical . PhysicalPlanner phyPlanner = new org . apache . tajo . engine . planner . physical . PhysicalPlannerImpl ( org . apache . tajo . engine . planner . physical . TestPhysicalPlanner . conf , org . apache . tajo . engine . planner . physical . TestPhysicalPlanner . sm ) ; org . apache . tajo . engine . planner . physical . PhysicalExec exec = phyPlanner . createPlan ( ctx , rootNode ) ; int count = 0 ; exec . init ( ) ; while ( ( exec . next ( ) ) != null ) { count ++ ; } exec . close ( ) ; "<AssertPlaceHolder>" ; } close ( ) { if ( ( resultSet ) != null ) { resultSet . close ( ) ; } resultSet = null ; isClosed = true ; }
|
org . junit . Assert . assertEquals ( 10 , count )
|
testCloseReopen ( ) { store . close ( ) ; store = new nl . inl . blacklab . externalstorage . ContentStoreDirZip ( dir ) ; "<AssertPlaceHolder>" ; } retrieve ( int ) { java . lang . String [ ] rv = retrieveParts ( id , new int [ ] { - 1 } , new int [ ] { - 1 } ) ; return rv == null ? null : rv [ 0 ] ; }
|
org . junit . Assert . assertEquals ( str [ 0 ] , store . retrieve ( 1 ) )
|
doit ( ) { com . predic8 . membrane . core . util . URIFactory uriFactory = new com . predic8 . membrane . core . util . URIFactory ( true ) ; com . predic8 . membrane . core . http . Response res = new com . predic8 . membrane . core . transport . http . HttpClient ( ) . call ( new com . predic8 . membrane . core . http . Request . Builder ( ) . method ( "GET" ) . url ( uriFactory , "http://localhost:3027/foo{}" ) . body ( "" ) . buildExchange ( ) ) . getResponse ( ) ; "<AssertPlaceHolder>" ; } getStatusCode ( ) { return statusCode ; }
|
org . junit . Assert . assertEquals ( 200 , res . getStatusCode ( ) )
|
testGetAggregation_nonEmptyRepository_keyDoesntExist_assertNoAggregation ( ) { final org . nhindirect . monitor . dao . entity . Aggregation insert = new org . nhindirect . monitor . dao . entity . Aggregation ( ) ; insert . setExchangeBlob ( new byte [ ] { 0 , 3 , 2 } ) ; insert . setId ( "12345" ) ; insert . setVersion ( 0 ) ; notifDao . addUpdateAggregation ( insert ) ; final org . nhindirect . monitor . dao . entity . Aggregation aggr = notifDao . getAggregation ( "doenst<sp>matter" ) ; "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertNull ( aggr )
|
when_defaults_then_mobileFilterActive ( ) { org . n52 . io . request . FilterResolver resolver = createResolver ( org . n52 . io . request . IoParameters . createDefaults ( ) ) ; "<AssertPlaceHolder>" ; } hasMobileFilter ( ) { return ( parameters . getMobile ( ) ) != null ; }
|
org . junit . Assert . assertFalse ( resolver . hasMobileFilter ( ) )
|
testIsPruneDuplicateIndexDefs ( ) { classUnderTest . setPruneDuplicateIndexDefs ( true ) ; "<AssertPlaceHolder>" ; } isPruneDuplicateIndexDefs ( ) { return pruneDuplicateIndexDefs ; }
|
org . junit . Assert . assertEquals ( true , classUnderTest . isPruneDuplicateIndexDefs ( ) )
|
testGoodCyShutdownEvent ( ) { final org . cytoscape . application . events . CyShutdownEvent e = new org . cytoscape . application . events . CyShutdownEvent ( source ) ; "<AssertPlaceHolder>" ; } abortShutdownReason ( ) { return reason ; }
|
org . junit . Assert . assertNull ( e . abortShutdownReason ( ) )
|
testForkGroup ( ) { org . jclouds . openstack . nova . v2_0 . domain . SecurityGroupRule rule = mock ( org . jclouds . openstack . nova . v2_0 . domain . SecurityGroupRule . class ) ; java . lang . String uniqueGroup = se . kth . karamel . common . util . settings . NovaSetting . NOVA_UNIQUE_GROUP_NAME ( clusterName , groupName ) ; java . lang . String uniqueDescription = se . kth . karamel . common . util . settings . NovaSetting . NOVA_UNIQUE_GROUP_DESCRIPTION ( clusterName , groupName ) ; org . jclouds . openstack . nova . v2_0 . domain . Ingress ingress = org . jclouds . openstack . nova . v2_0 . domain . Ingress . builder ( ) . fromPort ( 0 ) . toPort ( 65535 ) . ipProtocol ( IpProtocol . TCP ) . build ( ) ; when ( novaContext . getSecurityGroupApi ( ) ) . thenReturn ( securityGroupApi ) ; when ( securityGroupApi . createWithDescription ( uniqueGroup , uniqueDescription ) ) . thenReturn ( securityGroupCreated ) ; when ( securityGroupCreated . getId ( ) ) . thenReturn ( "10" ) ; when ( securityGroupApi . createRuleAllowingCidrBlock ( "10" , ingress , "0.0.0.0/0" ) ) . thenReturn ( rule ) ; se . kth . karamel . backend . launcher . nova . NovaLauncher novaLauncher = new se . kth . karamel . backend . launcher . nova . NovaLauncher ( novaContext , sshKeyPair ) ; se . kth . karamel . common . clusterdef . json . JsonCluster cluster = mock ( se . kth . karamel . common . clusterdef . json . JsonCluster . class ) ; se . kth . karamel . backend . running . model . ClusterRuntime clusterRuntime = mock ( se . kth . karamel . backend . running . model . ClusterRuntime . class ) ; java . util . List < se . kth . karamel . common . clusterdef . json . JsonGroup > groups = new java . util . ArrayList ( ) ; se . kth . karamel . common . clusterdef . json . JsonGroup group = mock ( se . kth . karamel . common . clusterdef . json . JsonGroup . class ) ; groups . add ( group ) ; when ( group . getName ( ) ) . thenReturn ( groupName ) ; when ( cluster . getGroups ( ) ) . thenReturn ( groups ) ; when ( group . getProvider ( ) ) . thenReturn ( nova ) ; when ( cluster . getProvider ( ) ) . thenReturn ( nova ) ; when ( cluster . getName ( ) ) . thenReturn ( clusterName ) ; java . lang . String groupId = novaLauncher . forkGroup ( cluster , clusterRuntime , groupName ) ; "<AssertPlaceHolder>" ; } forkGroup ( se . kth . karamel . common . clusterdef . json . JsonCluster , se . kth . karamel . backend . running . model . ClusterRuntime , java . lang . String ) { java . util . Set < java . lang . String > ports = new java . util . HashSet ( ) ; se . kth . karamel . common . clusterdef . json . JsonGroup jg = se . kth . karamel . backend . converter . UserClusterDataExtractor . findGroup ( definition , name ) ; se . kth . karamel . common . clusterdef . Provider provider = se . kth . karamel . backend . converter . UserClusterDataExtractor . getGroupProvider ( definition , name ) ; se . kth . karamel . common . clusterdef . Nova nova = ( ( se . kth . karamel . common . clusterdef . Nova ) ( provider ) ) ; ports . addAll ( Settings . AWS_VM_PORTS_DEFAULT ) ; return createSecurityGroup ( definition . getName ( ) , jg . getName ( ) , nova , ports ) ; }
|
org . junit . Assert . assertEquals ( "10" , groupId )
|
testConnect ( ) { rx . Completable completable = rx . Completable . complete ( ) ; org . mockito . Mockito . when ( client . connect ( ) ) . thenReturn ( completable ) ; streamingConnection . connect ( ) ; "<AssertPlaceHolder>" ; } isClosed ( ) { return ! ( connected ) ; }
|
org . junit . Assert . assertTrue ( ( ! ( streamingConnection . isClosed ( ) ) ) )
|
testValidateFalseNw_dst ( ) { "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertThat ( result , org . hamcrest . CoreMatchers . is ( false ) )
|
shouldNotBeEqualBecauseOfDifferentLocalDate ( ) { com . calendarfx . model . Interval interval1 = new com . calendarfx . model . Interval ( java . time . LocalDate . of ( 2017 , 1 , 14 ) , java . time . LocalTime . of ( 10 , 0 ) , java . time . LocalDate . of ( 2017 , 1 , 15 ) , java . time . LocalTime . of ( 23 , 0 ) ) ; com . calendarfx . model . Interval interval2 = new com . calendarfx . model . Interval ( java . time . LocalDate . of ( 2017 , 1 , 14 ) , java . time . LocalTime . of ( 10 , 0 ) , java . time . LocalDate . of ( 2017 , 1 , 16 ) , java . time . LocalTime . of ( 23 , 0 ) ) ; boolean equal = interval1 . equals ( interval2 ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == obj ) return true ; if ( obj == null ) return false ; if ( ( com . calendarfx . model . Entry . getClass ( ) ) != ( obj . getClass ( ) ) ) return false ; com . calendarfx . model . Entry other = ( ( com . calendarfx . model . Entry ) ( obj ) ) ; if ( ( id ) == null ) { if ( ( other . id ) != null ) return false ; } else if ( ! ( id . equals ( other . id ) ) ) return false ; java . lang . String recId = getRecurrenceId ( ) ; java . lang . String otherRecId = other . getRecurrenceId ( ) ; if ( recId == null ) { if ( otherRecId != null ) return false ; } else if ( ! ( recId . equals ( otherRecId ) ) ) return false ; return true ; }
|
org . junit . Assert . assertThat ( equal , org . hamcrest . Matchers . is ( false ) )
|
testToBeanToJson_NonEmpty ( ) { org . tests . model . json . EBasicJsonMap bean = new org . tests . model . json . EBasicJsonMap ( ) ; bean . setId ( 99L ) ; bean . setContent ( new java . util . LinkedHashMap ( ) ) ; io . ebean . text . json . JsonWriteOptions options = new io . ebean . text . json . JsonWriteOptions ( ) ; options . setInclude ( JsonConfig . Include . NON_EMPTY ) ; java . lang . String asJson = io . ebean . Ebean . json ( ) . toJson ( bean , options ) ; java . lang . String expectedJson = "{\"id\":99,\"content\":{}}" ; "<AssertPlaceHolder>" ; } toJson ( java . lang . String , java . util . Collection ) { try { beginAssocMany ( name ) ; for ( java . lang . Object bean : c ) { io . ebeaninternal . server . deploy . BeanDescriptor < ? > d = getDescriptor ( bean . getClass ( ) ) ; d . jsonWrite ( this , ( ( io . ebean . bean . EntityBean ) ( bean ) ) , null ) ; } endAssocMany ( ) ; } catch ( java . io . IOException e ) { throw new io . ebean . text . json . JsonIOException ( e ) ; } }
|
org . junit . Assert . assertEquals ( expectedJson , asJson )
|
getUsersList ( ) { org . oscm . internal . vo . VOUserDetails user1 = new org . oscm . internal . vo . VOUserDetails ( ) ; user1 . setUserId ( "user1ID" ) ; user1 . setEMail ( "user1Email" ) ; user1 . setOrganizationName ( "user1OrgName" ) ; user1 . setOrganizationId ( "user1OrgID" ) ; org . oscm . internal . vo . VOUserDetails user2 = new org . oscm . internal . vo . VOUserDetails ( ) ; user2 . setUserId ( "user2ID" ) ; user2 . setEMail ( "user2Email" ) ; user2 . setOrganizationName ( "user2OrgName" ) ; user2 . setOrganizationId ( "user2OrgID" ) ; java . util . List < org . oscm . internal . vo . VOUserDetails > usersListVO = new java . util . ArrayList ( ) ; usersListVO . add ( user1 ) ; usersListVO . add ( user2 ) ; when ( operatorService . getUsers ( ) ) . thenReturn ( usersListVO ) ; final java . util . List < org . oscm . internal . usermanagement . POUserAndOrganization > resultList = bean . getUsersList ( ) ; boolean hasFirst = false ; boolean hasSecond = false ; for ( org . oscm . internal . usermanagement . POUserAndOrganization obj : resultList ) { if ( ( ( ( obj . getUserId ( ) . equals ( "user1ID" ) ) && ( obj . getEmail ( ) . equals ( "user1Email" ) ) ) && ( obj . getOrganizationId ( ) . equals ( "user1OrgID" ) ) ) && ( obj . getOrganizationName ( ) . equals ( "user1OrgName" ) ) ) { hasFirst = true ; } if ( ( ( ( obj . getUserId ( ) . equals ( "user2ID" ) ) && ( obj . getEmail ( ) . equals ( "user2Email" ) ) ) && ( obj . getOrganizationId ( ) . equals ( "user2OrgID" ) ) ) && ( obj . getOrganizationName ( ) . equals ( "user2OrgName" ) ) ) { hasSecond = true ; } } "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == that ) return true ; if ( ! ( that instanceof org . oscm . triggerservice . local . TriggerMessage ) ) { return false ; } org . oscm . triggerservice . local . TriggerMessage compareTo = ( ( org . oscm . triggerservice . local . TriggerMessage ) ( that ) ) ; return ( getKey ( ) ) == ( compareTo . getKey ( ) ) ; }
|
org . junit . Assert . assertTrue ( ( hasFirst && hasSecond ) )
|
testUpdateBusinessObjectDataNotificationRegistration ( ) { org . finra . herd . model . api . xml . NotificationRegistrationKey businessObjectDataNotificationRegistrationKey = new org . finra . herd . model . api . xml . NotificationRegistrationKey ( NAMESPACE , NOTIFICATION_NAME ) ; org . finra . herd . model . api . xml . BusinessObjectDataNotificationFilter businessObjectDataNotificationFilter = new org . finra . herd . model . api . xml . BusinessObjectDataNotificationFilter ( BDEF_NAMESPACE , BDEF_NAME , FORMAT_USAGE_CODE , FORMAT_FILE_TYPE_CODE , FORMAT_VERSION , STORAGE_NAME , BDATA_STATUS , BDATA_STATUS_2 ) ; java . util . List < org . finra . herd . model . api . xml . JobAction > jobActions = java . util . Arrays . asList ( new org . finra . herd . model . api . xml . JobAction ( JOB_NAMESPACE , JOB_NAME , CORRELATION_DATA ) ) ; org . finra . herd . model . api . xml . BusinessObjectDataNotificationRegistrationUpdateRequest businessObjectDataNotificationRegistrationUpdateRequest = new org . finra . herd . model . api . xml . BusinessObjectDataNotificationRegistrationUpdateRequest ( NOTIFICATION_EVENT_TYPE , businessObjectDataNotificationFilter , jobActions , NOTIFICATION_REGISTRATION_STATUS ) ; org . finra . herd . model . api . xml . BusinessObjectDataNotificationRegistration businessObjectDataNotificationRegistration = new org . finra . herd . model . api . xml . BusinessObjectDataNotificationRegistration ( ID , businessObjectDataNotificationRegistrationKey , NOTIFICATION_EVENT_TYPE , businessObjectDataNotificationFilter , jobActions , NOTIFICATION_REGISTRATION_STATUS ) ; when ( businessObjectDataNotificationRegistrationService . updateBusinessObjectDataNotificationRegistration ( businessObjectDataNotificationRegistrationKey , businessObjectDataNotificationRegistrationUpdateRequest ) ) . thenReturn ( businessObjectDataNotificationRegistration ) ; org . finra . herd . model . api . xml . BusinessObjectDataNotificationRegistration result = businessObjectDataNotificationRegistrationRestController . updateBusinessObjectDataNotificationRegistration ( org . finra . herd . rest . NAMESPACE , org . finra . herd . rest . NOTIFICATION_NAME , businessObjectDataNotificationRegistrationUpdateRequest ) ; verify ( businessObjectDataNotificationRegistrationService ) . updateBusinessObjectDataNotificationRegistration ( businessObjectDataNotificationRegistrationKey , businessObjectDataNotificationRegistrationUpdateRequest ) ; verifyNoMoreInteractionsHelper ( ) ; "<AssertPlaceHolder>" ; } verifyNoMoreInteractionsHelper ( ) { verifyNoMoreInteractions ( awsHelper , javaPropertiesHelper , retryPolicyFactory , s3Operations ) ; }
|
org . junit . Assert . assertEquals ( businessObjectDataNotificationRegistration , result )
|
manageModificationVDiskCreation_VSERVER_RETRIEVEGUEST ( ) { org . oscm . app . iaas . data . FlowState flowState = org . oscm . app . iaas . data . FlowState . VSERVER_RETRIEVEGUEST ; org . oscm . app . iaas . data . FlowState newState = null ; newState = vServerProcessor . manageModificationVDiskCreation ( "controllerId" , "instanceId" , paramHandler , flowState , newState ) ; "<AssertPlaceHolder>" ; } manageModificationVDiskCreation ( java . lang . String , java . lang . String , org . oscm . app . iaas . PropertyHandler , org . oscm . app . iaas . data . FlowState , org . oscm . app . iaas . data . FlowState ) { org . oscm . app . iaas . data . FlowState newState = newStateParam ; boolean vSysInNormalState = VSystemStatus . NORMAL . equals ( paramHandler . getIaasContext ( ) . getVSystemStatus ( ) ) ; switch ( flowState ) { case VSERVER_MODIFICATION_REQUESTED : if ( ( paramHandler . getControllerWaitTime ( ) ) != 0 ) { paramHandler . suspendProcessInstanceFor ( paramHandler . getControllerWaitTime ( ) ) ; newState = org . oscm . app . iaas . data . FlowState . WAITING_BEFORE_STOP ; break ; } case WAITING_BEFORE_STOP : if ( checkNextStatus ( controllerId , instanceId , FlowState . VSERVER_STOPPED_FOR_MODIFICATION , paramHandler ) ) { java . lang . String status = vserverComm . getVServerStatus ( paramHandler ) ; if ( VServerStatus . RUNNING . equals ( status ) ) { vserverComm . stopVServer ( paramHandler ) ; } else if ( VServerStatus . STOPPED . equals ( status ) ) { newState = org . oscm . app . iaas . data . FlowState . VSERVER_STOPPED_FOR_MODIFICATION ; } } break ; case VSERVER_STOPPED_FOR_MODIFICATION : if ( vSysInNormalState && ( checkNextStatus ( controllerId , instanceId , FlowState . VSERVER_UPDATING , paramHandler ) ) ) { newState = org . oscm . app . iaas . data . FlowState . VSERVER_UPDATING ; vserverComm . modifyVServerAttributes ( paramHandler ) ; if ( vdiskInfo . isAdditionalDiskSelected ( paramHandler ) ) { newState = org . oscm . app . iaas . data . FlowState . VSDISK_CREATION_REQUESTED ; } } break ; case VSDISK_CREATION_REQUESTED : if ( vSysInNormalState && ( checkNextStatus ( controllerId , instanceId , FlowState . VSDISK_CREATING , paramHandler ) ) ) { vdiskInfo . createVDisk ( paramHandler ) ; newState = org . oscm . app . iaas . data . FlowState . VSDISK_CREATING ; } break ; case VSDISK_CREATING : if ( checkNextStatus ( controllerId , instanceId , FlowState . VSDISK_CREATED , paramHandler ) ) { if ( vdiskInfo . isVDiskDeployed ( paramHandler ) ) { newState = org . oscm . app . iaas . data . FlowState . VSDISK_CREATED ; } } break ; case VSDISK_CREATED : if ( vSysInNormalState && ( checkNextStatus ( controllerId , instanceId , FlowState . VSDISK_ATTACHING , paramHandler ) ) ) { vdiskInfo . attachVDisk ( paramHandler ) ; newState = org . oscm . app . iaas . data . FlowState . VSDISK_ATTACHING ; } break ; case VSDISK_ATTACHING : if ( checkNextStatus ( controllerId , instanceId , FlowState . VSDISK_ATTACHED , paramHandler ) ) { if ( vdiskInfo . isVDiskAttached ( paramHandler ) ) { newState = org . oscm . app . iaas . data . FlowState . VSDISK_ATTACHED ; } } break ; case VSDISK_ATTACHED : if ( checkNextStatus ( controllerId , instanceId , FlowState . VSERVER_UPDATING , paramHandler ) ) { newState = org . oscm . app . iaas . data . FlowState . VSERVER_UPDATING ; } break ; case VSERVER_UPDATING : if ( checkNextStatus ( controllerId , instanceId , FlowState . VSERVER_UPDATED , paramHandler ) ) { if ( VServerStatus . STOPPED . equals ( vserverComm . getVServerStatus ( paramHandler ) ) ) { newState = org . oscm . app . iaas . data . FlowState . VSERVER_UPDATED ; } } break ; case VSERVER_UPDATED : if ( checkNextStatus ( controllerId , instanceId , FlowState . VSERVER_STARTING , paramHandler ) ) { if ( vserverComm . startVServer ( paramHandler ) ) { newState = org . oscm . app . iaas . data . FlowState . VSERVER_STARTING ; } } break ; case VSERVER_STARTING : if ( checkNextStatus ( controllerId , instanceId , FlowState . VSERVER_STARTED , paramHandler ) ) { if ( VServerStatus . RUNNING . equals ( vserverComm . getVServerStatus ( paramHandler ) ) ) { newState = org . oscm . app . iaas . data . FlowState . VSERVER_STARTED ; } } break ; case VSERVER_STARTED : if ( checkNextStatus ( controllerId , instanceId , FlowState . FINISHED , paramHandler ) ) { if ( VServerStatus . RUNNING . equals ( vserverComm . getVServerStatus ( paramHandler ) ) ) { newState = org . oscm . app . iaas . data . FlowState . VSERVER_RETRIEVEGUEST ; } } break ; case VSERVER_RETRIEVEGUEST : java . lang . String mail = paramHandler . getMailForCompletion ( ) ; if ( mail != null ) { newState = dispatchVServerManualOperation ( controllerId , instanceId , paramHandler , mail ) ; } else if ( checkNextStatus ( controllerId , instanceId , FlowState . FINISHED , paramHandler ) ) { newState = org . oscm . app . iaas . data . FlowState . FINISHED ; } break ; default : } return newState ; }
|
org . junit . Assert . assertEquals ( FlowState . FINISHED , newState )
|
testHoltWintersDeviation ( ) { com . salesforce . dva . argus . service . metric . transform . HoltWintersAnalysis holtWinters = new com . salesforce . dva . argus . service . metric . transform . HoltWintersAnalysis ( ) ; java . util . Map < java . lang . Long , java . lang . Double > dp = new java . util . HashMap < java . lang . Long , java . lang . Double > ( ) ; dp . put ( 2L , 3.0 ) ; dp . put ( 3L , 4.0 ) ; dp . put ( 4L , 5.0 ) ; dp . put ( 5L , 8.0 ) ; dp . put ( 6L , 13.0 ) ; dp . put ( 7L , 6.0 ) ; dp . put ( 8L , 4.0 ) ; dp . put ( 9L , 3.0 ) ; dp . put ( 10L , 2.5 ) ; double alpha = 0.1 ; double beta = 0.0035 ; double gamma = 0.1 ; int seasonLength = 1 ; java . util . Map < java . lang . Long , java . lang . Double > expected = new java . util . HashMap < java . lang . Long , java . lang . Double > ( ) ; expected . put ( 2L , 0.0 ) ; expected . put ( 3L , 0.1 ) ; expected . put ( 4L , 0.27997 ) ; expected . put ( 5L , 0.72374 ) ; expected . put ( 6L , 1.57824 ) ; expected . put ( 7L , 1.56059 ) ; expected . put ( 8L , 1.46463 ) ; expected . put ( 9L , 1.45847 ) ; expected . put ( 10L , 1.47683 ) ; java . util . Map < java . lang . Long , java . lang . Double > deviationDatapoints = holtWinters . _performHoltWintersAnalysis ( dp , alpha , beta , gamma , seasonLength , 2L ) . getDeviationDatapoints ( ) ; "<AssertPlaceHolder>" ; } getDeviationDatapoints ( ) { return _deviationDatapoints ; }
|
org . junit . Assert . assertEquals ( expected , deviationDatapoints )
|
rsaValidateFalse ( ) { org . ebayopensource . fido . uaf . tlv . Tags t = getTags ( org . ebayopensource . fido . uaf . tlv . TestAssertions . regRequestAssertionsFromRaon ( ) ) ; org . ebayopensource . fido . uaf . crypto . CertificateValidatorImpl validator = new org . ebayopensource . fido . uaf . crypto . CertificateValidatorImpl ( ) ; boolean validate = validator . validate ( t . getTags ( ) . get ( TagsEnum . TAG_ATTESTATION_CERT . id ) . value , getSignedData ( t . getTags ( ) . get ( TagsEnum . TAG_UAFV1_KRD . id ) ) , t . getTags ( ) . get ( TagsEnum . TAG_SIGNATURE . id ) . value ) ; "<AssertPlaceHolder>" ; } get ( java . lang . String ) { return org . ebayopensource . fidouafclient . curl . Curl . get ( url , null ) ; }
|
org . junit . Assert . assertTrue ( ( ! validate ) )
|
testOutputInputLowercase ( ) { for ( int i = 1 ; i <= 4999 ; i ++ ) { java . lang . String encoded = org . kitodo . dataeditor . pagination . RomanNumeral . format ( i , false ) ; int decoded = org . kitodo . dataeditor . pagination . RomanNumeral . parseInt ( encoded ) ; "<AssertPlaceHolder>" ; } } parseInt ( java . lang . String ) { int result = 0 ; for ( int i = ( value . length ( ) ) - 1 ; i >= 0 ; i -- ) { switch ( ( value . charAt ( i ) ) | 32 ) { case 'c' : if ( result >= ( org . kitodo . dataeditor . pagination . RomanNumeral . D ) ) { result -= org . kitodo . dataeditor . pagination . RomanNumeral . C ; } else { result += org . kitodo . dataeditor . pagination . RomanNumeral . C ; } break ; case 'd' : if ( result >= ( org . kitodo . dataeditor . pagination . RomanNumeral . M ) ) { result -= org . kitodo . dataeditor . pagination . RomanNumeral . D ; } else { result += org . kitodo . dataeditor . pagination . RomanNumeral . D ; } break ; case 'i' : if ( result >= ( org . kitodo . dataeditor . pagination . RomanNumeral . V ) ) { result -= org . kitodo . dataeditor . pagination . RomanNumeral . I ; } else { result += org . kitodo . dataeditor . pagination . RomanNumeral . I ; } break ; case 'l' : if ( result >= ( org . kitodo . dataeditor . pagination . RomanNumeral . C ) ) { result -= org . kitodo . dataeditor . pagination . RomanNumeral . L ; } else { result += org . kitodo . dataeditor . pagination . RomanNumeral . L ; } break ; case 'm' : result += org . kitodo . dataeditor . pagination . RomanNumeral . M ; break ; case 'v' : if ( result >= ( org . kitodo . dataeditor . pagination . RomanNumeral . X ) ) { result -= org . kitodo . dataeditor . pagination . RomanNumeral . V ; } else { result += org . kitodo . dataeditor . pagination . RomanNumeral . V ; } break ; case 'x' : if ( result >= ( org . kitodo . dataeditor . pagination . RomanNumeral . L ) ) { result -= org . kitodo . dataeditor . pagination . RomanNumeral . X ; } else { result += org . kitodo . dataeditor . pagination . RomanNumeral . X ; } break ; default : throw new java . lang . NumberFormatException ( ( "For<sp>string:<sp>" + value ) ) ; } } return result ; }
|
org . junit . Assert . assertEquals ( i , decoded )
|
testTest ( ) { logger . info ( "test" ) ; com . datumbox . framework . common . dataobjects . FlatDataList errorList = new com . datumbox . framework . common . dataobjects . FlatDataList ( java . util . Arrays . asList ( new java . lang . Object [ ] { - 2.7755575615629E-15 , - 2.0816681711722E-15 , - 2.2204460492503E-16 , - 1.9984014443253E-15 , 3.3306690738755E-16 , - 4.9960036108132E-16 , 2.2204460492503E-16 , 4.4408920985006E-16 , 2.4424906541753E-15 , - 1.2212453270877E-15 , - 2.2204460492503E-16 , - 2.7755575615629E-15 , 1.3322676295502E-15 , 1.6653345369377E-15 , - 1.8318679906315E-15 , - 1.2212453270877E-15 , 2.3314683517128E-15 , 8.8817841970013E-16 , - 2.2204460492503E-15 , - 1.2212453270877E-15 , - 3.1641356201817E-15 , - 6.6613381477509E-16 , 2.7755575615629E-16 , - 5.5511151231258E-16 , - 1.193489751472E-15 , 1.9984014443253E-15 , - 1.1657341758564E-15 , - 6.1062266354384E-16 , 2.2204460492503E-16 , - 1.1657341758564E-15 , - 4.4408920985006E-16 , - 2.3314683517128E-15 , - 5.5511151231258E-16 , 4.4408920985006E-16 , 6.6613381477509E-16 , 1.1102230246252E-15 , 2.2204460492503E-15 , - 6.6613381477509E-16 , 2.7755575615629E-16 , - 9.4368957093138E-16 , 1.3322676295502E-15 , - 1.3322676295502E-15 , 6.6613381477509E-16 , 1.8873791418628E-15 , - 2.9976021664879E-15 , - 1.8873791418628E-15 , - 1.4710455076283E-15 , - 2.1649348980191E-15 , - 7.2164496600635E-16 , - 1.498801083244E-15 , 2.2204460492503E-15 , 2.2204460492503E-15 , 6.6613381477509E-16 , 6.6613381477509E-16 , - 1.1379786002408E-15 , 2.9976021664879E-15 , - 8.8817841970013E-16 , - 1.5473733405713E-15 , 9.9920072216264E-16 , 2.4424906541753E-15 , - 1.7763568394003E-15 , - 2.7755575615629E-16 , - 7.7715611723761E-16 , 1.8873791418628E-15 , - 1.1657341758564E-15 , 1.6653345369377E-16 , 4.4408920985006E-16 , 4.4408920985006E-16 , 1.7763568394003E-15 , - 3.5249581031849E-15 , - 6.1062266354384E-16 , - 1.5300261058115E-15 , 1.8873791418628E-15 , 1.7763568394003E-15 , - 2.2204460492503E-16 , - 3.885780586188E-16 , - 6.6613381477509E-16 , 5.5511151231258E-17 , - 1.3877787807814E-15 , 1.1102230246252E-15 , 1.8873791418628E-15 , 2.6645352591004E-15 , 1.6653345369377E-15 , 1.6653345369377E-15 , 2.2204460492503E-15 , - 4.1633363423443E-15 , 6.6613381477509E-16 , 1.3322676295502E-15 , - 1.6930901125534E-15 , - 1.5404344466674E-15 , 2.3314683517128E-15 , 5.5511151231258E-16 , 1.8873791418628E-15 , - 8.3266726846887E-16 , - 2.2204460492503E-16 , - 4.2743586448069E-15 , 1.6653345369377E-15 , 2.4424906541753E-15 , - 5.5511151231258E-17 , - 3.3306690738755E-16 } ) ) ; int k = 10 ; boolean is_twoTailed = true ; double aLevel = 0.05 ; boolean expResult = false ; boolean result = com . datumbox . framework . core . statistics . parametrics . onesample . DurbinWatson . test ( errorList , k , is_twoTailed , aLevel ) ; "<AssertPlaceHolder>" ; } test ( com . datumbox . framework . common . dataobjects . FlatDataList , int , boolean , double ) { int n = errorList . size ( ) ; if ( n <= 0 ) { throw new java . lang . IllegalArgumentException ( "The<sp>provided<sp>collection<sp>can't<sp>be<sp>empty." ) ; } double DW = com . datumbox . framework . core . statistics . parametrics . onesample . DurbinWatson . calculateScore ( errorList ) ; boolean rejectH0 = com . datumbox . framework . core . statistics . parametrics . onesample . DurbinWatson . checkCriticalValue ( DW , n , k , is_twoTailed , aLevel ) ; return rejectH0 ; }
|
org . junit . Assert . assertEquals ( expResult , result )
|
shouldCopyEnvironment ( ) { java . util . Properties expected = new java . util . Properties ( ) ; expected . putAll ( java . lang . System . getenv ( ) ) ; com . oracle . bedrock . runtime . PropertiesBuilder builder = com . oracle . bedrock . runtime . PropertiesBuilder . fromCurrentEnvironmentVariables ( ) ; java . util . Properties properties = builder . realize ( ) ; "<AssertPlaceHolder>" ; } is ( T ) { return new com . oracle . bedrock . predicate . Is < T > ( new com . oracle . bedrock . predicate . EqualTo < T > ( value ) ) ; }
|
org . junit . Assert . assertThat ( properties , org . hamcrest . CoreMatchers . is ( expected ) )
|
testEveryoneMemberOf ( ) { java . util . Iterator < org . apache . jackrabbit . api . security . user . Group > groups = everyoneGroup . memberOf ( ) ; "<AssertPlaceHolder>" ; } hasNext ( ) { return ( current . next ) != null ; }
|
org . junit . Assert . assertFalse ( groups . hasNext ( ) )
|
testRetainsWarningHeadersReceivedFromUpstream ( ) { originResponse . removeHeaders ( "Warning" ) ; final java . lang . String warning = "199<sp>fred<sp>\"misc\"" ; originResponse . addHeader ( "Warning" , warning ) ; backendExpectsAnyRequest ( ) . andReturn ( originResponse ) ; replayMocks ( ) ; final org . apache . hc . core5 . http . ClassicHttpResponse result = execute ( request ) ; verifyMocks ( ) ; "<AssertPlaceHolder>" ; } getFirstHeader ( java . lang . String ) { return ( headergroup ) != null ? headergroup . getFirstHeader ( name ) : null ; }
|
org . junit . Assert . assertEquals ( warning , result . getFirstHeader ( "Warning" ) . getValue ( ) )
|
getScheduleChangedReportMessage ( ) { org . openhab . binding . zwave . internal . protocol . commandclass . ZWaveClimateControlScheduleCommandClass cls = ( ( org . openhab . binding . zwave . internal . protocol . commandclass . ZWaveClimateControlScheduleCommandClass ) ( getCommandClass ( CommandClass . COMMAND_CLASS_CLIMATE_CONTROL_SCHEDULE ) ) ) ; byte [ ] expectedResponse = new byte [ ] { 99 , 3 , 70 , 5 , 0 } ; org . openhab . binding . zwave . internal . protocol . SerialMessage msg = cls . getScheduleChangedReportMessage ( ( ( byte ) ( 0 ) ) ) . getSerialMessage ( ) ; "<AssertPlaceHolder>" ; } getMessagePayload ( ) { return messagePayload ; }
|
org . junit . Assert . assertArrayEquals ( expectedResponse , msg . getMessagePayload ( ) )
|
testDockerFileOptimisation ( ) { io . fabric8 . maven . docker . assembly . Arguments a = Arguments . Builder . get ( ) . withParam ( "c1" ) . withParam ( "echo<sp>fourth" 3 ) . build ( ) ; java . lang . String dockerfileContent = new io . fabric8 . maven . docker . assembly . DockerFileBuilder ( ) . add ( "/src" , "/dest" ) . baseImage ( "echo<sp>fourth" 4 ) . cmd ( a ) . env ( com . google . common . collect . ImmutableMap . of ( "foo" , "bar" ) ) . basedir ( "echo<sp>fourth" 8 ) . expose ( io . fabric8 . maven . docker . assembly . Collections . singletonList ( "echo<sp>fourth" 1 ) ) . maintainer ( "maintainer@example.com" ) . workdir ( "echo<sp>fourth" 5 ) . labels ( com . google . common . collect . ImmutableMap . of ( "com.acme.foobar" , "How<sp>are<sp>\"you\"echo<sp>fourth" 0 ) ) . volumes ( io . fabric8 . maven . docker . assembly . Collections . singletonList ( "echo<sp>fourth" 2 ) ) . run ( io . fabric8 . maven . docker . assembly . Arrays . asList ( "foo" 0 , "echo<sp>fourth" 7 , "echo<sp>fourth" 6 , "echo<sp>fourth" , "echo<sp>fourth" 9 ) ) . optimise ( ) . content ( ) ; java . lang . String expected = loadFile ( "docker/Dockerfile_optimised.test" ) ; "<AssertPlaceHolder>" ; } stripCR ( java . lang . String ) { return input . replaceAll ( "\r" , "" ) ; }
|
org . junit . Assert . assertEquals ( expected , stripCR ( dockerfileContent ) )
|
getAlreadyAssignedFields_yieldFieldFromBaseClass ( ) { org . vaadin . teemu . clara . binder . BinderTest . SubcontrollerWithoutFieldBinding controller = new org . vaadin . teemu . clara . binder . BinderTest . SubcontrollerWithoutFieldBinding ( new com . vaadin . ui . Button ( "myButton" ) ) ; org . vaadin . teemu . clara . binder . Binder binder = new org . vaadin . teemu . clara . binder . Binder ( ) ; java . util . Map < java . lang . String , com . vaadin . ui . Component > assignedFields = binder . getAlreadyAssignedFields ( controller ) ; "<AssertPlaceHolder>" ; } getAlreadyAssignedFields ( java . lang . Object ) { if ( controller == null ) { return java . util . Collections . emptyMap ( ) ; } java . util . Map < java . lang . String , com . vaadin . ui . Component > assignedFields = new java . util . HashMap < java . lang . String , com . vaadin . ui . Component > ( ) ; for ( java . lang . reflect . Field field : org . vaadin . teemu . clara . util . ReflectionUtils . getAllDeclaredFieldsAnnotatedWith ( controller . getClass ( ) , org . vaadin . teemu . clara . binder . annotation . UiField . class ) ) { try { field . setAccessible ( true ) ; java . lang . Object value = field . get ( controller ) ; if ( value instanceof com . vaadin . ui . Component ) { assignedFields . put ( extractComponentId ( field ) , ( ( com . vaadin . ui . Component ) ( value ) ) ) ; } } catch ( java . lang . IllegalAccessException e ) { getLogger ( ) . log ( Level . WARNING , "Exception<sp>while<sp>accessing<sp>controller<sp>object<sp>fields." , e ) ; } } return assignedFields ; }
|
org . junit . Assert . assertEquals ( 1 , assignedFields . size ( ) )
|
equals_replaceDataDifferent_returnsFalse ( ) { com . amazonaws . services . dynamodbv2 . AcquireLockOptions left = createLockOptions ( ) ; com . amazonaws . services . dynamodbv2 . AcquireLockOptions right = com . amazonaws . services . dynamodbv2 . AcquireLockOptions . builder ( "partitionKey" ) . withSortKey ( "sortKey" ) . withData ( java . nio . ByteBuffer . wrap ( "data" . getBytes ( ) ) ) . withReplaceData ( false ) . withDeleteLockOnRelease ( true ) . withAcquireOnlyIfLockAlreadyExists ( false ) . withRefreshPeriod ( 1L ) . withAdditionalTimeToWaitForLock ( 1L ) . withTimeUnit ( TimeUnit . MILLISECONDS ) . withAdditionalAttributes ( new java . util . HashMap ( ) ) . withUpdateExistingLockRecord ( false ) . withAcquireReleasedLocksConsistently ( false ) . build ( ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( other == null ) || ( ! ( other instanceof com . amazonaws . services . dynamodbv2 . AcquireLockOptions ) ) ) { return false ; } final com . amazonaws . services . dynamodbv2 . AcquireLockOptions otherOptions = ( ( com . amazonaws . services . dynamodbv2 . AcquireLockOptions ) ( other ) ) ; return ( ( ( ( ( ( ( ( ( ( ( ( ( java . util . Objects . equals ( this . partitionKey , otherOptions . partitionKey ) ) && ( java . util . Objects . equals ( this . sortKey , otherOptions . sortKey ) ) ) && ( java . util . Objects . equals ( this . data , otherOptions . data ) ) ) && ( java . util . Objects . equals ( this . replaceData , otherOptions . replaceData ) ) ) && ( java . util . Objects . equals ( this . deleteLockOnRelease , otherOptions . deleteLockOnRelease ) ) ) && ( java . util . Objects . equals ( this . acquireOnlyIfLockAlreadyExists , otherOptions . acquireOnlyIfLockAlreadyExists ) ) ) && ( java . util . Objects . equals ( this . refreshPeriod , otherOptions . refreshPeriod ) ) ) && ( java . util . Objects . equals ( this . additionalTimeToWaitForLock , otherOptions . additionalTimeToWaitForLock ) ) ) && ( java . util . Objects . equals ( this . timeUnit , otherOptions . timeUnit ) ) ) && ( java . util . Objects . equals ( this . additionalAttributes , otherOptions . additionalAttributes ) ) ) && ( java . util . Objects . equals ( this . sessionMonitor , otherOptions . sessionMonitor ) ) ) && ( java . util . Objects . equals ( this . updateExistingLockRecord , otherOptions . updateExistingLockRecord ) ) ) && ( java . util . Objects . equals ( this . shouldSkipBlockingWait , otherOptions . shouldSkipBlockingWait ) ) ) && ( java . util . Objects . equals ( this . acquireReleasedLocksConsistently , otherOptions . acquireReleasedLocksConsistently ) ) ; }
|
org . junit . Assert . assertFalse ( left . equals ( right ) )
|
testStatsDHistogramReporting ( ) { org . apache . flink . runtime . metrics . MetricRegistryImpl registry = null ; org . apache . flink . metrics . statsd . StatsDReporterTest . DatagramSocketReceiver receiver = null ; java . lang . Thread receiverThread = null ; long timeout = 5000 ; long joinTimeout = 30000 ; java . lang . String histogramName = ".count:1|g" 0 ; try { receiver = new org . apache . flink . metrics . statsd . StatsDReporterTest . DatagramSocketReceiver ( ) ; receiverThread = new java . lang . Thread ( receiver ) ; receiverThread . start ( ) ; int port = receiver . getPort ( ) ; org . apache . flink . configuration . Configuration config = new org . apache . flink . configuration . Configuration ( ) ; config . setString ( ( ( ( org . apache . flink . configuration . ConfigConstants . METRICS_REPORTER_PREFIX ) + ".count:1|g" 5 ) + ( org . apache . flink . configuration . ConfigConstants . METRICS_REPORTER_CLASS_SUFFIX ) ) , org . apache . flink . metrics . statsd . StatsDReporter . class . getName ( ) ) ; config . setString ( ( ( ( org . apache . flink . configuration . ConfigConstants . METRICS_REPORTER_PREFIX ) + ".count:1|g" 5 ) + ( org . apache . flink . configuration . ConfigConstants . METRICS_REPORTER_INTERVAL_SUFFIX ) ) , "1<sp>SECONDS" ) ; config . setString ( ( ( org . apache . flink . configuration . ConfigConstants . METRICS_REPORTER_PREFIX ) + "test.host" ) , "localhost" ) ; config . setString ( ( ( org . apache . flink . configuration . ConfigConstants . METRICS_REPORTER_PREFIX ) + "test.port" ) , ( "" + port ) ) ; registry = new org . apache . flink . runtime . metrics . MetricRegistryImpl ( org . apache . flink . runtime . metrics . MetricRegistryConfiguration . fromConfiguration ( config ) ) ; org . apache . flink . runtime . metrics . groups . TaskManagerMetricGroup metricGroup = new org . apache . flink . runtime . metrics . groups . TaskManagerMetricGroup ( registry , "localhost" , "tmId" ) ; org . apache . flink . metrics . statsd . StatsDReporterTest . TestingHistogram histogram = new org . apache . flink . metrics . statsd . StatsDReporterTest . TestingHistogram ( ) ; metricGroup . histogram ( histogramName , histogram ) ; receiver . waitUntilNumLines ( 11 , timeout ) ; java . util . Set < java . lang . String > lines = receiver . getLines ( ) ; java . lang . String prefix = metricGroup . getMetricIdentifier ( histogramName ) ; java . util . Set < java . lang . String > expectedLines = new java . util . HashSet ( ) ; expectedLines . add ( ( prefix + ".count:1|g" ) ) ; expectedLines . add ( ( prefix + ".count:1|g" 7 ) ) ; expectedLines . add ( ( prefix + ".count:1|g" 8 ) ) ; expectedLines . add ( ( prefix + ".count:1|g" 3 ) ) ; expectedLines . add ( ( prefix + ".stddev:4.0|g" ) ) ; expectedLines . add ( ( prefix + ".count:1|g" 4 ) ) ; expectedLines . add ( ( prefix + ".count:1|g" 1 ) ) ; expectedLines . add ( ( prefix + ".count:1|g" 2 ) ) ; expectedLines . add ( ( prefix + ".count:1|g" 6 ) ) ; expectedLines . add ( ( prefix + ".p95:0.95|g" ) ) ; expectedLines . add ( ( prefix + ".p50:0.5|g" ) ) ; "<AssertPlaceHolder>" ; } finally { if ( registry != null ) { registry . shutdown ( ) . get ( ) ; } if ( receiver != null ) { receiver . stop ( ) ; } if ( receiverThread != null ) { receiverThread . join ( joinTimeout ) ; } } } add ( org . apache . flink . runtime . taskmanager . Task ) { org . apache . flink . util . Preconditions . checkArgument ( task . getJobID ( ) . equals ( jobId ) , ( "The<sp>task's<sp>job<sp>id<sp>does<sp>not<sp>match<sp>the<sp>" + "job<sp>id<sp>for<sp>which<sp>the<sp>slot<sp>has<sp>been<sp>allocated." ) ) ; org . apache . flink . util . Preconditions . checkArgument ( task . getAllocationId ( ) . equals ( allocationId ) , ( "The<sp>task's<sp>allocation<sp>" + "id<sp>does<sp>not<sp>match<sp>the<sp>allocation<sp>id<sp>for<sp>which<sp>the<sp>slot<sp>has<sp>been<sp>allocated." ) ) ; org . apache . flink . util . Preconditions . checkState ( ( ( TaskSlotState . ACTIVE ) == ( state ) ) , "The<sp>task<sp>slot<sp>is<sp>not<sp>in<sp>state<sp>active." ) ; org . apache . flink . runtime . taskmanager . Task oldTask = tasks . put ( task . getExecutionId ( ) , task ) ; if ( oldTask != null ) { tasks . put ( task . getExecutionId ( ) , oldTask ) ; return false ; } else { return true ; } }
|
org . junit . Assert . assertEquals ( expectedLines , lines )
|
testCloneWithParam ( ) { org . pentaho . di . trans . TransMeta transMeta = new org . pentaho . di . trans . TransMeta ( "transFile" , "myTrans" ) ; transMeta . addParameterDefinition ( "key" , "defValue" , "description" ) ; java . lang . Object clone = transMeta . realClone ( true ) ; "<AssertPlaceHolder>" ; } realClone ( boolean ) { try { org . pentaho . di . trans . TransMeta transMeta = ( ( org . pentaho . di . trans . TransMeta ) ( super . clone ( ) ) ) ; if ( doClear ) { transMeta . clear ( ) ; } else { transMeta . databases = new java . util . ArrayList ( ) ; transMeta . steps = new java . util . ArrayList ( ) ; transMeta . hops = new java . util . ArrayList ( ) ; transMeta . notes = new java . util . ArrayList ( ) ; transMeta . dependencies = new java . util . ArrayList ( ) ; transMeta . partitionSchemas = new java . util . ArrayList ( ) ; transMeta . slaveServers = new java . util . ArrayList ( ) ; transMeta . clusterSchemas = new java . util . ArrayList ( ) ; transMeta . namedParams = new org . pentaho . di . core . parameters . NamedParamsDefault ( ) ; transMeta . stepChangeListeners = new java . util . ArrayList ( ) ; } for ( org . pentaho . di . core . database . DatabaseMeta db : databases ) { transMeta . addDatabase ( ( ( org . pentaho . di . core . database . DatabaseMeta ) ( db . clone ( ) ) ) ) ; } for ( org . pentaho . di . trans . step . StepMeta step : steps ) { transMeta . addStep ( ( ( org . pentaho . di . trans . step . StepMeta ) ( step . clone ( ) ) ) ) ; } for ( org . pentaho . di . trans . step . StepMeta step : transMeta . getSteps ( ) ) { final org . pentaho . di . trans . step . StepMetaInterface stepMetaInterface = step . getStepMetaInterface ( ) ; if ( stepMetaInterface != null ) { final org . pentaho . di . trans . step . StepIOMetaInterface stepIOMeta = stepMetaInterface . getStepIOMeta ( ) ; if ( stepIOMeta != null ) { for ( org . pentaho . di . trans . step . errorhandling . StreamInterface stream : stepIOMeta . getInfoStreams ( ) ) { java . lang . String streamStepName = stream . getStepname ( ) ; if ( streamStepName != null ) { org . pentaho . di . trans . step . StepMeta streamStepMeta = transMeta . findStep ( streamStepName ) ; stream . setStepMeta ( streamStepMeta ) ; } } } } } for ( org . pentaho . di . trans . TransHopMeta hop : hops ) { transMeta . addTransHop ( ( ( org . pentaho . di . trans . TransHopMeta ) ( hop . clone ( ) ) ) ) ; } for ( org . pentaho . di . core . NotePadMeta note : notes ) { transMeta . addNote ( ( ( org . pentaho . di . core . NotePadMeta ) ( note . clone ( ) ) ) ) ; } for ( org . pentaho . di . trans . TransDependency dep : dependencies ) { transMeta . addDependency ( ( ( org . pentaho . di . trans . TransDependency ) ( dep . clone ( ) ) ) ) ; } for ( org . pentaho . di . cluster . SlaveServer slave : slaveServers ) { transMeta . getSlaveServers ( ) . add ( ( ( org . pentaho . di . cluster . SlaveServer ) ( slave . clone ( ) ) ) ) ; } for ( org . pentaho . di . cluster . ClusterSchema schema : clusterSchemas ) { transMeta . getClusterSchemas ( ) . add ( schema . clone ( ) ) ; } for ( org . pentaho . di . partition . PartitionSchema schema : partitionSchemas ) { transMeta . getPartitionSchemas ( ) . add ( ( ( org . pentaho . di . partition . PartitionSchema ) ( schema . clone ( ) ) ) ) ; } for ( java . lang . String key : listParameters ( ) ) { transMeta . addParameterDefinition ( key , getParameterDefault ( key ) , getParameterDescription ( key ) ) ; } return transMeta ; } catch ( java . lang . Exception e ) { e . printStackTrace ( ) ; return null ; } }
|
org . junit . Assert . assertNotNull ( clone )
|
enkeleAutorisatieZonderRol ( ) { addAutorisaties ( "000123" , SoortDienst . ATTENDERING , SoortDienst . ZOEK_PERSOON ) ; "<AssertPlaceHolder>" ; } bepaalAutorisatie ( java . lang . String , nl . bzk . algemeenbrp . dal . domein . brp . enums . Rol , nl . bzk . algemeenbrp . dal . domein . brp . enums . SoortDienst ) { if ( partijCode == null ) { nl . bzk . brp . service . gba . autorisatie . GbaAutorisaties . LOGGER . info ( "Geen<sp>autorisatie<sp>gevonden<sp>voor<sp>lege<sp>partijCode." ) ; return java . util . Optional . empty ( ) ; } final java . util . List < nl . bzk . brp . domain . algemeen . Autorisatiebundel > autorisatiebundels = leveringsAutorisatieCache . geefToegangleveringautorisatiesVoorGeautoriseerdePartij ( partijCode ) . stream ( ) . filter ( this :: isGba ) . filter ( this :: isGeldig ) . filter ( ( toegang ) -> ( java . util . Objects . isNull ( rol ) ) || ( rol == ( toegang . getGeautoriseerde ( ) . getRol ( ) ) ) ) . map ( ( autorisatie ) -> org . apache . commons . lang3 . tuple . ImmutablePair . of ( autorisatie , bepaalDienst ( autorisatie . getLeveringsautorisatie ( ) , soortDienst ) ) ) . filter ( ( pair ) -> pair . getRight ( ) . isPresent ( ) ) . map ( ( pair ) -> new nl . bzk . brp . domain . algemeen . Autorisatiebundel ( pair . getLeft ( ) , pair . getRight ( ) . orElseThrow ( java . lang . IllegalStateException :: new ) ) ) . collect ( java . util . stream . Collectors . toList ( ) ) ; if ( ( autorisatiebundels . size ( ) ) > 1 ) { throw new nl . bzk . brp . service . gba . autorisatie . MeerdereAutorisatiesGevondenException ( ) ; } else { return autorisatiebundels . stream ( ) . findFirst ( ) ; } }
|
org . junit . Assert . assertEquals ( true , subject . bepaalAutorisatie ( "000123" , null , SoortDienst . ZOEK_PERSOON ) . isPresent ( ) )
|
invalidReturnType ( ) { gov . hhs . fha . nhinc . patientdiscovery . aspect . MCCIIN000002UV01EventDescriptionBuilder builder = new gov . hhs . fha . nhinc . patientdiscovery . aspect . MCCIIN000002UV01EventDescriptionBuilder ( ) ; builder . setReturnValue ( new java . lang . Object ( ) ) ; gov . hhs . fha . nhinc . event . EventDescription eventDescription = getEventDescription ( builder ) ; "<AssertPlaceHolder>" ; } getEventDescription ( gov . hhs . fha . nhinc . event . EventDescriptionBuilder ) { setMsgMocks ( builder ) ; return runDirector ( builder ) ; }
|
org . junit . Assert . assertNotNull ( eventDescription )
|
testPaperMetricAddSuccess ( ) { com . alibaba . craftsman . dto . PaperMetricAddCmd paperMetricAddCmd = new com . alibaba . craftsman . dto . PaperMetricAddCmd ( ) ; com . alibaba . craftsman . dto . clientobject . PaperMetricCO paperMetricCO = new com . alibaba . craftsman . dto . clientobject . PaperMetricCO ( ) ; paperMetricCO . setOwnerId ( "PaperMetricAddCmdExeTest_098872" ) ; paperMetricCO . setPaperName ( "paperName" ) ; paperMetricCO . setPaperDesc ( "paper<sp>Description" ) ; paperMetricCO . setMagazine ( "IEEE" ) ; paperMetricCO . setPaperLink ( "http://www.alibaba.com" ) ; paperMetricAddCmd . setPaperMetricCO ( paperMetricCO ) ; com . alibaba . cola . dto . Response response = metricsService . addPaperMetric ( paperMetricAddCmd ) ; "<AssertPlaceHolder>" ; } isSuccess ( ) { return isSuccess ; }
|
org . junit . Assert . assertTrue ( response . isSuccess ( ) )
|
testArrayUpsertSmallIntWithNulls ( ) { org . apache . phoenix . end2end . Connection conn = org . apache . phoenix . end2end . DriverManager . getConnection ( getUrl ( ) ) ; java . lang . String t5 = generateUniqueName ( ) ; conn . createStatement ( ) . execute ( ( ( "CREATE<sp>TABLE<sp>" + t5 ) + "<sp>(<sp>k<sp>VARCHAR<sp>PRIMARY<sp>KEY,<sp>a<sp>SMALLINT[])" ) ) ; org . apache . phoenix . end2end . PreparedStatement stmt = conn . prepareStatement ( ( ( "UPSERT<sp>INTO<sp>" + t5 ) + "<sp>VALUES('a',ARRAY[123,456,null,456])" ) ) ; stmt . execute ( ) ; conn . commit ( ) ; org . apache . phoenix . end2end . ResultSet rs = conn . createStatement ( ) . executeQuery ( ( ( "Select<sp>a<sp>from<sp>" + t5 ) + "<sp>where<sp>k<sp>=<sp>'a'" ) ) ; rs . next ( ) ; org . apache . phoenix . end2end . Array array = conn . createArrayOf ( "SMALLINT" , new java . lang . Object [ ] { ( ( short ) ( 123 ) ) , ( ( short ) ( 456 ) ) , null , ( ( short ) ( 456 ) ) } ) ; "<AssertPlaceHolder>" ; conn . close ( ) ; } getArray ( java . util . Map ) { throw new java . lang . UnsupportedOperationException ( "Currently<sp>not<sp>supported" ) ; }
|
org . junit . Assert . assertEquals ( rs . getArray ( 1 ) , array )
|
g01_throwException1 ( ) { try { proxy . throwException1 ( ) ; org . junit . Assert . fail ( "Exception<sp>expected" ) ; } catch ( org . apache . juneau . rest . test . client . InterfaceProxyTest . InterfaceProxy . InterfaceProxyException1 e ) { "<AssertPlaceHolder>" ; } } getMessage ( ) { return msg ; }
|
org . junit . Assert . assertEquals ( "foo" , e . getMessage ( ) )
|
testBug853254 ( ) { org . openscience . cdk . interfaces . IChemObjectBuilder builder = org . openscience . cdk . silent . SilentChemObjectBuilder . getInstance ( ) ; java . lang . String filename = "data/mdl/bug853254-2.mol" ; java . io . InputStream ins = this . getClass ( ) . getClassLoader ( ) . getResourceAsStream ( filename ) ; org . openscience . cdk . io . MDLV2000Reader reader = new org . openscience . cdk . io . MDLV2000Reader ( ins , org . openscience . cdk . io . IChemObjectReader . Mode . STRICT ) ; org . openscience . cdk . interfaces . IAtomContainer superstructure = reader . read ( builder . newAtomContainer ( ) ) ; filename = "data/mdl/bug853254-1.mol" ; ins = this . getClass ( ) . getClassLoader ( ) . getResourceAsStream ( filename ) ; reader = new org . openscience . cdk . io . MDLV2000Reader ( ins , org . openscience . cdk . io . IChemObjectReader . Mode . STRICT ) ; org . openscience . cdk . interfaces . IAtomContainer substructure = reader . read ( builder . newAtomContainer ( ) ) ; org . openscience . cdk . tools . manipulator . AtomContainerManipulator . percieveAtomTypesAndConfigureAtoms ( superstructure ) ; org . openscience . cdk . tools . manipulator . AtomContainerManipulator . percieveAtomTypesAndConfigureAtoms ( substructure ) ; org . openscience . cdk . aromaticity . Aromaticity . cdkLegacy ( ) . apply ( superstructure ) ; org . openscience . cdk . aromaticity . Aromaticity . cdkLegacy ( ) . apply ( substructure ) ; org . openscience . cdk . fingerprint . IFingerprinter fingerprinter = getBitFingerprinter ( ) ; java . util . BitSet superBS = fingerprinter . getBitFingerprint ( superstructure ) . asBitSet ( ) ; java . util . BitSet subBS = fingerprinter . getBitFingerprint ( substructure ) . asBitSet ( ) ; boolean isSubset = org . openscience . cdk . fingerprint . FingerprinterTool . isSubset ( superBS , subBS ) ; "<AssertPlaceHolder>" ; } isSubset ( java . util . BitSet , java . util . BitSet ) { java . util . BitSet clone = ( ( java . util . BitSet ) ( bs1 . clone ( ) ) ) ; clone . and ( bs2 ) ; if ( clone . equals ( bs2 ) ) { return true ; } return false ; }
|
org . junit . Assert . assertTrue ( isSubset )
|
testGetUserIdentifier ( ) { System . out . println ( "getUserIdentifier" ) ; java . lang . String expResult = edu . harvard . iq . dataverse . authorization . users . AuthenticatedUserTest . testUser . getUserIdentifier ( ) ; "<AssertPlaceHolder>" ; } getUserIdentifier ( ) { return userIdentifier ; }
|
org . junit . Assert . assertEquals ( expResult , edu . harvard . iq . dataverse . authorization . users . AuthenticatedUserTest . testUser . getUserIdentifier ( ) )
|
shouldHaveName ( ) { com . qcadoo . view . internal . api . ComponentPattern pattern = new com . qcadoo . view . internal . components . form . FormComponentPattern ( getComponentDefinition ( "testName" , null ) ) ; java . lang . String name = pattern . getName ( ) ; "<AssertPlaceHolder>" ; } getName ( ) { return name ; }
|
org . junit . Assert . assertEquals ( "testName" , name )
|
testVerify ( ) { org . jscep . client . verification . CertificateVerifier verifier = new org . jscep . client . verification . OptimisticCertificateVerifier ( ) ; "<AssertPlaceHolder>" ; } verify ( java . security . cert . X509Certificate ) { return this . cert . equals ( cert ) ; }
|
org . junit . Assert . assertTrue ( verifier . verify ( mock ( java . security . cert . X509Certificate . class ) ) )
|
testPlayerMoveIntoBannedIsland ( ) { org . bukkit . entity . Player player = mock ( org . bukkit . entity . Player . class ) ; when ( player . getUniqueId ( ) ) . thenReturn ( uuid ) ; when ( im . hasIsland ( org . mockito . Mockito . any ( ) , org . mockito . Mockito . eq ( uuid ) ) ) . thenReturn ( true ) ; when ( player . getLocation ( ) ) . thenReturn ( outside ) ; when ( island . isBanned ( org . mockito . Mockito . eq ( uuid ) ) ) . thenReturn ( true ) ; org . bukkit . event . player . PlayerMoveEvent e = new org . bukkit . event . player . PlayerMoveEvent ( player , outside , inside ) ; listener . onPlayerMove ( e ) ; "<AssertPlaceHolder>" ; org . mockito . Mockito . verify ( notifier ) . notify ( org . mockito . Mockito . any ( ) , org . mockito . Mockito . anyString ( ) ) ; org . mockito . Mockito . verify ( im , org . mockito . Mockito . never ( ) ) . homeTeleport ( org . mockito . Mockito . any ( ) , org . mockito . Mockito . eq ( player ) ) ; } isCancelled ( ) { return cancelled ; }
|
org . junit . Assert . assertTrue ( e . isCancelled ( ) )
|
operationsWhileDraining ( ) { org . mockito . ArgumentCaptor < io . grpc . internal . ClientStreamListener > sublistenerCaptor1 = org . mockito . ArgumentCaptor . forClass ( io . grpc . internal . ClientStreamListener . class ) ; final java . util . concurrent . atomic . AtomicReference < io . grpc . internal . ClientStreamListener > sublistenerCaptor2 = new java . util . concurrent . atomic . AtomicReference ( ) ; final io . grpc . Status cancelStatus = Status . CANCELLED . withDescription ( "c" ) ; io . grpc . internal . ClientStream mockStream1 = mock ( io . grpc . internal . ClientStream . class , delegatesTo ( new io . grpc . internal . NoopClientStream ( ) { @ io . grpc . internal . Override public void request ( int numMessages ) { retriableStream . sendMessage ( ( "substream1<sp>request<sp>" + numMessages ) ) ; if ( numMessages > 1 ) { retriableStream . request ( ( -- numMessages ) ) ; } } } ) ) ; final io . grpc . internal . ClientStream mockStream2 = mock ( io . grpc . internal . ClientStream . class , delegatesTo ( new io . grpc . internal . NoopClientStream ( ) { @ io . grpc . internal . Override public void start ( io . grpc . internal . ClientStreamListener listener ) { sublistenerCaptor2 . set ( listener ) ; } @ io . grpc . internal . Override public void request ( int numMessages ) { retriableStream . sendMessage ( ( "substream2<sp>request<sp>" + numMessages ) ) ; if ( numMessages == 3 ) { sublistenerCaptor2 . get ( ) . headersRead ( new io . grpc . Metadata ( ) ) ; } if ( numMessages == 2 ) { retriableStream . request ( 100 ) ; } if ( numMessages == 100 ) { retriableStream . cancel ( cancelStatus ) ; } } } ) ) ; org . mockito . InOrder inOrder = inOrder ( retriableStreamRecorder , mockStream1 , mockStream2 ) ; doReturn ( mockStream1 ) . when ( retriableStreamRecorder ) . newSubstream ( 0 ) ; retriableStream . start ( masterListener ) ; inOrder . verify ( mockStream1 ) . start ( sublistenerCaptor1 . capture ( ) ) ; retriableStream . request ( 3 ) ; inOrder . verify ( mockStream1 ) . request ( 3 ) ; inOrder . verify ( mockStream1 ) . writeMessage ( any ( java . io . InputStream . class ) ) ; inOrder . verify ( mockStream1 ) . request ( 2 ) ; inOrder . verify ( mockStream1 ) . writeMessage ( any ( java . io . InputStream . class ) ) ; inOrder . verify ( mockStream1 ) . request ( 1 ) ; inOrder . verify ( mockStream1 ) . writeMessage ( any ( java . io . InputStream . class ) ) ; doReturn ( mockStream2 ) . when ( retriableStreamRecorder ) . newSubstream ( 1 ) ; sublistenerCaptor1 . getValue ( ) . closed ( io . grpc . Status . fromCode ( io . grpc . internal . RetriableStreamTest . RETRIABLE_STATUS_CODE_1 ) , new io . grpc . Metadata ( ) ) ; "<AssertPlaceHolder>" ; retriableStream . request ( 789 ) ; fakeClock . forwardTime ( ( ( long ) ( ( io . grpc . internal . RetriableStreamTest . INITIAL_BACKOFF_IN_SECONDS ) * ( io . grpc . internal . RetriableStreamTest . FAKE_RANDOM ) ) ) , TimeUnit . SECONDS ) ; inOrder . verify ( mockStream2 ) . start ( sublistenerCaptor2 . get ( ) ) ; inOrder . verify ( mockStream2 ) . request ( 3 ) ; inOrder . verify ( retriableStreamRecorder ) . postCommit ( ) ; inOrder . verify ( mockStream2 ) . writeMessage ( any ( java . io . InputStream . class ) ) ; inOrder . verify ( mockStream2 ) . request ( 2 ) ; inOrder . verify ( mockStream2 ) . writeMessage ( any ( java . io . InputStream . class ) ) ; inOrder . verify ( mockStream2 ) . request ( 1 ) ; inOrder . verify ( mockStream2 ) . writeMessage ( any ( java . io . InputStream . class ) ) ; inOrder . verify ( mockStream2 ) . request ( 789 ) ; inOrder . verify ( mockStream2 , times ( 2 ) ) . writeMessage ( any ( java . io . InputStream . class ) ) ; inOrder . verify ( mockStream2 ) . request ( 100 ) ; verify ( mockStream2 ) . cancel ( cancelStatus ) ; inOrder . verify ( mockStream2 , never ( ) ) . writeMessage ( any ( java . io . InputStream . class ) ) ; } numPendingTasks ( ) { return ( dueTasks . size ( ) ) + ( scheduledTasks . size ( ) ) ; }
|
org . junit . Assert . assertEquals ( 1 , fakeClock . numPendingTasks ( ) )
|
cache_loop5 ( ) { ws . prova . kernel2 . ProvaKnowledgeBase kb = new ws . prova . reference2 . ProvaKnowledgeBaseImpl ( ) ; ws . prova . kernel2 . ProvaResultSet resultSet = new ws . prova . reference2 . ProvaResultSetImpl ( ) ; ws . prova . parser2 . ProvaParserImpl parser = new ws . prova . parser2 . ProvaParserImpl ( "rules/reloaded/loop5.prova" , new java . lang . Object [ ] { } ) ; try { java . util . List < ws . prova . kernel2 . ProvaRule > rules = parser . parse ( kb , resultSet , "rules/reloaded/loop5.prova" ) ; int [ ] numSolutions = new int [ ] { 4 } ; int i = 0 ; for ( ws . prova . kernel2 . ProvaRule rule : rules ) { if ( ( rule . getHead ( ) ) == null ) { ws . prova . kernel2 . ProvaResolutionInferenceEngine engine = new ws . prova . reference2 . ProvaResolutionInferenceEngineImpl ( kb , rule ) ; engine . run ( ) ; "<AssertPlaceHolder>" ; resultSet . getSolutions ( ) . clear ( ) ; } } } catch ( ws . prova . parser2 . ProvaParsingException e ) { e . printStackTrace ( ) ; } catch ( java . io . IOException e ) { e . printStackTrace ( ) ; } } getSolutions ( ) { return solutions ; }
|
org . junit . Assert . assertEquals ( resultSet . getSolutions ( ) . size ( ) , numSolutions [ ( i ++ ) ] )
|
testCfsettingDebugNo ( ) { final java . lang . String cfcSrc = "<cfsetting<sp>showDebugOutput=\"No\">" ; com . cflint . api . CFLintResult lintresult = cfBugs . scan ( cfcSrc , "test" ) ; "<AssertPlaceHolder>" ; } getIssues ( ) { return cflint . getBugs ( ) . getBugList ( ) ; }
|
org . junit . Assert . assertEquals ( 0 , lintresult . getIssues ( ) . size ( ) )
|
testBuildTableNameNonRootServicePathDataModelByEntityNoEncoding ( ) { System . out . println ( ( ( ( ( getTestTraceHead ( "someId=someType" 4 ) ) + "--------<sp>When<sp>no<sp>encoding<sp>and<sp>when<sp>a<sp>non<sp>root<sp>service-path<sp>is<sp>notified/defaulted<sp>and<sp>data_model<sp>is<sp>" ) + "'dm-by-service-path'<sp>the<sp>MySQL<sp>table<sp>name<sp>is<sp>the<sp>encoding<sp>of<sp>the<sp>concatenation<sp>of<sp><service-path>,<sp>" ) + "someId=someType" 1 ) ) ; java . lang . String attrPersistence = null ; java . lang . String batchSize = null ; java . lang . String batchTime = null ; java . lang . String batchTTL = null ; java . lang . String dataModel = "dm-by-entity" ; java . lang . String enableEncoding = "someId=someType" 3 ; java . lang . String enableGrouping = null ; java . lang . String enableLowercase = null ; java . lang . String host = null ; java . lang . String password = null ; java . lang . String port = null ; java . lang . String username = null ; com . telefonica . iot . cygnus . sinks . NGSIMySQLSink sink = new com . telefonica . iot . cygnus . sinks . NGSIMySQLSink ( ) ; sink . configure ( createContext ( attrPersistence , batchSize , batchTime , batchTTL , dataModel , enableEncoding , enableGrouping , enableLowercase , host , password , port , username ) ) ; java . lang . String servicePath = "/somePath" ; java . lang . String entity = "someId=someType" ; java . lang . String attribute = null ; try { java . lang . String builtTableName = sink . buildTableName ( servicePath , entity , attribute ) ; java . lang . String expecetedTableName = "someId=someType" 2 ; try { "<AssertPlaceHolder>" ; System . out . println ( ( ( ( ( ( getTestTraceHead ( "someId=someType" 4 ) ) + "-<sp>OK<sp>-<sp>'" ) + builtTableName ) + "'<sp>is<sp>equals<sp>to<sp>the<sp>encoding<sp>of<sp><service-path>,<sp><entityId><sp>" ) + "and<sp><entityType>" ) ) ; } catch ( java . lang . AssertionError e ) { System . out . println ( ( ( ( ( ( getTestTraceHead ( "someId=someType" 4 ) ) + "-<sp>FAIL<sp>-<sp>'" ) + builtTableName ) + "'<sp>is<sp>not<sp>equals<sp>to<sp>the<sp>encoding<sp>of<sp><service-path>,<sp>" ) + "someId=someType" 1 ) ) ; throw e ; } } catch ( java . lang . Exception e ) { System . out . println ( ( ( getTestTraceHead ( "someId=someType" 4 ) ) + "someId=someType" 0 ) ) ; throw e ; } buildTableName ( java . lang . String , java . lang . String , java . lang . String ) { java . lang . String name ; switch ( dataModel ) { case DMBYSERVICEPATH : name = com . telefonica . iot . cygnus . utils . NGSICharsets . encodePostgreSQL ( servicePath ) ; break ; case DMBYENTITY : java . lang . String truncatedServicePath = com . telefonica . iot . cygnus . utils . NGSICharsets . encodePostgreSQL ( servicePath ) ; name = ( truncatedServicePath . isEmpty ( ) ? "" : truncatedServicePath + ( com . telefonica . iot . cygnus . utils . CommonConstants . CONCATENATOR ) ) + ( com . telefonica . iot . cygnus . utils . NGSICharsets . encodePostgreSQL ( entity ) ) ; break ; case DMBYATTRIBUTE : truncatedServicePath = com . telefonica . iot . cygnus . utils . NGSICharsets . encodePostgreSQL ( servicePath ) ; name = ( ( ( truncatedServicePath . isEmpty ( ) ? "" : truncatedServicePath + ( com . telefonica . iot . cygnus . utils . CommonConstants . CONCATENATOR ) ) + ( com . telefonica . iot . cygnus . utils . NGSICharsets . encodePostgreSQL ( entity ) ) ) + ( com . telefonica . iot . cygnus . utils . CommonConstants . CONCATENATOR ) ) + ( com . telefonica . iot . cygnus . utils . NGSICharsets . encodePostgreSQL ( attribute ) ) ; break ; default : throw new com . telefonica . iot . cygnus . errors . CygnusBadConfiguration ( ( ( "Unknown<sp>data<sp>model<sp>'" + ( dataModel . toString ( ) ) ) + "'.<sp>Please,<sp>use<sp>dm-by-service-path,<sp>dm-by-entity<sp>or<sp>dm-by-attribute" ) ) ; } if ( ( name . length ( ) ) > ( com . telefonica . iot . cygnus . utils . NGSIConstants . POSTGRESQL_MAX_NAME_LEN ) ) { throw new com . telefonica . iot . cygnus . errors . CygnusBadConfiguration ( ( ( ( "Building<sp>table<sp>name<sp>'" + name ) + "'<sp>and<sp>its<sp>length<sp>is<sp>greater<sp>than<sp>" ) + ( com . telefonica . iot . cygnus . utils . NGSIConstants . POSTGRESQL_MAX_NAME_LEN ) ) ) ; } return name ; }
|
org . junit . Assert . assertEquals ( expecetedTableName , builtTableName )
|
testListStoragesByGroupAndIp ( ) { com . github . tobato . fastdfs . service . TrackerClientTest . LOGGER . debug ( "testListStoragesByGroupAndIp.." ) ; java . util . List < com . github . tobato . fastdfs . domain . fdfs . StorageState > list = trackerClient . listStorages ( TestConstants . DEFAULT_GROUP , TestConstants . DEFAULT_STORAGE_IP ) ; "<AssertPlaceHolder>" ; com . github . tobato . fastdfs . service . TrackerClientTest . LOGGER . debug ( "result={}" , list ) ; } listStorages ( java . lang . String , java . lang . String ) { com . github . tobato . fastdfs . service . TrackerListStoragesCommand command = new com . github . tobato . fastdfs . service . TrackerListStoragesCommand ( groupName , storageIpAddr ) ; return trackerConnectionManager . executeFdfsTrackerCmd ( command ) ; }
|
org . junit . Assert . assertNotNull ( list )
|
testGetTarget ( ) { org . openscience . cdk . interfaces . IAtomContainer expResult = org . openscience . cdk . DefaultChemObjectBuilder . getInstance ( ) . newInstance ( org . openscience . cdk . interfaces . IAtomContainer . class ) ; handler . setTarget ( expResult ) ; org . openscience . cdk . interfaces . IAtomContainer result = handler . getTarget ( ) ; "<AssertPlaceHolder>" ; } getTarget ( ) { return atoms . get ( ( ( atoms . size ( ) ) - 1 ) ) ; }
|
org . junit . Assert . assertEquals ( expResult , result )
|
of_notNull ( ) { org . javamoney . calc . banking . BalloonLoanPayment ci = org . javamoney . calc . banking . BalloonLoanPayment . of ( org . javamoney . calc . common . RateAndPeriods . of ( 0.05 , 1 ) , org . javamoney . moneta . Money . of ( 5 , "CHF" ) ) ; "<AssertPlaceHolder>" ; } of ( org . javamoney . calc . common . Rate , int ) { return new org . javamoney . calc . banking . AnnualPercentageYield ( rate , periods ) ; }
|
org . junit . Assert . assertNotNull ( ci )
|
testLoadAllSamples ( ) { org . gedcom4j . parser . GedcomParser gp = new org . gedcom4j . parser . GedcomParser ( ) ; gp . setStrictCustomTags ( false ) ; gp . setStrictLineBreaks ( false ) ; java . io . File sampleFolder = new java . io . File ( "sample" ) ; java . lang . String [ ] allFiles = sampleFolder . list ( new java . io . FilenameFilter ( ) { @ org . gedcom4j . parser . Override public boolean accept ( java . io . File dir , java . lang . String name ) { return name . endsWith ( ".ged" ) ; } } ) ; if ( allFiles != null ) { for ( java . lang . String s : allFiles ) { try { gp . load ( ( "sample/" + s ) ) ; "<AssertPlaceHolder>" ; } catch ( java . io . IOException e ) { System . out . println ( ( "Loading<sp>" + s ) ) ; throw e ; } catch ( org . gedcom4j . exception . GedcomParserException e ) { System . out . println ( ( "Loading<sp>" + s ) ) ; throw e ; } } } } getGedcom ( ) { return gedcom ; }
|
org . junit . Assert . assertNotNull ( gp . getGedcom ( ) )
|
deleteNonExistentDataTag ( ) { cern . c2mon . shared . client . configuration . api . tag . DataTag dataTag = new cern . c2mon . shared . client . configuration . api . tag . DataTag ( ) ; dataTag . setId ( 20L ) ; dataTag . setDeleted ( true ) ; java . util . List < cern . c2mon . shared . client . configuration . api . tag . Tag > tagUpdateList = java . util . Arrays . asList ( dataTag ) ; cern . c2mon . shared . client . configuration . api . Configuration config = new cern . c2mon . shared . client . configuration . api . Configuration ( 1L ) ; config . setEntities ( tagUpdateList ) ; org . easymock . EasyMock . expect ( tagFacadeGateway . isInTagCache ( 20L ) ) . andReturn ( false ) ; org . easymock . EasyMock . replay ( tagFacadeGateway ) ; "<AssertPlaceHolder>" ; org . easymock . EasyMock . verify ( tagFacadeGateway ) ; } parse ( cern . c2mon . shared . client . configuration . api . Configuration ) { if ( ( ( configuration . getEntities ( ) ) != null ) && ( ! ( configuration . getEntities ( ) . isEmpty ( ) ) ) ) { return parseConfigurationList ( configuration . getEntities ( ) ) ; } else { throw new cern . c2mon . server . configuration . parser . exception . ConfigurationParseException ( "Empty<sp>configuration<sp>received!" ) ; } }
|
org . junit . Assert . assertEquals ( 0 , parser . parse ( config ) . size ( ) )
|
testGetLocBigNegLngBigLat ( ) { System . out . println ( "getLoc" ) ; double lat = - 150 ; double lng = - 580 ; testPackage . locatonsMock instance = new testPackage . locatonsMock ( ) ; boolean expResult = false ; boolean result = instance . getLoc ( lat , lng ) ; "<AssertPlaceHolder>" ; } getLoc ( double , double ) { if ( ( ( ( latitude > 90 ) || ( latitude < ( - 90 ) ) ) || ( longitute > 180 ) ) || ( longitute < ( - 180 ) ) ) { return false ; } else { return true ; } }
|
org . junit . Assert . assertEquals ( expResult , result )
|
canEscapeQueryWithSafeForQuery ( ) { com . azure . common . implementation . PercentEscaper escaper = UrlEscapers . QUERY_ESCAPER ; java . lang . String actual = escaper . escape ( com . azure . common . implementation . UrlEscaperTests . safeForQuery ) ; "<AssertPlaceHolder>" ; } escape ( java . lang . String ) { java . lang . StringBuilder output = new java . lang . StringBuilder ( ) ; for ( int i = 0 ; i != ( utf16ToAscii ( original ) . length ( ) ) ; i ++ ) { char c = original . charAt ( i ) ; if ( c == '<sp>' ) { output . append ( ( usePlusForSpace ? "+" : com . azure . common . implementation . PercentEscaper . HEX [ '<sp>' ] ) ) ; } else if ( ( c >= 'a' ) && ( c <= 'z' ) ) { output . append ( c ) ; } else if ( ( c >= 'A' ) && ( c <= 'Z' ) ) { output . append ( c ) ; } else if ( ( c >= '0' ) && ( c <= '9' ) ) { output . append ( c ) ; } else if ( safeChars . contains ( c ) ) { output . append ( c ) ; } else { output . append ( com . azure . common . implementation . PercentEscaper . HEX [ c ] ) ; } } return output . toString ( ) ; }
|
org . junit . Assert . assertEquals ( com . azure . common . implementation . UrlEscaperTests . safeForQuery , actual )
|
testExtractCauseFrom_ExecutionException ( ) { final org . adempiere . exceptions . AdempiereException expectedCause = newAdempiereException ( ) ; final java . lang . Throwable actualCause = org . adempiere . exceptions . AdempiereException . extractCause ( new java . util . concurrent . ExecutionException ( expectedCause ) ) ; "<AssertPlaceHolder>" ; } extractCause ( java . lang . Throwable ) { final java . lang . Throwable cause = throwable . getCause ( ) ; if ( cause == null ) { return throwable ; } if ( throwable instanceof java . util . concurrent . ExecutionException ) { return cause ; } if ( throwable instanceof com . google . common . util . concurrent . UncheckedExecutionException ) { return cause ; } if ( throwable instanceof java . lang . reflect . InvocationTargetException ) { return cause ; } return throwable ; }
|
org . junit . Assert . assertSame ( expectedCause , actualCause )
|
testTimestamp ( ) { long millis = ( ( java . lang . System . currentTimeMillis ( ) ) / 1000 ) * 1000 ; java . sql . Timestamp timestamp = new java . sql . Timestamp ( millis ) ; java . sql . Timestamp result = executeBackAndForth ( timestamp , java . sql . Timestamp . class ) ; "<AssertPlaceHolder>" ; } getTime ( ) { return time ; }
|
org . junit . Assert . assertEquals ( timestamp . getTime ( ) , result . getTime ( ) )
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.