input
stringlengths
28
18.7k
output
stringlengths
39
1.69k
convertBatchesToMetricsEmptyPoints ( ) { final com . spotify . ffwd . model . Batch batch1 = com . spotify . ffwd . model . Batch . create ( java . util . Optional . of ( commonTags ) , java . util . Optional . of ( commonResources ) , com . google . common . collect . ImmutableList . of ( ) ) ; final com . spotify . ffwd . model . Batch batch2 = com . spotify . ffwd . model . Batch . create ( java . util . Optional . of ( commonTags ) , java . util . Optional . of ( commonResources ) , com . google . common . collect . ImmutableList . of ( ) ) ; final java . util . List < com . spotify . ffwd . model . Metric > results = fakeBatchablePluginSinkBase . convertBatchesToMetrics ( com . google . common . collect . ImmutableList . of ( batch1 , batch2 ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return list . size ( ) ; }
org . junit . Assert . assertEquals ( 0 , results . size ( ) )
testEncodeMatchingElement ( ) { java . lang . String path = "dc.xml" ; java . net . URI elementURI = new java . net . URI ( org . opencastproject . util . UrlSupport . concat ( org . opencastproject . mediapackage . RedirectingMediaPackageSerializerTest . SOURCE_URI_PREFIX , path ) ) ; java . net . URI encodedElementURI = serializer . encodeURI ( elementURI ) ; "<AssertPlaceHolder>" ; } concat ( java . lang . String , java . lang . String ) { return org . opencastproject . util . UrlSupport . concat ( prefix , suffix , false ) ; }
org . junit . Assert . assertEquals ( org . opencastproject . util . UrlSupport . concat ( org . opencastproject . mediapackage . RedirectingMediaPackageSerializerTest . SOURCE_URI_PREFIX , path ) , encodedElementURI . toString ( ) )
testSerialization ( ) { org . jfree . data . time . TimeTableXYDataset d1 = new org . jfree . data . time . TimeTableXYDataset ( ) ; d1 . add ( new org . jfree . data . time . Year ( 1999 ) , 123.4 , "S1" ) ; org . jfree . data . time . TimeTableXYDataset d2 = ( ( org . jfree . data . time . TimeTableXYDataset ) ( org . jfree . chart . TestUtils . serialised ( d1 ) ) ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( obj == ( this ) ) { return true ; } if ( ! ( obj instanceof org . jfree . data . xy . YWithXInterval ) ) { return false ; } org . jfree . data . xy . YWithXInterval that = ( ( org . jfree . data . xy . YWithXInterval ) ( obj ) ) ; if ( ( this . y ) != ( that . y ) ) { return false ; } if ( ( this . xLow ) != ( that . xLow ) ) { return false ; } if ( ( this . xHigh ) != ( that . xHigh ) ) { return false ; } return true ; }
org . junit . Assert . assertTrue ( d1 . equals ( d2 ) )
testSelection ( java . util . List , java . lang . String [ ] ) { java . lang . String input = java . util . stream . Stream . of ( inputs ) . collect ( java . util . stream . Collectors . joining ( com . github . horrorho . liquiddonkey . util . SelectorTest . newline ) ) ; try ( java . io . InputStream inputStream = new java . io . ByteArrayInputStream ( input . getBytes ( ) ) ; java . io . ByteArrayOutputStream outputStream = new java . io . ByteArrayOutputStream ( ) ; java . io . PrintStream printStream = new java . io . PrintStream ( outputStream ) ) { java . util . List < java . lang . String > results ; try { results = com . github . horrorho . liquiddonkey . util . Selector . builder ( com . github . horrorho . liquiddonkey . util . SelectorTest . options ) . input ( inputStream ) . output ( printStream ) . build ( ) . selection ( ) ; } catch ( java . util . NoSuchElementException ex ) { com . github . horrorho . liquiddonkey . util . SelectorTest . logger . debug ( com . github . horrorho . liquiddonkey . util . SelectorTest . marker , "--<sp>testSelection()<sp>><sp>input<sp>stream<sp>depleted" ) ; results = null ; } java . lang . String output = outputStream . toString ( ) ; com . github . horrorho . liquiddonkey . util . SelectorTest . logger . debug ( com . github . horrorho . liquiddonkey . util . SelectorTest . marker , "--<sp>testSelection()<sp>><sp>in:<sp>{}<sp>out:<sp>{}<sp>results:<sp>{}" , input , output , results ) ; "<AssertPlaceHolder>" ; } } toString ( ) { java . util . Map < java . lang . String , java . lang . String > attributesHex = hex ( attributes ) ; java . util . Map < java . lang . Integer , java . util . Map < java . lang . String , java . lang . String > > classKeysHex = classKeys . entrySet ( ) . stream ( ) . collect ( java . util . stream . Collectors . toMap ( java . util . Map . Entry :: getKey , ( e ) -> hex ( e . getValue ( ) ) ) ) ; return ( ( ( ( ( ( ( ( "KeyBag{" + "classKeys=" ) + classKeysHex ) + ",<sp>attributes=" ) + attributesHex ) + ",<sp>uuid=" ) + ( uuid ) ) + ",<sp>type=" ) + ( type ) ) + '}' ; }
org . junit . Assert . assertThat ( results , org . hamcrest . CoreMatchers . is ( expected ) )
testExists ( ) { org . apache . jackrabbit . oak . plugins . tree . impl . ImmutableTree child = immutable . getChild ( "x" ) ; "<AssertPlaceHolder>" ; } exists ( ) { return delegate . exists ( ) ; }
org . junit . Assert . assertTrue ( child . exists ( ) )
shouldReturnAllWaiveEnumForValuesNotEqualToZeroOrOne_2 ( ) { org . mifos . accounts . util . helpers . WaiveEnum result = org . mifos . accounts . util . helpers . WaiveEnum . fromInt ( 2 ) ; "<AssertPlaceHolder>" ; } fromInt ( java . lang . Integer ) { org . mifos . accounts . util . helpers . WaiveEnum waiveType = org . mifos . accounts . util . helpers . WaiveEnum . ALL ; if ( waiveTypeOrdinal == 0 ) { waiveType = org . mifos . accounts . util . helpers . WaiveEnum . FEES ; } else if ( waiveTypeOrdinal == 1 ) { waiveType = org . mifos . accounts . util . helpers . WaiveEnum . PENALTY ; } return waiveType ; }
org . junit . Assert . assertThat ( result , org . hamcrest . CoreMatchers . is ( WaiveEnum . ALL ) )
testPutConvert ( ) { net . tomp2p . dht . PeerDHT master = null ; try { net . tomp2p . dht . PeerDHT [ ] peers = net . tomp2p . dht . UtilsDHT2 . createNodes ( 2000 , net . tomp2p . dht . TestDHT . rnd , 4001 ) ; master = peers [ 0 ] ; net . tomp2p . dht . UtilsDHT2 . perfectRouting ( peers ) ; net . tomp2p . p2p . RoutingConfiguration rc = new net . tomp2p . p2p . RoutingConfiguration ( 2 , 10 , 2 ) ; net . tomp2p . p2p . RequestP2PConfiguration pc = new net . tomp2p . p2p . RequestP2PConfiguration ( 3 , 5 , 0 ) ; net . tomp2p . storage . Data data = new net . tomp2p . storage . Data ( new byte [ 44444 ] ) ; java . util . NavigableMap < net . tomp2p . peers . Number160 , net . tomp2p . storage . Data > tmp = new java . util . TreeMap < net . tomp2p . peers . Number160 , net . tomp2p . storage . Data > ( ) ; tmp . put ( new net . tomp2p . peers . Number160 ( 5 ) , data ) ; net . tomp2p . dht . FuturePut fput = peers [ 444 ] . put ( peers [ 30 ] . peerID ( ) ) . dataMapContent ( tmp ) . domainKey ( net . tomp2p . peers . Number160 . createHash ( "test" ) ) . routingConfiguration ( rc ) . requestP2PConfiguration ( pc ) . start ( ) ; fput . awaitUninterruptibly ( ) ; fput . futureRequests ( ) . awaitUninterruptibly ( ) ; System . out . println ( fput . failedReason ( ) ) ; "<AssertPlaceHolder>" ; } finally { if ( master != null ) { master . shutdown ( ) . await ( ) ; } } } isSuccess ( ) { if ( ! ( super . isSuccess ( ) ) ) { return false ; } return checkResults ( result ( ) , rawResult . size ( ) , dataSize ) ; }
org . junit . Assert . assertEquals ( true , fput . isSuccess ( ) )
testShortParam ( ) { byte [ ] bytes = "test" . getBytes ( ) ; param . handle ( bytes , bytes . length ) ; param . complete ( ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return pBarValue ; }
org . junit . Assert . assertEquals ( "test" , param . getValue ( ) )
testProcessNonEmptyBatch ( ) { com . streamsets . pipeline . sdk . TestExecutorRunner . DummyExecutor stage = new com . streamsets . pipeline . sdk . TestExecutorRunner . DummyExecutor ( ) ; com . streamsets . pipeline . sdk . ExecutorRunner . Builder builder = new com . streamsets . pipeline . sdk . ExecutorRunner . Builder ( com . streamsets . pipeline . sdk . TestExecutorRunner . DummyExecutor . class , stage ) ; com . streamsets . pipeline . sdk . ExecutorRunner runner = builder . build ( ) ; try { runner . runInit ( ) ; runner . runWrite ( com . google . common . collect . ImmutableList . of ( com . streamsets . pipeline . sdk . RecordCreator . create ( ) ) ) ; "<AssertPlaceHolder>" ; } finally { runner . runDestroy ( ) ; } } create ( ) { return com . streamsets . pipeline . sdk . RecordCreator . create ( "sdk" , "sdk:" ) ; }
org . junit . Assert . assertTrue ( stage . write )
testSetModelKey ( ) { System . out . println ( "testSetModelKey" ) ; java . lang . String value = "test.input" ; edu . oswego . csc480_hci521_2013 . shared . h2o . urlbuilders . RFBuilder instance = new edu . oswego . csc480_hci521_2013 . shared . h2o . urlbuilders . RFBuilder ( "test.hex" ) ; java . lang . String expResult = "http://localhost:54321/RF.json?model_key=test.input&data_key=test.hex" ; java . lang . String result = instance . setModelKey ( value ) . build ( encoder ) ; "<AssertPlaceHolder>" ; } build ( edu . oswego . csc480_hci521_2013 . shared . h2o . urlbuilders . UrlEncoder ) { java . lang . StringBuilder query = new java . lang . StringBuilder ( ) ; for ( java . lang . String key : args . keySet ( ) ) { for ( java . lang . String value : args . get ( key ) ) { if ( ( query . length ( ) ) == 0 ) { query . append ( key ) . append ( '=' ) . append ( encoder . encode ( value ) ) ; } else { query . append ( '&' ) . append ( key ) . append ( '=' ) . append ( encoder . encode ( value ) ) ; } } } java . lang . String url = ( ( ( ( ( ( ( protocol ) + "://" ) + ( host ) ) + ":" ) + ( port ) ) + ( page ) ) + ( ( query . length ( ) ) > 0 ? "?" : "" ) ) + ( query . toString ( ) ) ; return url ; }
org . junit . Assert . assertEquals ( expResult , result )
vcal_timezone_standard_and_daylight ( ) { biweekly . ICalendar ical = new biweekly . ICalendar ( ) ; ical . getProperties ( ) . clear ( ) ; ical . addProperty ( new biweekly . property . DateStart ( utc ( "2014-01-07<sp>09:34:00" ) ) ) ; ical . addProperty ( new biweekly . property . DateStart ( utc ( "2014-10-07<sp>09:34:00" ) ) ) ; java . io . StringWriter sw = new java . io . StringWriter ( ) ; biweekly . io . text . ICalWriter writer = new biweekly . io . text . ICalWriter ( sw , biweekly . ICalVersion . V1_0 ) ; ical . setTimezoneInfo ( americaNewYork ( ) ) ; writer . write ( ical ) ; writer . close ( ) ; java . lang . String expected = "BEGIN:VCALENDAR\r\n" + ( ( ( ( ( "VERSION:1.0\r\n" + "DTSTART:20140107T043400\r\n" ) + "DTSTART:20141007T053400\r\n" ) + "TZ:-0500\r\n" ) + "DAYLIGHT:TRUE;-0400;20140309T020000;20141102T020000;EST;EDT\r\n" ) + "END:VCALENDAR\r\n" ) ; java . lang . String actual = sw . toString ( ) ; "<AssertPlaceHolder>" ; } toString ( ) { return getValue ( ICalVersion . V2_0 ) ; }
org . junit . Assert . assertEquals ( expected , actual )
testBeansProjectJavaConfigFileRemoved ( ) { beansProject . addConfig ( "java:org.test.spring.SimpleConfigurationClass" , IBeansConfig . Type . MANUAL ) ; org . eclipse . jdt . core . IType type = javaProject . findType ( "org.test.spring.SimpleConfigurationClass" ) ; beansProject . removeConfig ( ( ( org . eclipse . core . resources . IFile ) ( type . getResource ( ) ) ) ) ; java . util . Set < org . springframework . ide . eclipse . beans . core . model . IBeansConfig > configs = beansProject . getConfigs ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return orderedStorage . size ( ) ; }
org . junit . Assert . assertEquals ( 0 , configs . size ( ) )
testGetContainerWithHierarchy ( ) { final java . lang . String pid = getRandomPid ( ) ; final org . fcrepo . kernel . api . models . Container container = containerService . findOrCreate ( session , ( "/" + pid ) ) ; final org . fcrepo . kernel . api . models . FedoraResource resource = containerService . findOrCreate ( session , ( ( "/" + pid ) + "/a/b/c/d" ) ) ; "<AssertPlaceHolder>" ; } getContainer ( ) { return getContainingNode ( getNode ( ) ) . map ( nodeConverter :: convert ) . orElse ( null ) ; }
org . junit . Assert . assertEquals ( container , resource . getContainer ( ) )
testFindType10 ( ) { org . dresdenocl . model . IModel model ; model = org . dresdenocl . modelbus . test . ModelBusTestUtility . getUML2Model ( "resources/models/model01.uml" ) ; java . util . List < java . lang . String > path ; path = new java . util . ArrayList < java . lang . String > ( ) ; path . add ( "package1" ) ; path . add ( "Type2" ) ; org . dresdenocl . pivotmodel . Type type ; type = model . findType ( path ) ; "<AssertPlaceHolder>" ; } findType ( java . util . List ) { if ( org . dresdenocl . model . base . AbstractModel . LOGGER . isDebugEnabled ( ) ) { org . dresdenocl . model . base . AbstractModel . LOGGER . debug ( ( "findType()<sp>-<sp>exit<sp>-<sp>return<sp>value=" + result ) ) ; } return result ; }
org . junit . Assert . assertNull ( type )
testDataSourceConfigurationUsernameAndPassword ( ) { org . apache . beam . sdk . options . ValueProvider < java . lang . String > usename = ValueProvider . StaticValueProvider . of ( "sa" ) ; org . apache . beam . sdk . options . ValueProvider < java . lang . String > password = ValueProvider . StaticValueProvider . of ( "sa" ) ; com . google . cloud . teleport . io . DynamicJdbcIO . DynamicDataSourceConfiguration config = DynamicJdbcIO . DynamicDataSourceConfiguration . create ( ValueProvider . StaticValueProvider . of ( "org.apache.derby.jdbc.ClientDriver" ) , ValueProvider . StaticValueProvider . of ( ( ( "jdbc:derby://localhost:" + ( com . google . cloud . teleport . io . DynamicJdbcIOTest . port ) ) + "/target/beam" ) ) ) . withUsername ( usename ) . withPassword ( password ) ; try ( java . sql . Connection conn = config . buildDatasource ( ) . getConnection ( ) ) { "<AssertPlaceHolder>" ; } } of ( com . google . cloud . teleport . values . FailsafeElement ) { return new com . google . cloud . teleport . values . FailsafeElement < > ( other . originalPayload , other . payload ) . setErrorMessage ( other . getErrorMessage ( ) ) . setStacktrace ( other . getStacktrace ( ) ) ; }
org . junit . Assert . assertTrue ( conn . isValid ( 0 ) )
testGetCurrTimeSeconds ( ) { System . out . println ( "getCurrTimeSeconds" ) ; com . bixly . pastevid . recorders . AudioCache instance = new com . bixly . pastevid . recorders . AudioCache ( ) ; int expResult = 0 ; int result = instance . getCurrTimeSeconds ( ) ; "<AssertPlaceHolder>" ; } getCurrTimeSeconds ( ) { return ( ( int ) ( ( currTimeMS ) / 1000 ) ) ; }
org . junit . Assert . assertEquals ( expResult , result )
getsAndSetsComment ( ) { com . mpatric . mp3agic . ID3v2CommentFrameData frameData = new com . mpatric . mp3agic . ID3v2CommentFrameData ( false ) ; com . mpatric . mp3agic . EncodedText comment = new com . mpatric . mp3agic . EncodedText ( "my<sp>comment" ) ; frameData . setComment ( comment ) ; "<AssertPlaceHolder>" ; } getComment ( ) { return comment ; }
org . junit . Assert . assertEquals ( comment , frameData . getComment ( ) )
setCredentials ( ) { updater . createUser ( org . apache . druid . security . authentication . CoordinatorBasicAuthenticatorMetadataStorageUpdaterTest . AUTHENTICATOR_NAME , "druid" ) ; updater . setUserCredentials ( org . apache . druid . security . authentication . CoordinatorBasicAuthenticatorMetadataStorageUpdaterTest . AUTHENTICATOR_NAME , "druid" , new org . apache . druid . security . basic . authentication . entity . BasicAuthenticatorCredentialUpdate ( "helloworld" , null ) ) ; java . util . Map < java . lang . String , org . apache . druid . security . basic . authentication . entity . BasicAuthenticatorUser > userMap = org . apache . druid . security . basic . BasicAuthUtils . deserializeAuthenticatorUserMap ( objectMapper , updater . getCurrentUserMapBytes ( org . apache . druid . security . authentication . CoordinatorBasicAuthenticatorMetadataStorageUpdaterTest . AUTHENTICATOR_NAME ) ) ; org . apache . druid . security . basic . authentication . entity . BasicAuthenticatorCredentials credentials = userMap . get ( "druid" ) . getCredentials ( ) ; byte [ ] recalculatedHash = org . apache . druid . security . basic . BasicAuthUtils . hashPassword ( "helloworld" . toCharArray ( ) , credentials . getSalt ( ) , credentials . getIterations ( ) ) ; "<AssertPlaceHolder>" ; } getHash ( ) { return hash ; }
org . junit . Assert . assertArrayEquals ( credentials . getHash ( ) , recalculatedHash )
testFindTopKHeap2of4 ( ) { java . util . Collection < org . neo4j . graphalgo . impl . util . TopKConsumerTest . Item > topItems = org . neo4j . graphalgo . similarity . TopKConsumer . topK ( asList ( org . neo4j . graphalgo . impl . util . TopKConsumerTest . ITEM2 , org . neo4j . graphalgo . impl . util . TopKConsumerTest . ITEM4 ) , 4 , org . neo4j . graphalgo . impl . util . TopKConsumerTest . Item :: compareTo ) ; "<AssertPlaceHolder>" ; for ( org . neo4j . graphalgo . impl . util . TopKConsumerTest . Item topItem : topItems ) { System . out . println ( topItem ) ; } }
org . junit . Assert . assertEquals ( asList ( org . neo4j . graphalgo . impl . util . TopKConsumerTest . ITEM4 , org . neo4j . graphalgo . impl . util . TopKConsumerTest . ITEM2 ) , topItems )
testFull ( ) { byte [ ] bytes = new byte [ 29 ] ; io . datakernel . http . HttpDate . render ( 4073580000L , bytes , 0 ) ; "<AssertPlaceHolder>" ; } parse ( byte [ ] , int ) { try { int day = io . datakernel . http . HttpUtils . trimAndDecodePositiveInt ( bytes , ( start + 5 ) , 2 ) ; int month = - 1 ; for ( int i = 0 ; i < ( io . datakernel . http . HttpDate . MONTHS_IN_YEAR . length ) ; i ++ ) { byte [ ] entry = io . datakernel . http . HttpDate . MONTHS_IN_YEAR [ i ] ; if ( ( ( ( entry [ 0 ] ) == ( bytes [ ( start + 8 ) ] ) ) && ( ( entry [ 1 ] ) == ( bytes [ ( start + 9 ) ] ) ) ) && ( ( entry [ 2 ] ) == ( bytes [ ( start + 10 ) ] ) ) ) { month = i ; } } int yearLength = ( ( '0' <= ( bytes [ ( ( start + 12 ) + 2 ) ] ) ) && ( ( bytes [ ( ( start + 12 ) + 2 ) ] ) <= '9' ) ) ? 4 : 2 ; int year = ( yearLength == 2 ? 2000 : 0 ) + ( io . datakernel . http . HttpUtils . trimAndDecodePositiveInt ( bytes , ( start + 12 ) , yearLength ) ) ; int hour = io . datakernel . http . HttpUtils . trimAndDecodePositiveInt ( bytes , ( ( start + 13 ) + yearLength ) , 2 ) ; int minutes = io . datakernel . http . HttpUtils . trimAndDecodePositiveInt ( bytes , ( ( start + 16 ) + yearLength ) , 2 ) ; int seconds = io . datakernel . http . HttpUtils . trimAndDecodePositiveInt ( bytes , ( ( start + 19 ) + yearLength ) , 2 ) ; boolean isLeapYear = io . datakernel . http . HttpDate . isLeap ( year ) ; int [ ] days = ( isLeapYear ) ? io . datakernel . http . HttpDate . DAYS_IN_MONTH_LEAP : io . datakernel . http . HttpDate . DAYS_IN_MONTH ; year = year - 1970 ; int yearsLeft = year % 4 ; long timestamp = 0 ; int fy = ( year - yearsLeft ) / 4 ; for ( int i = 0 ; i < fy ; i ++ ) { timestamp += io . datakernel . http . HttpDate . FOUR_YEAR_SECONDS ; } timestamp += yearsLeft * ( io . datakernel . http . HttpDate . YEAR_SECONDS ) ; if ( yearsLeft > 2 ) { timestamp += io . datakernel . http . HttpDate . DAY_SECONDS ; } for ( int i = 0 ; i < month ; i ++ ) { timestamp += ( io . datakernel . http . HttpDate . DAY_SECONDS ) * ( days [ i ] ) ; } for ( int i = 1 ; i < day ; i ++ ) { timestamp += io . datakernel . http . HttpDate . DAY_SECONDS ; } timestamp += ( ( ( 60 * hour ) + minutes ) * 60 ) + seconds ; return timestamp ; } catch ( java . lang . RuntimeException ignored ) { throw io . datakernel . http . HttpDate . FAILED_TO_PARSE_DATE ; } }
org . junit . Assert . assertEquals ( 4073580000L , io . datakernel . http . HttpDate . parse ( bytes , 0 ) )
testCase56 ( ) { org . evosuite . testcase . DefaultTestCase tc = buildTestCase56 ( ) ; java . util . List < org . evosuite . symbolic . BranchCondition > branch_conditions = executeTest ( tc ) ; "<AssertPlaceHolder>" ; } size ( ) { return theTest . size ( ) ; }
org . junit . Assert . assertEquals ( 2 , branch_conditions . size ( ) )
convertNullSContractDefinition ( ) { final org . bonitasoft . engine . bpm . contract . ContractDefinition contract = org . bonitasoft . engine . service . ModelConvertor . toContract ( null ) ; "<AssertPlaceHolder>" . as ( "contract<sp>null" ) . isNull ( ) ; } toContract ( org . bonitasoft . engine . core . process . definition . model . SContractDefinition ) { if ( sContract == null ) { return null ; } final org . bonitasoft . engine . bpm . contract . impl . ContractDefinitionImpl contract = new org . bonitasoft . engine . bpm . contract . impl . ContractDefinitionImpl ( ) ; for ( final org . bonitasoft . engine . core . process . definition . model . SInputDefinition input : sContract . getInputDefinitions ( ) ) { contract . addInput ( org . bonitasoft . engine . service . ModelConvertor . toInput ( input ) ) ; } for ( final org . bonitasoft . engine . core . process . definition . model . SConstraintDefinition sConstraintDefinition : sContract . getConstraints ( ) ) { final org . bonitasoft . engine . bpm . contract . impl . ConstraintDefinitionImpl constraint = new org . bonitasoft . engine . bpm . contract . impl . ConstraintDefinitionImpl ( sConstraintDefinition . getName ( ) , sConstraintDefinition . getExpression ( ) , sConstraintDefinition . getExplanation ( ) ) ; for ( final java . lang . String inputName : sConstraintDefinition . getInputNames ( ) ) { constraint . addInputName ( inputName ) ; } contract . addConstraint ( constraint ) ; } return contract ; }
org . junit . Assert . assertThat ( contract )
testGetPurge ( ) { com . stratelia . silverpeas . silverstatistics . model . TypeStatistics instance = new com . stratelia . silverpeas . silverstatistics . model . TypeStatistics ( ) ; int expResult = 3 ; int result = instance . getPurge ( ) ; "<AssertPlaceHolder>" ; } is ( T ) { return java . util . Objects . equals ( this . value , value ) ; }
org . junit . Assert . assertThat ( result , is ( expResult ) )
testNoCacheOnFieldIsNotReturnedWithoutRevalidation ( ) { final org . apache . hc . core5 . http . ClassicHttpRequest req1 = new org . apache . hc . core5 . http . message . BasicClassicHttpRequest ( "GET" , "Cache-Control" 0 ) ; final org . apache . hc . core5 . http . ClassicHttpResponse resp1 = org . apache . hc . client5 . http . impl . cache . HttpTestUtils . make200Response ( ) ; resp1 . setHeader ( "ETag" , "\"etag\"" ) ; resp1 . setHeader ( "X-Stuff" , "things" ) ; resp1 . setHeader ( "Cache-Control" , "no-cache=\"X-Stuff\",<sp>max-age=3600" ) ; backendExpectsAnyRequestAndReturn ( resp1 ) ; final org . apache . hc . core5 . http . ClassicHttpRequest req2 = new org . apache . hc . core5 . http . message . BasicClassicHttpRequest ( "GET" , "Cache-Control" 0 ) ; final org . apache . hc . core5 . http . ClassicHttpResponse resp2 = org . apache . hc . client5 . http . impl . cache . HttpTestUtils . make200Response ( ) ; resp2 . setHeader ( "ETag" , "\"etag\"" ) ; resp2 . setHeader ( "X-Stuff" , "things" ) ; resp2 . setHeader ( "Cache-Control" , "no-cache=\"X-Stuff\",max-age=3600" ) ; final org . easymock . Capture < org . apache . hc . core5 . http . ClassicHttpRequest > cap = org . easymock . EasyMock . newCapture ( ) ; org . easymock . EasyMock . expect ( mockExecChain . proceed ( org . easymock . EasyMock . capture ( cap ) , org . easymock . EasyMock . isA ( ExecChain . Scope . class ) ) ) . andReturn ( resp2 ) . times ( 0 , 1 ) ; replayMocks ( ) ; execute ( req1 ) ; final org . apache . hc . core5 . http . ClassicHttpResponse result = execute ( req2 ) ; verifyMocks ( ) ; if ( ! ( cap . hasCaptured ( ) ) ) { "<AssertPlaceHolder>" ; } } getFirstHeader ( java . lang . String ) { return ( headergroup ) != null ? headergroup . getFirstHeader ( name ) : null ; }
org . junit . Assert . assertNull ( result . getFirstHeader ( "X-Stuff" ) )
should_return_null_primary_key ( ) { org . apache . deltaspike . data . test . domain . Simple simple = new org . apache . deltaspike . data . test . domain . Simple ( "should_return_null_primary_key" ) ; java . lang . Long primaryKey = repo . getPrimaryKey ( simple ) ; "<AssertPlaceHolder>" ; } getPrimaryKey ( java . lang . Integer ) { return null ; }
org . junit . Assert . assertNull ( primaryKey )
setAttributeValueToNullIfPreviousValueIsAvailable ( ) { container . setAttribute ( org . apache . mina . session . AttributeContainerTest . ATTRIBUTE_KEY , 123 ) ; java . lang . Integer oldValue = container . setAttribute ( org . apache . mina . session . AttributeContainerTest . ATTRIBUTE_KEY , null ) ; "<AssertPlaceHolder>" ; } setAttribute ( org . apache . mina . session . AttributeKey , T ) { return attributes . setAttribute ( key , value ) ; }
org . junit . Assert . assertThat ( oldValue , org . hamcrest . CoreMatchers . is ( 123 ) )
testGetTimeSpanFromInt ( ) { System . out . println ( "getTimeSpanFromInt" ) ; int timeSpan = 0 ; java . lang . String expResult = "" ; java . lang . String result = com . bj58 . spat . gaea . client . utility . helper . TimeSpanHelper . getTimeSpanFromInt ( timeSpan ) ; "<AssertPlaceHolder>" ; org . junit . Assert . fail ( "The<sp>test<sp>case<sp>is<sp>a<sp>prototype." ) ; } getTimeSpanFromInt ( int ) { throw new java . lang . Exception ( "NotImplementedException" ) ; }
org . junit . Assert . assertEquals ( expResult , result )
testGetUpcomingRecordingNone ( ) { final long nowMillis = java . lang . System . currentTimeMillis ( ) ; final long oneHourMillis = 3600000 ; final java . lang . String captureAgentId = "Device<sp>A" ; final java . util . Set < java . lang . String > userIds = java . util . Collections . emptySet ( ) ; final java . util . Map < java . lang . String , java . lang . String > wfProperties = this . wfProperties ; final java . util . Map < java . lang . String , java . lang . String > caProperties = java . util . Collections . singletonMap ( "foo" , "bar" ) ; final com . entwinemedia . fn . data . Opt < java . lang . String > schedulingSource = com . entwinemedia . fn . data . Opt . none ( ) ; final java . lang . String id = "Recording" ; 0 1 for ( int i = 0 ; i < 2 ; i ++ ) { final long offset = ( i * 3 ) * oneHourMillis ; final java . util . Date start = new java . util . Date ( ( ( nowMillis - ( 4 * oneHourMillis ) ) + offset ) ) ; final java . util . Date end = new java . util . Date ( ( ( nowMillis - ( 2 * oneHourMillis ) ) + offset ) ) ; final org . opencastproject . mediapackage . MediaPackage mp = org . opencastproject . scheduler . impl . SchedulerServiceImplTest . generateEvent ( com . entwinemedia . fn . data . Opt . some ( ( id + i ) ) ) ; final org . opencastproject . metadata . dublincore . DublinCoreCatalog dublinCoreCatalog = org . opencastproject . scheduler . impl . SchedulerServiceImplTest . generateEvent ( captureAgentId , com . entwinemedia . fn . data . Opt . some ( mp . getIdentifier ( ) . toString ( ) ) , com . entwinemedia . fn . data . Opt . some ( ( "Test<sp>Title" + i ) ) , start , end ) ; addDublinCore ( com . entwinemedia . fn . data . Opt . some ( mp . getIdentifier ( ) . toString ( ) ) , mp , dublinCoreCatalog ) ; org . opencastproject . scheduler . impl . SchedulerServiceImplTest . schedSvc . addEvent ( start , end , captureAgentId , userIds , mp , wfProperties , caProperties , schedulingSource ) ; } final com . entwinemedia . fn . data . Opt < org . opencastproject . mediapackage . MediaPackage > currentRecording = org . opencastproject . scheduler . impl . SchedulerServiceImplTest . schedSvc . getUpcomingRecording ( captureAgentId ) ; "<AssertPlaceHolder>" ; } isSome ( ) { return new org . opencastproject . util . data . Function < org . opencastproject . util . data . Option < A > , java . lang . Boolean > ( ) { @ org . opencastproject . util . data . functions . Override public org . opencastproject . util . data . functions . Boolean apply ( org . opencastproject . util . data . Option < A > a ) { return a . isSome ( ) ; } } ; }
org . junit . Assert . assertFalse ( currentRecording . isSome ( ) )
testGetNormalizedComponentsRGB ( ) { java . awt . image . ComponentColorModel model = new com . twelvemonkeys . imageio . color . UInt32ColorModel ( com . twelvemonkeys . imageio . color . UInt32ColorModelTest . sRGB , true , false ) ; int [ ] pixel = new int [ 4 ] ; float [ ] normalized = null ; for ( long pix = 0 ; pix < ( 1L << 32 ) ; pix += Short . MAX_VALUE ) { float expected = ( ( float ) ( pix & 4294967295L ) ) / ( ( float ) ( ( 1L << 32 ) - 1 ) ) ; for ( int i = 0 ; i < ( pixel . length ) ; i ++ ) { pixel [ i ] = ( ( int ) ( pix ) ) ; } normalized = model . getNormalizedComponents ( pixel , normalized , 0 ) ; for ( float norm : normalized ) { "<AssertPlaceHolder>" ; } } } getNormalizedComponents ( java . lang . Object , float [ ] , int ) { int numComponents = getNumComponents ( ) ; if ( normComponents == null ) { normComponents = new float [ numComponents + normOffset ] ; } int [ ] ipixel = ( ( int [ ] ) ( pixel ) ) ; for ( int c = 0 , nc = normOffset ; c < numComponents ; c ++ , nc ++ ) { normComponents [ nc ] = ( ( float ) ( ( ipixel [ c ] ) & 4294967295L ) ) / ( ( float ) ( ( 1L << ( getComponentSize ( c ) ) ) - 1 ) ) ; } int numColorComponents = getNumColorComponents ( ) ; if ( ( hasAlpha ( ) ) && ( isAlphaPremultiplied ( ) ) ) { float alpha = normComponents [ ( numColorComponents + normOffset ) ] ; if ( alpha != 0.0F ) { float invAlpha = 1.0F / alpha ; for ( int c = normOffset ; c < ( numColorComponents + normOffset ) ; c ++ ) { normComponents [ c ] *= invAlpha ; } } } return normComponents ; }
org . junit . Assert . assertEquals ( expected , norm , 0 )
testRegisterComponentInUserComponentManager ( ) { final org . jmock . States state = getMockery ( ) . states ( "test" ) ; getMockery ( ) . checking ( new org . jmock . Expectations ( ) { { allowing ( mockDocumentAccessBridge ) . getCurrentUserReference ( ) ; when ( state . isNot ( "otheruser" ) ) ; will ( returnValue ( new org . xwiki . model . reference . DocumentReference ( "user" 0 , "XWiki" , "user1" ) ) ) ; allowing ( mockWikiDescriptorManager ) . getCurrentWikiId ( ) ; will ( returnValue ( "user" 0 ) ) ; allowing ( mockCurrentSpaceReferenceProvider ) . get ( ) ; will ( returnValue ( new org . xwiki . model . reference . SpaceReference ( "space" , new org . xwiki . model . reference . WikiReference ( "user" 0 ) ) ) ) ; allowing ( mockCurrentDocumentReferenceProvider ) . get ( ) ; will ( returnValue ( new org . xwiki . model . reference . DocumentReference ( "user" 0 , "space" , "document" ) ) ) ; } } ) ; org . xwiki . component . manager . ComponentManager contextCM = getComponentManager ( ) . getInstance ( org . xwiki . component . manager . ComponentManager . class , "context" ) ; try { contextCM . getInstance ( org . xwiki . component . internal . ContextComponentManagerTest . Role . class ) ; org . junit . Assert . fail ( "Should<sp>have<sp>raised<sp>an<sp>exception" ) ; } catch ( org . xwiki . component . manager . ComponentLookupException expected ) { } org . xwiki . component . manager . ComponentManager userCM = getComponentManager ( ) . getInstance ( org . xwiki . component . manager . ComponentManager . class , "user" ) ; org . xwiki . component . descriptor . DefaultComponentDescriptor < org . xwiki . component . internal . ContextComponentManagerTest . Role > cd = new org . xwiki . component . descriptor . DefaultComponentDescriptor < org . xwiki . component . internal . ContextComponentManagerTest . Role > ( ) ; cd . setRoleType ( org . xwiki . component . internal . ContextComponentManagerTest . Role . class ) ; cd . setImplementation ( org . xwiki . component . internal . ContextComponentManagerTest . RoleImpl . class ) ; userCM . registerComponent ( cd ) ; "<AssertPlaceHolder>" ; state . become ( "otheruser" ) ; getMockery ( ) . checking ( new org . jmock . Expectations ( ) { { allowing ( mockDocumentAccessBridge ) . getCurrentUserReference ( ) ; will ( returnValue ( new org . xwiki . model . reference . DocumentReference ( "user" 0 , "XWiki" , "user2" ) ) ) ; allowing ( mockWikiDescriptorManager ) . getCurrentWikiId ( ) ; will ( returnValue ( "user" 0 ) ) ; allowing ( mockCurrentSpaceReferenceProvider ) . get ( ) ; will ( returnValue ( new org . xwiki . model . reference . SpaceReference ( "space" , new org . xwiki . model . reference . WikiReference ( "user" 0 ) ) ) ) ; allowing ( mockCurrentDocumentReferenceProvider ) . get ( ) ; will ( returnValue ( new org . xwiki . model . reference . DocumentReference ( "user" 0 , "space" , "document" ) ) ) ; } } ) ; try { contextCM . getInstance ( org . xwiki . component . internal . ContextComponentManagerTest . Role . class ) ; org . junit . Assert . fail ( "Should<sp>have<sp>raised<sp>an<sp>exception" ) ; } catch ( org . xwiki . component . manager . ComponentLookupException expected ) { } } getInstance ( java . lang . Class ) { try { org . xwiki . component . manager . ComponentManager componentManager = this . componentManagerProvider . get ( ) ; org . xwiki . rest . XWikiRestComponent component = componentManager . getInstance ( org . xwiki . rest . XWikiRestComponent . class , clazz . getName ( ) ) ; org . xwiki . component . descriptor . ComponentDescriptor < org . xwiki . rest . XWikiRestComponent > componentDescriptor = componentManager . getComponentDescriptor ( org . xwiki . rest . XWikiRestComponent . class , clazz . getName ( ) ) ; org . xwiki . context . ExecutionContext executionContext = this . execution . getContext ( ) ; java . util . List < org . xwiki . rest . XWikiRestComponent > releasableComponentReferences = ( ( java . util . List < org . xwiki . rest . XWikiRestComponent > ) ( executionContext . getProperty ( Constants . RELEASABLE_COMPONENT_REFERENCES ) ) ) ; if ( releasableComponentReferences == null ) { releasableComponentReferences = new java . util . ArrayList ( ) ; executionContext . setProperty ( Constants . RELEASABLE_COMPONENT_REFERENCES , releasableComponentReferences ) ; } if ( ( componentDescriptor . getInstantiationStrategy ( ) ) == ( org . xwiki . component . descriptor . ComponentInstantiationStrategy . PER_LOOKUP ) ) { releasableComponentReferences . add ( component ) ; } return ( ( T ) ( component ) ) ; } catch ( org . xwiki . component . manager . ComponentLookupException e ) { throw new org . restlet . ext . jaxrs . InstantiateException ( e ) ; } }
org . junit . Assert . assertNotNull ( contextCM . getInstance ( org . xwiki . component . internal . ContextComponentManagerTest . Role . class ) )
testHashBaseForItemCorePropertiesNormalizesResourceUrls ( ) { final org . sakaiproject . tool . assessment . data . dao . assessment . ItemData item = new org . sakaiproject . tool . assessment . data . dao . assessment . ItemData ( ) ; item . setTypeId ( TypeIfc . FILL_IN_BLANK ) ; final org . sakaiproject . tool . assessment . data . dao . assessment . ItemText itemText = new org . sakaiproject . tool . assessment . data . dao . assessment . ItemText ( item , 1L , resourceDocTemplate1 ( fullUrlForContentResource ( org . sakaiproject . tool . assessment . facade . ItemHashUtilTest . CONTENT_RESOURCES [ 0 ] ) ) , null ) ; item . setItemTextSet ( org . mockito . internal . util . collections . Sets . newSet ( itemText ) ) ; item . setInstruction ( resourceDocTemplate1 ( fullUrlForContentResource ( org . sakaiproject . tool . assessment . facade . ItemHashUtilTest . CONTENT_RESOURCES [ 1 ] ) ) ) ; item . setCorrectItemFeedback ( resourceDocTemplate1 ( fullUrlForContentResource ( org . sakaiproject . tool . assessment . facade . ItemHashUtilTest . CONTENT_RESOURCES [ 2 ] ) ) ) ; item . setInCorrectItemFeedback ( resourceDocTemplate1 ( fullUrlForContentResource ( org . sakaiproject . tool . assessment . facade . ItemHashUtilTest . CONTENT_RESOURCES [ 3 ] ) ) ) ; item . setGeneralItemFeedback ( resourceDocTemplate1 ( fullUrlForContentResource ( org . sakaiproject . tool . assessment . facade . ItemHashUtilTest . CONTENT_RESOURCES [ 4 ] ) ) ) ; item . setDescription ( resourceDocTemplate1 ( fullUrlForContentResource ( org . sakaiproject . tool . assessment . facade . ItemHashUtilTest . CONTENT_RESOURCES [ 5 ] ) ) ) ; expectServerUrlLookup ( ) ; expectResourceLookup ( org . sakaiproject . tool . assessment . facade . ItemHashUtilTest . CONTENT_RESOURCES [ 0 ] ) ; expectResourceLookup ( org . sakaiproject . tool . assessment . facade . ItemHashUtilTest . CONTENT_RESOURCES [ 1 ] ) ; expectResourceLookup ( org . sakaiproject . tool . assessment . facade . ItemHashUtilTest . CONTENT_RESOURCES [ 2 ] ) ; expectResourceLookup ( org . sakaiproject . tool . assessment . facade . ItemHashUtilTest . CONTENT_RESOURCES [ 3 ] ) ; expectResourceLookup ( org . sakaiproject . tool . assessment . facade . ItemHashUtilTest . CONTENT_RESOURCES [ 4 ] ) ; expectResourceLookup ( org . sakaiproject . tool . assessment . facade . ItemHashUtilTest . CONTENT_RESOURCES [ 5 ] ) ; final java . lang . StringBuilder expectedHashBase = new java . lang . StringBuilder ( labeled ( "TypeId" , ( "" + ( org . sakaiproject . tool . assessment . data . ifc . shared . TypeIfc . FILL_IN_BLANK ) ) ) ) . append ( labeled ( "ItemText" , renderBlanks ( resourceDocTemplate1 ( expectedContentResourceHash1 ( org . sakaiproject . tool . assessment . facade . ItemHashUtilTest . CONTENT_RESOURCES [ 0 ] ) ) ) ) ) . append ( labeled ( "Instruction" , resourceDocTemplate1 ( expectedContentResourceHash1 ( org . sakaiproject . tool . assessment . facade . ItemHashUtilTest . CONTENT_RESOURCES [ 1 ] ) ) ) ) . append ( labeled ( "CorrectItemFeedback" , resourceDocTemplate1 ( expectedContentResourceHash1 ( org . sakaiproject . tool . assessment . facade . ItemHashUtilTest . CONTENT_RESOURCES [ 2 ] ) ) ) ) . append ( labeled ( "IncorrectItemFeedback" , resourceDocTemplate1 ( expectedContentResourceHash1 ( org . sakaiproject . tool . assessment . facade . ItemHashUtilTest . CONTENT_RESOURCES [ 3 ] ) ) ) ) . append ( labeled ( "GeneralCorrectItemFeedback" , resourceDocTemplate1 ( expectedContentResourceHash1 ( org . sakaiproject . tool . assessment . facade . ItemHashUtilTest . CONTENT_RESOURCES [ 4 ] ) ) ) ) . append ( labeled ( "Description" , resourceDocTemplate1 ( expectedContentResourceHash1 ( org . sakaiproject . tool . assessment . facade . ItemHashUtilTest . CONTENT_RESOURCES [ 5 ] ) ) ) ) ; java . lang . StringBuilder actualHashBase = new java . lang . StringBuilder ( ) ; itemHashUtil . hashBaseForItemCoreProperties ( item , actualHashBase ) ; "<AssertPlaceHolder>" ; } toString ( ) { if ( name ( ) . equals ( "sessionId" ) ) { return "session-id" ; } else { return name ( ) ; } }
org . junit . Assert . assertThat ( actualHashBase . toString ( ) , org . hamcrest . CoreMatchers . equalTo ( expectedHashBase . toString ( ) ) )
testSearchBillingCode_Null ( ) { java . lang . String searchString = "service001" ; java . lang . String region = "ON" ; java . util . Date date = new java . util . Date ( dfm . parse ( "20091231" ) . getTime ( ) ) ; org . oscarehr . common . model . BillingService result = dao . searchBillingCode ( searchString , region , date ) ; "<AssertPlaceHolder>" ; } searchBillingCode ( java . lang . String , java . lang . String , java . util . Date ) { javax . persistence . Query query = entityManager . createQuery ( "select<sp>bs<sp>from<sp>BillingService<sp>bs<sp>where<sp>bs.region<sp>=<sp>(:region)<sp>and<sp>bs.serviceCode<sp>like<sp>(:searchStr)<sp>and<sp>bs.billingserviceDate<sp>=<sp>(select<sp>max(b2.billingserviceDate)<sp>from<sp>BillingService<sp>b2<sp>where<sp>b2.serviceCode<sp>=<sp>bs.serviceCode<sp>and<sp>b2.billingserviceDate<sp><=<sp>(:billDate))" ) ; query . setParameter ( "region" , region ) ; query . setParameter ( "searchStr" , ( str + "%" ) ) ; query . setParameter ( "billDate" , billingDate ) ; java . util . List < org . oscarehr . common . model . BillingService > list = query . getResultList ( ) ; if ( ( list == null ) || ( ( list . size ( ) ) < 1 ) ) { return null ; } return list . get ( ( ( list . size ( ) ) - 1 ) ) ; }
org . junit . Assert . assertNull ( result )
testReplaceSystemDiskString ( ) { try { com . fit2cloud . aliyun . ecs . model . response . ReplaceSystemDiskResponse response = client . replaceSystemDisk ( "i-25uh6z38k" , "centos6u5_64_20G_aliaegis_20140703.vhd" ) ; System . out . println ( ( "testReplaceSystemDiskString<sp>::<sp>" + response ) ) ; "<AssertPlaceHolder>" ; } catch ( java . lang . Exception e ) { e . printStackTrace ( ) ; org . junit . Assert . fail ( e . getMessage ( ) ) ; } } replaceSystemDisk ( java . lang . String , java . lang . String ) { return replaceSystemDisk ( new com . fit2cloud . aliyun . ecs . model . request . ReplaceSystemDiskRequest ( InstanceId , ImageId ) ) ; }
org . junit . Assert . assertTrue ( true )
testPostData ( ) { de . sstoehr . harreader . model . HarRequest request = new de . sstoehr . harreader . model . HarRequest ( ) ; request . setPostData ( null ) ; "<AssertPlaceHolder>" ; } getPostData ( ) { if ( ( postData ) == null ) { postData = new de . sstoehr . harreader . model . HarPostData ( ) ; } return postData ; }
org . junit . Assert . assertNotNull ( request . getPostData ( ) )
CreateMentorWithoutStudent ( ) { cruise . associations . MentorAD m = new cruise . associations . MentorAD ( "blah" ) ; "<AssertPlaceHolder>" ; } numberOfStudents ( ) { return students . size ( ) ; }
org . junit . Assert . assertEquals ( 0 , m . numberOfStudents ( ) )
testRuleSerialDeserialization ( ) { io . symcpe . wraith . conditions . Condition one = new io . symcpe . wraith . conditions . logical . OrCondition ( java . util . Arrays . asList ( ( ( io . symcpe . wraith . conditions . Condition ) ( new io . symcpe . wraith . conditions . relational . EqualsCondition ( "header1" , "val1" ) ) ) , new io . symcpe . wraith . conditions . relational . EqualsCondition ( "test" , "asdas" ) ) ) ; io . symcpe . wraith . conditions . Condition two = new io . symcpe . wraith . conditions . relational . EqualsCondition ( "header2" , "val2" ) ; io . symcpe . wraith . conditions . Condition condition = new io . symcpe . wraith . conditions . logical . AndCondition ( java . util . Arrays . asList ( one , two ) ) ; io . symcpe . wraith . actions . Action action = new io . symcpe . wraith . actions . alerts . templated . TemplatedAlertAction ( ( ( short ) ( 2 ) ) , ( ( short ) ( 2 ) ) ) ; io . symcpe . wraith . rules . SimpleRule rule = new io . symcpe . wraith . rules . SimpleRule ( ( ( short ) ( 123 ) ) , "hello" , true , condition , action ) ; java . lang . String jsonRule = io . symcpe . wraith . rules . RuleSerializer . serializeRuleToJSONString ( rule , false ) ; io . symcpe . wraith . rules . SimpleRule deserializedRule = io . symcpe . wraith . rules . RuleSerializer . deserializeJSONStringToRule ( jsonRule ) ; "<AssertPlaceHolder>" ; } deserializeJSONStringToRule ( java . lang . String ) { com . google . gson . GsonBuilder gsonBuilder = new com . google . gson . GsonBuilder ( ) ; gsonBuilder . registerTypeAdapter ( io . symcpe . wraith . conditions . Condition . class , new io . symcpe . wraith . conditions . ConditionSerializer ( ) ) ; gsonBuilder . registerTypeAdapter ( io . symcpe . wraith . actions . Action . class , new io . symcpe . wraith . actions . ActionSerializer ( ) ) ; gsonBuilder . disableHtmlEscaping ( ) ; com . google . gson . Gson gson = gsonBuilder . create ( ) ; io . symcpe . wraith . rules . SimpleRule rule = gson . fromJson ( jsonRule , io . symcpe . wraith . rules . SimpleRule . class ) ; io . symcpe . wraith . rules . RuleSerializer . sortActionsById ( rule ) ; return rule ; }
org . junit . Assert . assertEquals ( rule , deserializedRule )
testPackFloatPositiveInfinity ( ) { "<AssertPlaceHolder>" ; } packFloat ( float ) { if ( java . lang . Float . isNaN ( k ) ) { return com . jogamp . opengl . math . Binary16 . exampleNaN ( ) ; } if ( k == ( Float . POSITIVE_INFINITY ) ) { return com . jogamp . opengl . math . Binary16 . POSITIVE_INFINITY ; } if ( k == ( Float . NEGATIVE_INFINITY ) ) { return com . jogamp . opengl . math . Binary16 . NEGATIVE_INFINITY ; } if ( ( java . lang . Float . floatToIntBits ( k ) ) == ( Binary32 . NEGATIVE_ZERO_BITS ) ) { return com . jogamp . opengl . math . Binary16 . NEGATIVE_ZERO ; } if ( k == 0.0 ) { return com . jogamp . opengl . math . Binary16 . POSITIVE_ZERO ; } final long de = com . jogamp . opengl . math . Binary32 . unpackGetExponentUnbiased ( k ) ; final long ds = com . jogamp . opengl . math . Binary32 . unpackGetSign ( k ) ; final long dn = com . jogamp . opengl . math . Binary32 . unpackGetSignificand ( k ) ; final char rsr = com . jogamp . opengl . math . Binary16 . packSetSignUnchecked ( ( ( int ) ( ds ) ) ) ; return ( ( char ) ( ( rsr | rer ) | rnr ) ) ; }
org . junit . Assert . assertTrue ( ( ( com . jogamp . opengl . math . Binary16 . POSITIVE_INFINITY ) == ( com . jogamp . opengl . math . Binary16 . packFloat ( Float . POSITIVE_INFINITY ) ) ) )
getGrantsTest ( ) { java . lang . String [ ] tableTypes = new java . lang . String [ ] { "TABLE" } ; org . mockito . Mockito . when ( connectionMock . isClosed ( ) ) . thenReturn ( false ) ; java . sql . DatabaseMetaData dbmMock = mock ( java . sql . DatabaseMetaData . class ) ; org . mockito . Mockito . when ( connectionMock . getMetaData ( ) ) . thenReturn ( dbmMock ) ; java . sql . ResultSet rsUserMock = mock ( java . sql . ResultSet . class ) ; org . mockito . Mockito . when ( dbmMock . getTables ( null , null , "GRANTS" , tableTypes ) ) . thenReturn ( rsUserMock ) ; org . mockito . Mockito . when ( rsUserMock . next ( ) ) . thenReturn ( true ) ; java . sql . PreparedStatement pstmtMock = mock ( java . sql . PreparedStatement . class ) ; org . mockito . Mockito . when ( connectionMock . prepareStatement ( anyString ( ) ) ) . thenReturn ( pstmtMock ) ; java . sql . ResultSet rsMock = getMockedResultSet ( ) ; org . mockito . Mockito . when ( pstmtMock . executeQuery ( ) ) . thenReturn ( rsMock ) ; org . opendaylight . aaa . api . model . Grants grants = grantStoreUnderTest . getGrants ( did , uid ) ; "<AssertPlaceHolder>" ; verify ( pstmtMock ) . close ( ) ; } getGrants ( ) { return grants ; }
org . junit . Assert . assertTrue ( ( ( grants . getGrants ( ) . size ( ) ) == 1 ) )
shouldSelectBlogWithAParamNamedValue ( ) { org . apache . ibatis . session . SqlSession session = org . apache . ibatis . binding . BindingTest . sqlSessionFactory . openSession ( ) ; try { org . apache . ibatis . binding . BoundBlogMapper mapper = session . getMapper ( org . apache . ibatis . binding . BoundBlogMapper . class ) ; org . apache . ibatis . domain . blog . Blog blog = mapper . selectBlogWithAParamNamedValue ( "id" , 1 , "Jim<sp>Business" ) ; "<AssertPlaceHolder>" ; } finally { session . close ( ) ; } } getMapper ( java . lang . Class ) { return configuration . < T > getMapper ( type , this ) ; }
org . junit . Assert . assertNotNull ( blog )
shouldReturnHBaseKeySerialisationFromBasicEntity ( ) { final uk . gov . gchq . gaffer . data . element . Entity entity = new uk . gov . gchq . gaffer . data . element . Entity . Builder ( ) . group ( TestGroups . ENTITY ) . vertex ( "3" ) . build ( ) ; final byte [ ] key = serialisation . getRowKey ( entity ) ; final uk . gov . gchq . gaffer . data . element . Entity newEntity = ( ( uk . gov . gchq . gaffer . data . element . Entity ) ( serialisation . getPartialElement ( TestGroups . ENTITY , key , false ) ) ) ; "<AssertPlaceHolder>" ; } getVertex ( ) { return getIdentifierTypeName ( IdentifierType . VERTEX ) ; }
org . junit . Assert . assertEquals ( "3" , newEntity . getVertex ( ) )
perform ( ) { de . galperin . javase8 . capitel3 . ExecutorService executorService = de . galperin . javase8 . capitel3 . Executors . newCachedThreadPool ( ) ; de . galperin . javase8 . capitel3 . Future < java . lang . String > strFuture = executorService . submit ( ( ) -> "1" ) ; de . galperin . javase8 . capitel3 . Future < java . lang . Integer > intFuture = de . galperin . javase8 . capitel3 . C3E21 . map ( strFuture , Integer :: parseInt ) ; try { "<AssertPlaceHolder>" ; } catch ( java . lang . Exception e ) { e . printStackTrace ( ) ; } } get ( ) { return mapper . apply ( future . get ( ) ) ; }
org . junit . Assert . assertEquals ( new java . lang . Integer ( 1 ) , intFuture . get ( ) )
medicationPrescriptionEventNullTest ( ) { org . marc . everest . rmim . uv . cdar2 . pocd_mt000040uv . EntryRelationship entryRelationship = org . oscarehr . e2e . model . export . template . MedicationPrescriptionEventModelTest . mpeModel . getEntryRelationship ( null ) ; "<AssertPlaceHolder>" ; } getEntryRelationship ( org . oscarehr . common . model . Drug ) { if ( drug == null ) { this . drug = new org . oscarehr . common . model . Drug ( ) ; } else { this . drug = drug ; } org . marc . everest . rmim . uv . cdar2 . pocd_mt000040uv . EntryRelationship entryRelationship = new org . marc . everest . rmim . uv . cdar2 . pocd_mt000040uv . EntryRelationship ( ) ; java . util . ArrayList < org . marc . everest . datatypes . interfaces . ISetComponent < org . marc . everest . datatypes . TS > > doseTimes = new java . util . ArrayList < org . marc . everest . datatypes . interfaces . ISetComponent < org . marc . everest . datatypes . TS > > ( ) ; org . marc . everest . rmim . uv . cdar2 . pocd_mt000040uv . SubstanceAdministration substanceAdministration = new org . marc . everest . rmim . uv . cdar2 . pocd_mt000040uv . SubstanceAdministration ( org . marc . everest . rmim . uv . cdar2 . vocabulary . x_DocumentSubstanceMood . RQO , getConsumable ( ) ) ; entryRelationship . setTypeCode ( x_ActRelationshipEntryRelationship . HasComponent ) ; entryRelationship . setContextConductionInd ( true ) ; entryRelationship . setTemplateId ( java . util . Arrays . asList ( new org . marc . everest . datatypes . II ( Constants . TemplateOids . DOSE_OBSERVATION_TEMPLATE_ID ) ) ) ; doseTimes . add ( getDuration ( ) ) ; doseTimes . add ( getFrequency ( ) ) ; substanceAdministration . setText ( getDoseInstructions ( ) ) ; substanceAdministration . setEffectiveTime ( doseTimes ) ; substanceAdministration . setRouteCode ( getRoute ( ) ) ; substanceAdministration . setDoseQuantity ( getDoseQuantity ( ) ) ; substanceAdministration . setAdministrationUnitCode ( getForm ( ) ) ; entryRelationship . setClinicalStatement ( substanceAdministration ) ; return entryRelationship ; }
org . junit . Assert . assertNotNull ( entryRelationship )
shouldContinueAttemptingToFindElements ( ) { java . lang . reflect . Field f = org . openqa . selenium . support . pagefactory . AjaxElementLocatorTest . Page . class . getDeclaredField ( "first" ) ; final org . openqa . selenium . WebDriver driver = mock ( org . openqa . selenium . WebDriver . class ) ; final org . openqa . selenium . By by = new org . openqa . selenium . support . ByIdOrName ( "first" ) ; final org . openqa . selenium . WebElement element = mock ( org . openqa . selenium . WebElement . class ) ; final java . util . List < org . openqa . selenium . WebElement > elementList = new java . util . ArrayList < org . openqa . selenium . WebElement > ( ) ; elementList . add ( element ) ; when ( driver . findElements ( by ) ) . thenThrow ( new org . openqa . selenium . NoSuchElementException ( "bar" ) ) . thenReturn ( elementList ) ; org . openqa . selenium . support . pagefactory . ElementLocator locator = newLocator ( driver , f ) ; java . util . List < org . openqa . selenium . WebElement > returnedList = locator . findElements ( ) ; "<AssertPlaceHolder>" ; } get ( java . lang . String ) { return options . get ( key ) ; }
org . junit . Assert . assertEquals ( element , returnedList . get ( 0 ) )
testGetCategoriesCountWithAnyStatus ( ) { com . liferay . portal . kernel . service . ServiceContext serviceContext = com . liferay . portal . kernel . test . util . ServiceContextTestUtil . getServiceContext ( _group . getGroupId ( ) , com . liferay . portal . kernel . test . util . TestPropsValues . getUserId ( ) ) ; com . liferay . message . boards . model . MBCategory category1 = com . liferay . message . boards . service . MBCategoryLocalServiceUtil . addCategory ( com . liferay . portal . kernel . test . util . TestPropsValues . getUserId ( ) , MBCategoryConstants . DEFAULT_PARENT_CATEGORY_ID , com . liferay . portal . kernel . test . util . RandomTestUtil . randomString ( ) , StringPool . BLANK , serviceContext ) ; com . liferay . message . boards . service . MBCategoryLocalServiceUtil . addCategory ( com . liferay . portal . kernel . test . util . TestPropsValues . getUserId ( ) , MBCategoryConstants . DEFAULT_PARENT_CATEGORY_ID , com . liferay . portal . kernel . test . util . RandomTestUtil . randomString ( ) , StringPool . BLANK , serviceContext ) ; com . liferay . message . boards . service . MBCategoryLocalServiceUtil . moveCategoryToTrash ( com . liferay . portal . kernel . test . util . TestPropsValues . getUserId ( ) , category1 . getCategoryId ( ) ) ; com . liferay . portal . kernel . dao . orm . QueryDefinition < com . liferay . message . boards . model . MBThread > queryDefinition = new com . liferay . portal . kernel . dao . orm . QueryDefinition ( com . liferay . portal . kernel . workflow . WorkflowConstants . STATUS_ANY ) ; "<AssertPlaceHolder>" ; } getCategoriesCount ( long , long , int ) { return com . liferay . message . boards . service . MBCategoryServiceUtil . getService ( ) . getCategoriesCount ( groupId , parentCategoryId , status ) ; }
org . junit . Assert . assertEquals ( 1 , com . liferay . message . boards . service . MBCategoryServiceUtil . getCategoriesCount ( _group . getGroupId ( ) , MBCategoryConstants . DEFAULT_PARENT_CATEGORY_ID , queryDefinition ) )
testRemoveWithoutHasNext ( ) { java . util . Iterator < java . lang . Integer > testing = new org . apache . commons . functor . core . collection . TransformedIterator < java . lang . Integer , java . lang . Integer > ( list . iterator ( ) , negate ) ; for ( int i = 0 , m = list . size ( ) ; i < m ; i ++ ) { testing . next ( ) ; testing . remove ( ) ; } "<AssertPlaceHolder>" ; } isEmpty ( ) { throw new java . lang . UnsupportedOperationException ( "Left<sp>as<sp>an<sp>exercise<sp>for<sp>the<sp>reader." ) ; }
org . junit . Assert . assertTrue ( list . isEmpty ( ) )
getVersionWithNoVersionInTheName ( ) { org . eclipse . winery . common . version . WineryVersion version = org . eclipse . winery . common . version . VersionUtils . getVersion ( "myExampleComponent" ) ; "<AssertPlaceHolder>" ; } toString ( ) { java . lang . String versionString = componentVersion ; if ( ( this . wineryVersion ) > 0 ) { versionString += ( ( org . apache . commons . lang3 . StringUtils . isEmpty ( versionString ) ? "" : org . eclipse . winery . common . version . WineryVersion . WINERY_VERSION_SEPARATOR ) + ( org . eclipse . winery . common . version . WineryVersion . WINERY_VERSION_PREFIX ) ) + ( wineryVersion ) ; if ( ( this . workInProgressVersion ) > 0 ) { versionString += ( ( org . eclipse . winery . common . version . WineryVersion . WINERY_VERSION_SEPARATOR ) + ( org . eclipse . winery . common . version . WineryVersion . WINERY_WIP_VERSION_PREFIX ) ) + ( this . workInProgressVersion ) ; } } return versionString ; }
org . junit . Assert . assertEquals ( "" , version . toString ( ) )
indexCreationDoNotBlockWritesOnOtherLabel ( ) { org . neo4j . graphdb . Label markerLabel = org . neo4j . graphdb . Label . label ( "testLabel3" ) ; org . neo4j . graphdb . Label nodesLabel = org . neo4j . graphdb . Label . label ( "testLabel4" ) ; try ( org . neo4j . graphdb . Transaction transaction = schema . IndexPopulationIT . database . beginTx ( ) ) { schema . IndexPopulationIT . database . schema ( ) . indexFor ( markerLabel ) . on ( "testProperty" ) . create ( ) ; java . util . concurrent . Future < ? > creation = schema . IndexPopulationIT . executorService . submit ( createNodeWithLabel ( nodesLabel ) ) ; creation . get ( ) ; transaction . success ( ) ; } try ( org . neo4j . graphdb . Transaction transaction = schema . IndexPopulationIT . database . beginTx ( ) ) { try ( org . neo4j . graphdb . ResourceIterator < org . neo4j . graphdb . Node > nodes = schema . IndexPopulationIT . database . findNodes ( nodesLabel ) ) { "<AssertPlaceHolder>" ; } } } count ( java . util . Iterator ) { return org . neo4j . helpers . collection . Iterators . count ( iterator , org . neo4j . function . Predicates . alwaysTrue ( ) ) ; }
org . junit . Assert . assertEquals ( 1 , org . neo4j . helpers . collection . Iterators . count ( nodes ) )
inference ( ) { com . jnape . palatable . lambda . adt . Either < java . lang . Object , com . jnape . palatable . lambda . adt . Maybe < java . lang . Integer > > a = new com . jnape . palatable . lambda . functor . builtin . Compose ( right ( just ( 1 ) ) ) . fmap ( ( x ) -> x + 1 ) . getCompose ( ) ; "<AssertPlaceHolder>" ; } just ( A ) { if ( a == null ) throw new java . lang . NullPointerException ( ) ; return new com . jnape . palatable . lambda . adt . Maybe . Just < > ( a ) ; }
org . junit . Assert . assertEquals ( right ( just ( 2 ) ) , a )
testEvaluationPhraseBasicTermOrderFalsePositive ( ) { java . lang . String query = buildFunction ( phraseFunction , Constants . TERM_OFFSET_MAP_JEXL_VARIABLE_NAME , "'cat'" , "'dog'" ) ; org . apache . commons . jexl2 . Expression expr = datawave . query . jexl . functions . ContentFunctionsTest . engine . createExpression ( query ) ; java . util . List < datawave . ingest . protobuf . TermWeightPosition > list1 ; java . util . List < datawave . ingest . protobuf . TermWeightPosition > list2 ; list1 = asList ( 1 , 2 , 3 ) ; list2 = asList ( 3 , 4 , 5 ) ; termOffSetMap . put ( "dog" , new datawave . query . jexl . functions . TermFrequencyList ( com . google . common . collect . Maps . immutableEntry ( new datawave . query . jexl . functions . TermFrequencyList . Zone ( "CONTENT" , true , eventId ) , list1 ) ) ) ; termOffSetMap . put ( "cat" , new datawave . query . jexl . functions . TermFrequencyList ( com . google . common . collect . Maps . immutableEntry ( new datawave . query . jexl . functions . TermFrequencyList . Zone ( "CONTENT" , true , eventId ) , list2 ) ) ) ; context . set ( Constants . TERM_OFFSET_MAP_JEXL_VARIABLE_NAME , termOffSetMap ) ; java . lang . Object o = expr . evaluate ( context ) ; "<AssertPlaceHolder>" ; } expect ( java . lang . Object , java . lang . Boolean ) { if ( null == result ) { return Boolean . FALSE . equals ( expected ) ; } if ( result instanceof java . lang . Boolean ) { return result . equals ( expected ) ; } return false ; }
org . junit . Assert . assertTrue ( datawave . query . jexl . functions . ContentFunctionsTest . expect ( o , true ) )
addRemoveNodes ( ) { int numNodes = 101 ; javax . jcr . Session writer = getAdminSession ( ) ; javax . jcr . Node test = writer . getRootNode ( ) . addNode ( "test" , "nt:unstructured" ) ; for ( int i = 0 ; i < numNodes ; i ++ ) { test . addNode ( ( "node-" + i ) , "nt:unstructured" ) ; } writer . save ( ) ; for ( int i = 0 ; i < numNodes ; i ++ ) { if ( ( i % 2 ) == 0 ) { test . getNode ( ( "node-" + i ) ) . remove ( ) ; } } writer . save ( ) ; test . addNode ( "node-x" ) ; writer . save ( ) ; "<AssertPlaceHolder>" ; } hasNode ( java . lang . String ) { try { final java . lang . String oakPath = getOakPathOrThrow ( relPath ) ; return org . apache . jackrabbit . oak . jcr . session . NodeImpl . perform ( new org . apache . jackrabbit . oak . jcr . session . operation . NodeOperation < java . lang . Boolean > ( dlg , "hasNode" ) { @ org . jetbrains . annotations . NotNull @ org . apache . jackrabbit . oak . jcr . session . Override public org . apache . jackrabbit . oak . jcr . session . Boolean perform ( ) throws javax . jcr . RepositoryException { return ( node . getChild ( oakPath ) ) != null ; } } ) ; } catch ( javax . jcr . PathNotFoundException e ) { return false ; } }
org . junit . Assert . assertTrue ( test . hasNode ( "node-x" ) )
testIsNhsNumberValidWithUpperCaseLetters ( ) { java . lang . String validCode = "3001837DBG" ; "<AssertPlaceHolder>" ; } isNhsNumberValidWhenUppercaseLettersAreAllowed ( java . lang . String ) { return org . patientview . radar . util . RadarUtility . isNhsNumberValid ( nhsNumber , true ) ; }
org . junit . Assert . assertTrue ( org . patientview . radar . util . RadarUtility . isNhsNumberValidWhenUppercaseLettersAreAllowed ( validCode ) )
testFindAllWebInfFolders_noWebInfFolders ( ) { java . util . List < org . eclipse . core . resources . IFolder > webInfFolders = com . google . cloud . tools . eclipse . appengine . facets . FacetUtil . findAllWebInfFolders ( projectCreator . getProject ( ) ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return ( missingProperties . isEmpty ( ) ) && ( missingGroups . isEmpty ( ) ) ; }
org . junit . Assert . assertTrue ( webInfFolders . isEmpty ( ) )
injectIntoWithOver30 ( ) { com . gs . collections . impl . math . Sum result = new com . gs . collections . impl . math . IntegerSum ( 0 ) ; java . lang . Integer parameter = 2 ; java . util . List < java . lang . Integer > integers = com . gs . collections . impl . list . Interval . oneTo ( 31 ) ; com . gs . collections . api . block . function . Function3 < com . gs . collections . impl . math . Sum , java . lang . Integer , java . lang . Integer , com . gs . collections . impl . math . Sum > function = ( sum , element , withValue ) -> sum . add ( ( ( ( element . intValue ( ) ) - ( element . intValue ( ) ) ) * ( withValue . intValue ( ) ) ) ) ; com . gs . collections . impl . math . Sum sumOfDoubledValues = com . gs . collections . impl . utility . Iterate . injectIntoWith ( result , integers , function , parameter ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return this . value ; }
org . junit . Assert . assertEquals ( 0 , sumOfDoubledValues . getValue ( ) . intValue ( ) )
testLookupNotExisting ( ) { org . geoserver . catalog . CatalogRepository repository = getCatalog ( ) . getResourcePool ( ) . getRepository ( ) ; org . geotools . data . DataStore store = repository . dataStore ( new org . geotools . feature . NameImpl ( "foo" , "bar" ) ) ; "<AssertPlaceHolder>" ; } getResourcePool ( ) { return catalog . getResourcePool ( ) ; }
org . junit . Assert . assertNull ( store )
guessStringsFromLineWithEmptyLine ( ) { java . lang . String [ ] saData = org . pentaho . di . trans . steps . csvinput . CsvInput . guessStringsFromLine ( logChannelInterface , null , csvInputMeta . getDelimiter ( ) , csvInputMeta . getEnclosure ( ) , csvInputMeta . getEscapeCharacter ( ) ) ; "<AssertPlaceHolder>" ; } getEscapeCharacter ( ) { return ( content ) == null ? null : content . escapeCharacter ; }
org . junit . Assert . assertNull ( saData )
testShowFieldBindingWarning ( ) { view . showFieldBindingWarning ( ) ; "<AssertPlaceHolder>" ; } showFieldBindingWarning ( ) { fieldBindingWarning . hidden = false ; }
org . junit . Assert . assertFalse ( fieldBindingWarning . hidden )
treeWithOneNodeShouldHaveSizeOfOne ( ) { final org . apache . camel . component . salesforce . api . dto . composite . SObjectTree tree = new org . apache . camel . component . salesforce . api . dto . composite . SObjectTree ( ) ; tree . addObject ( new org . apache . camel . component . salesforce . dto . generated . Account ( ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return results . size ( ) ; }
org . junit . Assert . assertEquals ( 1 , tree . size ( ) )
test_illegal_detach ( ) { com . noctarius . snowcast . impl . SequencerDefinition definition = new com . noctarius . snowcast . impl . SequencerDefinition ( "empty" , com . noctarius . snowcast . SnowcastEpoch . byTimestamp ( 1 ) , 128 , ( ( short ) ( 1 ) ) ) ; com . noctarius . snowcast . impl . LogicalNodeTable logicalNodeTable = new com . noctarius . snowcast . impl . LogicalNodeTable ( 1 , definition ) ; com . hazelcast . nio . Address address1 = new com . hazelcast . nio . Address ( "localhost" , 12345 ) ; int logicalNodeId1 = logicalNodeTable . attachLogicalNode ( address1 ) ; com . hazelcast . nio . Address assigned1 = logicalNodeTable . getAttachedLogicalNode ( logicalNodeId1 ) ; "<AssertPlaceHolder>" ; com . hazelcast . nio . Address address2 = new com . hazelcast . nio . Address ( "localhost" , 54321 ) ; logicalNodeTable . attachLogicalNode ( address2 ) ; logicalNodeTable . detachLogicalNode ( address1 , 1 ) ; } getAttachedLogicalNode ( int ) { long offset = offset ( logicalNodeId ) ; return ( ( com . hazelcast . nio . Address ) ( com . noctarius . snowcast . impl . LogicalNodeTable . UNSAFE . getObjectVolatile ( assignmentTable , offset ) ) ) ; }
org . junit . Assert . assertEquals ( address1 , assigned1 )
testSetCancellation ( ) { com . liferay . portal . fabric . netty . worker . NettyFabricWorkerStub < java . lang . String > nettyFabricWorkerStub = new com . liferay . portal . fabric . netty . worker . NettyFabricWorkerStub ( 0 , com . liferay . portal . fabric . netty . NettyTestUtil . createEmptyEmbeddedChannel ( ) , new com . liferay . portal . fabric . repository . MockRepository < io . netty . channel . Channel > ( ) , java . util . Collections . < java . nio . file . Path , java . nio . file . Path > emptyMap ( ) , 0 ) ; nettyFabricWorkerStub . setCancel ( ) ; com . liferay . petra . concurrent . NoticeableFuture < java . lang . String > noticeableFuture = nettyFabricWorkerStub . getProcessNoticeableFuture ( ) ; "<AssertPlaceHolder>" ; } isCancelled ( ) { return _future . isCancelled ( ) ; }
org . junit . Assert . assertTrue ( noticeableFuture . isCancelled ( ) )
testConfigs ( ) { java . lang . String [ ] args = new java . lang . String [ ] { "--run_cfg=src/main/resources/configuration/UnitTestConfig.cfg" } ; cc . mallet . configuration . LDACommandLineParser cp = new cc . mallet . configuration . LDACommandLineParser ( args ) ; cc . mallet . configuration . Configuration config = new cc . mallet . configuration . ParsedLDAConfiguration ( cp ) ; java . lang . String [ ] configs = config . getSubConfigs ( ) ; java . lang . String [ ] expectedConfigs = new java . lang . String [ ] { "demo" } ; int i = 0 ; for ( java . lang . String configName : configs ) { configName = configName . trim ( ) ; "<AssertPlaceHolder>" ; } } getSubConfigs ( ) { return new java . lang . String [ ] { } ; }
org . junit . Assert . assertEquals ( expectedConfigs [ ( i ++ ) ] , configName )
testSendRequestNoHandling ( ) { java . lang . String reportingHost = runJetty ( ) ; org . finra . datagenerator . consumer . DataConsumer theConsumer = new org . finra . datagenerator . consumer . DataConsumer ( ) ; theConsumer . setReportingHost ( reportingHost ) ; java . util . concurrent . Future < java . lang . String > response = theConsumer . sendRequest ( "test1" ) ; "<AssertPlaceHolder>" ; } get ( ) { return new org . finra . datagenerator . scaffolding . transformer . service . transformations . TransformationsImpl ( field , orders , value ) ; }
org . junit . Assert . assertEquals ( "test1" , response . get ( ) . trim ( ) )
type_short ( ) { com . asakusafw . dmdl . directio . json . driver . ModelLoader loaded = generateJavaFromLines ( new java . lang . String [ ] { "@directio.json" , "simple<sp>=<sp>{" , "<sp>value<sp>:<sp>SHORT;" , "};" } ) ; byte [ ] contents = restore ( loaded , loaded . newModel ( "Simple" ) . setOption ( "value" , new com . asakusafw . runtime . value . ShortOption ( ( ( short ) ( 1 ) ) ) ) ) ; "<AssertPlaceHolder>" ; } parse ( byte [ ] ) { return com . asakusafw . dmdl . directio . json . driver . JsonFormatEmitterTest . parse ( contents , StandardCharsets . UTF_8 ) ; }
org . junit . Assert . assertThat ( com . asakusafw . dmdl . directio . json . driver . JsonFormatEmitterTest . parse ( contents ) , com . asakusafw . dmdl . directio . json . driver . JsonFormatEmitterTest . contains ( com . asakusafw . dmdl . directio . json . driver . JsonFormatEmitterTest . map ( "value" , "1" ) ) )
testDynamicQueryByProjectionMissing ( ) { com . liferay . portal . kernel . dao . orm . DynamicQuery dynamicQuery = com . liferay . portal . kernel . dao . orm . DynamicQueryFactoryUtil . forClass ( com . liferay . portal . kernel . model . Layout . class , _dynamicQueryClassLoader ) ; dynamicQuery . setProjection ( com . liferay . portal . kernel . dao . orm . ProjectionFactoryUtil . property ( "plid" ) ) ; dynamicQuery . add ( com . liferay . portal . kernel . dao . orm . RestrictionsFactoryUtil . in ( "plid" , new java . lang . Object [ ] { com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) } ) ) ; java . util . List < java . lang . Object > result = _persistence . findWithDynamicQuery ( dynamicQuery ) ; "<AssertPlaceHolder>" ; } size ( ) { if ( ( _workflowTaskAssignees ) != null ) { return _workflowTaskAssignees . size ( ) ; } return _kaleoTaskAssignmentInstanceLocalService . getKaleoTaskAssignmentInstancesCount ( _kaleoTaskInstanceToken . getKaleoTaskInstanceTokenId ( ) ) ; }
org . junit . Assert . assertEquals ( 0 , result . size ( ) )
testFindInstructingSectionsByAcademicSession ( ) { java . util . Set sections = cm . findInstructingSections ( "grader1" , "F2006" ) ; "<AssertPlaceHolder>" ; } size ( ) { return m_wrapper . size ( ) ; }
org . junit . Assert . assertEquals ( 1 , sections . size ( ) )
testProfilerInNano ( ) { final long sleepTimeNano = com . cloud . utils . TestProfiler . SLEEP_TIME_NANO ; com . cloud . utils . TestProfiler . pf . start ( ) ; com . cloud . utils . TestProfiler . pf . stop ( ) ; "<AssertPlaceHolder>" ; } getDuration ( ) { if ( ( ( startTickNanoSeconds ) != null ) && ( ( stopTickNanoSeconds ) != null ) ) { return ( stopTickNanoSeconds ) - ( startTickNanoSeconds ) ; } return - 1 ; }
org . junit . Assert . assertTrue ( ( ( com . cloud . utils . TestProfiler . pf . getDuration ( ) ) == sleepTimeNano ) )
testCopyFileToStream ( ) { java . io . File test = tmp . newFolder ( ) ; byte [ ] data = ascii ( "Hello" ) ; java . io . File src = createFile ( test , "hello.txt" , data ) ; java . io . ByteArrayOutputStream dst = new java . io . ByteArrayOutputStream ( ) ; org . kocakosm . pitaya . io . XFiles . cp ( src , dst ) ; "<AssertPlaceHolder>" ; } toByteArray ( ) { byte [ ] data = new byte [ count ] ; java . lang . System . arraycopy ( buf , 0 , data , 0 , count ) ; return data ; }
org . junit . Assert . assertArrayEquals ( data , dst . toByteArray ( ) )
calculatePartSize_inexactChunkSplit_partSizeShouldBeOneMore ( ) { com . oracle . bmc . objectstorage . transfer . UploadConfiguration configuration = com . oracle . bmc . objectstorage . transfer . UploadConfiguration . builder ( ) . build ( ) ; long objectSize = ( ( configuration . getLengthPerUploadPart ( ) ) * ( MultipartUtils . MiB ) ) * ( com . oracle . bmc . objectstorage . transfer . UploadConfiguration . MAXIMUM_NUM_ALLOWED_PARTS ) ; long partSize = objectSize / ( com . oracle . bmc . objectstorage . transfer . UploadConfiguration . MAXIMUM_NUM_ALLOWED_PARTS ) ; objectSize += 1 ; partSize += 1 ; "<AssertPlaceHolder>" ; } calculatePartSize ( com . oracle . bmc . objectstorage . transfer . UploadConfiguration , long ) { org . apache . commons . lang3 . Validate . isTrue ( ( contentLength <= ( com . oracle . bmc . objectstorage . transfer . internal . MultipartUtils . MAX_SUPPORTED_CONTENT_LENGTH ) ) , java . lang . String . format ( "Content<sp>length<sp>[%s]<sp>exceeds<sp>max<sp>supported<sp>by<sp>ObjectStorage<sp>[%s]" , contentLength , com . oracle . bmc . objectstorage . transfer . internal . MultipartUtils . MAX_SUPPORTED_CONTENT_LENGTH ) ) ; final long configuredSizePerPart = ( config . getMinimumLengthPerUploadPart ( ) ) * ( com . oracle . bmc . objectstorage . transfer . internal . MultipartUtils . MiB ) ; return com . oracle . bmc . objectstorage . transfer . internal . MultipartUtils . isCalculatedPartsLessThanOrEqualToMaxParts ( configuredSizePerPart , contentLength ) ? configuredSizePerPart : com . oracle . bmc . objectstorage . transfer . internal . MultipartUtils . fetchSizePerPartBasedOnMaxAllowed ( contentLength , configuredSizePerPart ) ; }
org . junit . Assert . assertEquals ( partSize , com . oracle . bmc . objectstorage . transfer . internal . MultipartUtils . calculatePartSize ( configuration , objectSize ) )
batchIterable_forEachEntry_emptySet ( ) { org . eclipse . collections . impl . math . Sum sum = new org . eclipse . collections . impl . math . IntegerSum ( 0 ) ; org . eclipse . collections . impl . parallel . BatchIterable < Map . Entry < java . lang . Integer , java . lang . Integer > > empty = ( ( org . eclipse . collections . impl . parallel . BatchIterable < Map . Entry < java . lang . Integer , java . lang . Integer > > ) ( org . eclipse . collections . impl . map . mutable . UnifiedMap . newMap ( ) . entrySet ( ) ) ) ; empty . forEach ( new org . eclipse . collections . impl . map . mutable . UnifiedMapTest . EntrySumProcedure ( sum ) ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return this . value ; }
org . junit . Assert . assertEquals ( 0 , sum . getValue ( ) )
testShiftSpeed ( ) { int numberOfTests = 20 ; org . openpixi . pixi . physics . Settings settings = getStandardSettings ( ) ; settings . addFieldGenerator ( new org . openpixi . pixi . physics . fields . fieldgenerators . SU2RandomFields ( ) ) ; org . openpixi . pixi . physics . Simulation s = new org . openpixi . pixi . physics . Simulation ( settings ) ; org . openpixi . pixi . physics . grid . Grid g = s . grid ; initializeUnitVectors ( g ) ; int [ ] pos = getRandomLatticePosition ( s ) ; int index = g . getCellIndex ( pos ) ; long seed = java . lang . System . currentTimeMillis ( ) ; java . util . Random generator1 = new java . util . Random ( seed ) ; java . util . Random generator2 = new java . util . Random ( seed ) ; java . util . Random generator4 = new java . util . Random ( seed ) ; long time1 = - ( java . lang . System . currentTimeMillis ( ) ) ; for ( int t = 0 ; t < numberOfTests ; t ++ ) { int d = generator1 . nextInt ( s . getNumberOfDimensions ( ) ) ; int o = ( ( generator1 . nextInt ( 2 ) ) * 2 ) - 1 ; pos = shiftTesting ( g , pos , d , o ) ; } time1 += java . lang . System . currentTimeMillis ( ) ; long time2 = - ( java . lang . System . currentTimeMillis ( ) ) ; for ( int t = 0 ; t < numberOfTests ; t ++ ) { int d = generator2 . nextInt ( s . getNumberOfDimensions ( ) ) ; int o = ( ( generator2 . nextInt ( 2 ) ) * 2 ) - 1 ; index = g . shift ( index , d , o ) ; } time2 += java . lang . System . currentTimeMillis ( ) ; long time4 = - ( java . lang . System . currentTimeMillis ( ) ) ; for ( int t = 0 ; t < numberOfTests ; t ++ ) { int d = generator4 . nextInt ( s . getNumberOfDimensions ( ) ) ; int o = ( ( generator4 . nextInt ( 2 ) ) * 2 ) - 1 ; } time4 += java . lang . System . currentTimeMillis ( ) ; int index2 = g . getCellIndex ( pos ) ; "<AssertPlaceHolder>" ; if ( numberOfTests > 1000 ) { System . out . println ( ( ( ( "Shift<sp>test:<sp>Time1:<sp>" + time1 ) + "<sp>vs.<sp>Time2:<sp>" ) + time2 ) ) ; System . out . println ( ( "Generation<sp>of<sp>random<sp>numbers:<sp>" + time4 ) ) ; System . out . println ( ( ( ( "Shift<sp>test<sp>without<sp>random<sp>number<sp>generation:<sp>Time1:<sp>" + ( time1 - time4 ) ) + "<sp>vs.<sp>Time2:<sp>" ) + ( time2 - time4 ) ) ) ; } } getCellIndex ( int [ ] ) { int [ ] periodicCoordinates = periodic ( coordinates ) ; int cellIndex = periodicCoordinates [ 0 ] ; for ( int i = 1 ; i < ( coordinates . length ) ; i ++ ) { cellIndex *= numCells [ i ] ; cellIndex += periodicCoordinates [ i ] ; } return cellIndex ; }
org . junit . Assert . assertEquals ( index , index2 )
testGetColumnOrder_Initial ( ) { org . eclipse . nebula . widgets . grid . GridTestUtil . createGridColumns ( grid , 5 , SWT . NONE ) ; "<AssertPlaceHolder>" ; } getColumnOrder ( ) { checkWidget ( ) ; int [ ] result = new int [ columns . size ( ) ] ; for ( int i = 0 ; i < ( result . length ) ; i ++ ) { org . eclipse . nebula . widgets . grid . GridColumn column = displayOrderedColumns . get ( i ) ; result [ i ] = columns . indexOf ( column ) ; } return result ; }
org . junit . Assert . assertTrue ( java . util . Arrays . equals ( new int [ ] { 0 , 1 , 2 , 3 , 4 } , grid . getColumnOrder ( ) ) )
testSuccessfulCoreModelObjectWithSimpleValueType ( ) { org . jboss . dmr . ModelNode description = createSubsystemSkeleton ( ModelType . OBJECT , ModelType . BOOLEAN ) ; java . util . List < org . jboss . as . subsystem . test . ModelDescriptionValidator . ValidationFailure > errors = validate ( description , null ) ; "<AssertPlaceHolder>" ; } toString ( ) { return xmlFile . getAbsolutePath ( ) ; }
org . junit . Assert . assertEquals ( errors . toString ( ) , 0 , errors . size ( ) )
test ( ) { final nl . bzk . migratiebrp . voisc . database . entities . Bericht bericht = new nl . bzk . migratiebrp . voisc . database . entities . Bericht ( ) ; bericht . setMessageId ( "BerichtRef" ) ; bericht . setCorrelationId ( "CorrelatieRef" ) ; bericht . setRecipient ( "0518010" ) ; bericht . setOriginator ( "3000250" ) ; bericht . setBerichtInhoud ( "BerichtInhoud" ) ; subject . verstuurBerichtNaarIsc ( bericht ) ; final org . mockito . ArgumentCaptor < org . springframework . jms . core . MessageCreator > messageCreatorCaptor = org . mockito . ArgumentCaptor . forClass ( org . springframework . jms . core . MessageCreator . class ) ; org . mockito . Mockito . verify ( jmsTemplate , org . mockito . Mockito . times ( 1 ) ) . send ( org . mockito . Matchers . eq ( vospgOntvangst ) , messageCreatorCaptor . capture ( ) ) ; final org . springframework . jms . core . MessageCreator messageCreator = messageCreatorCaptor . getValue ( ) ; final nl . bzk . migratiebrp . voisc . database . entities . Mailbox mailbox0518010 = new nl . bzk . migratiebrp . voisc . database . entities . Mailbox ( ) ; mailbox0518010 . setInstantietype ( Mailbox . INSTANTIETYPE_GEMEENTE ) ; mailbox0518010 . setInstantiecode ( 518 ) ; final nl . bzk . migratiebrp . voisc . database . entities . Mailbox mailbox3000250 = new nl . bzk . migratiebrp . voisc . database . entities . Mailbox ( ) ; mailbox3000250 . setInstantietype ( Mailbox . INSTANTIETYPE_CENTRALE_VOORZIENING ) ; mailbox3000250 . setInstantiecode ( 3000250 ) ; org . mockito . Mockito . when ( mailboxRepo . getMailboxByNummer ( "0518010" ) ) . thenReturn ( mailbox0518010 ) ; org . mockito . Mockito . when ( mailboxRepo . getMailboxByNummer ( "3000250" ) ) . thenReturn ( mailbox3000250 ) ; org . mockito . Mockito . when ( session . createTextMessage ( "BerichtInhoud" ) ) . thenReturn ( textMessage ) ; final javax . jms . Message result = messageCreator . createMessage ( session ) ; "<AssertPlaceHolder>" ; org . mockito . Mockito . verify ( session , org . mockito . Mockito . times ( 1 ) ) . createTextMessage ( "BerichtInhoud" ) ; org . mockito . Mockito . verify ( textMessage , org . mockito . Mockito . times ( 1 ) ) . setStringProperty ( JMSConstants . BERICHT_ORIGINATOR , "3000250" ) ; org . mockito . Mockito . verify ( textMessage , org . mockito . Mockito . times ( 1 ) ) . setStringProperty ( JMSConstants . BERICHT_RECIPIENT , "0518" ) ; org . mockito . Mockito . verify ( textMessage , org . mockito . Mockito . times ( 1 ) ) . setStringProperty ( JMSConstants . BERICHT_REFERENTIE , "BerichtRef" ) ; org . mockito . Mockito . verify ( textMessage , org . mockito . Mockito . times ( 1 ) ) . setStringProperty ( JMSConstants . CORRELATIE_REFERENTIE , "CorrelatieRef" ) ; } createMessage ( javax . jms . Session ) { return receivedMessage ; }
org . junit . Assert . assertSame ( textMessage , result )
testEquals_3 ( ) { final boolean result = org . apache . shindig . gadgets . oauth2 . persistence . sample . OAuth2GadgetBindingTest . FIXTURE . equals ( null ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( obj == ( this ) ) { return true ; } if ( ! ( obj instanceof org . apache . shindig . gadgets . oauth2 . persistence . sample . OAuth2Provider ) ) { return false ; } final org . apache . shindig . gadgets . oauth2 . persistence . sample . OAuth2Provider other = ( ( org . apache . shindig . gadgets . oauth2 . persistence . sample . OAuth2Provider ) ( obj ) ) ; if ( ( this . name ) == null ) { if ( ( other . name ) != null ) { return false ; } } else if ( ! ( this . name . equals ( other . name ) ) ) { return false ; } return true ; }
org . junit . Assert . assertEquals ( false , result )
createZeroReferences2 ( ) { org . diirt . graphene . TimeScale linearScale = org . diirt . graphene . TimeScales . linearAbsoluteScale ( ) ; java . time . Instant start = org . diirt . graphene . TimeScalesTest . create ( 2014 , 11 , 13 , 10 , 31 , 23 , 53 ) ; org . diirt . util . time . TimeInterval timeInterval = org . diirt . util . time . TimeInterval . between ( start , start . plus ( java . time . Duration . ofMillis ( 1 ) ) ) ; org . diirt . graphene . TimeAxis timeAxis = linearScale . references ( timeInterval , ( - 100 ) , ( - 10 ) ) ; "<AssertPlaceHolder>" ; } references ( org . diirt . util . stats . Range , int , int ) { double minValue = range . getMinimum ( ) ; double maxValue = range . getMaximum ( ) ; double minIncrement = Double . MIN_VALUE ; double increment = org . diirt . graphene . LinearValueScale . incrementForRange ( minValue , maxValue , maxRefs , minIncrement ) ; double [ ] ticks = org . diirt . graphene . LinearValueScale . createTicks ( minValue , maxValue , increment ) ; if ( ( ticks . length ) < 2 ) { ticks = org . diirt . graphene . LinearValueScale . createSmallerTicks ( minValue , maxValue , increment ) ; } int rangeOrder = ( ( int ) ( org . diirt . graphene . LinearValueScale . orderOfMagnitude ( minValue , maxValue ) ) ) ; int incrementOrder = ( ( int ) ( org . diirt . graphene . LinearValueScale . orderOfMagnitude ( increment ) ) ) ; int nDigits = rangeOrder - incrementOrder ; java . text . NumberFormat format = org . diirt . graphene . LinearValueScale . defaultFormat ; double normalization = 1.0 ; java . lang . String exponent = null ; if ( ( rangeOrder >= ( - 3 ) ) && ( rangeOrder <= 3 ) ) { if ( incrementOrder < 0 ) { format = org . diirt . util . text . NumberFormats . format ( ( - incrementOrder ) ) ; } else { format = org . diirt . util . text . NumberFormats . format ( 0 ) ; } } else if ( rangeOrder > 3 ) { format = org . diirt . util . text . NumberFormats . format ( nDigits ) ; normalization = java . lang . Math . pow ( 10.0 , rangeOrder ) ; exponent = java . lang . Integer . toString ( rangeOrder ) ; } else if ( rangeOrder < ( - 3 ) ) { format = org . diirt . util . text . NumberFormats . format ( nDigits ) ; normalization = java . lang . Math . pow ( 10.0 , rangeOrder ) ; exponent = java . lang . Integer . toString ( rangeOrder ) ; } java . lang . String [ ] labels = new java . lang . String [ ticks . length ] ; for ( int i = 0 ; i < ( ticks . length ) ; i ++ ) { double value = ticks [ i ] ; labels [ i ] = org . diirt . graphene . LinearValueScale . format ( value , format , exponent , normalization ) ; } return new org . diirt . graphene . ValueAxis ( minValue , maxValue , ticks , labels ) ; }
org . junit . Assert . assertTrue ( false )
assertGetWarnings ( ) { for ( java . sql . Statement each : statements . values ( ) ) { "<AssertPlaceHolder>" ; } } getWarnings ( ) { return null ; }
org . junit . Assert . assertNull ( each . getWarnings ( ) )
testConstructor ( ) { final edu . illinois . library . cantaloupe . source . Source source = new edu . illinois . library . cantaloupe . source . MockStreamSource ( ) ; final edu . illinois . library . cantaloupe . processor . Processor processor = new edu . illinois . library . cantaloupe . processor . MockFileProcessor ( ) ; java . lang . Exception e = new edu . illinois . library . cantaloupe . processor . IncompatibleSourceException ( source , processor ) ; java . lang . String expected = java . lang . String . format ( ( "%s<sp>and<sp>%s<sp>are<sp>not<sp>compatible<sp>using<sp>%s<sp>=<sp>%s.<sp>Either<sp>use<sp>a<sp>" + ( "different<sp>source/processor<sp>combination,<sp>or<sp>switch<sp>" + "to<sp>%s<sp>or<sp>%s." ) ) , source . getClass ( ) . getSimpleName ( ) , processor . getClass ( ) . getSimpleName ( ) , Key . PROCESSOR_STREAM_RETRIEVAL_STRATEGY , RetrievalStrategy . STREAM , RetrievalStrategy . DOWNLOAD , RetrievalStrategy . CACHE ) ; "<AssertPlaceHolder>" ; } getMessage ( ) { return message ; }
org . junit . Assert . assertEquals ( expected , e . getMessage ( ) )
testWestWestNeighbour ( ) { this . constructPopulation ( ) ; org . evosuite . ga . Neighbourhood < org . evosuite . ga . Chromosome > neighbourhood = new org . evosuite . ga . Neighbourhood ( org . evosuite . Properties . POPULATION ) ; java . util . List < org . evosuite . ga . Chromosome > neighbors = new java . util . ArrayList ( ) ; neighbors = neighbourhood . CompactThirteen ( population , 5 ) ; org . evosuite . ga . Chromosome exepcted_individual = population . get ( 7 ) ; org . evosuite . ga . Chromosome returned_individual = neighbors . get ( 11 ) ; "<AssertPlaceHolder>" ; } get ( int ) { return this . pathCondition . get ( index ) ; }
org . junit . Assert . assertEquals ( exepcted_individual , returned_individual )
transforms_values_and_indicators ( ) { final java . lang . String indicatorVal = "val2" ; org . apache . metron . enrichment . converter . EnrichmentKey lookupKey = new org . apache . metron . enrichment . converter . EnrichmentKey ( "testenrichment" , indicatorVal ) ; org . apache . metron . enrichment . converter . EnrichmentValue lookupValue = new org . apache . metron . enrichment . converter . EnrichmentValue ( new org . apache . metron . dataloads . extractor . HashMap < java . lang . String , java . lang . Object > ( ) { { put ( "foo" , "val1" ) ; put ( "bar" , indicatorVal ) ; put ( "baz" , "val3" ) ; } } ) ; org . apache . metron . enrichment . lookup . LookupKV lkv = new org . apache . metron . enrichment . lookup . LookupKV ( lookupKey , lookupValue ) ; org . apache . metron . dataloads . extractor . List < org . apache . metron . enrichment . lookup . LookupKV > extractedLkvs = new org . apache . metron . dataloads . extractor . ArrayList ( ) ; extractedLkvs . add ( lkv ) ; org . mockito . Mockito . when ( extractor . extract ( "val1,val2,val3" ) ) . thenReturn ( extractedLkvs ) ; java . lang . Iterable < org . apache . metron . enrichment . lookup . LookupKV > extracted = decorator . extract ( "val1,val2,val3" ) ; org . apache . metron . enrichment . converter . EnrichmentKey expectedLookupKey = new org . apache . metron . enrichment . converter . EnrichmentKey ( "testenrichment" , "bar" 1 ) ; org . apache . metron . enrichment . converter . EnrichmentValue expectedLookupValue = new org . apache . metron . enrichment . converter . EnrichmentValue ( new org . apache . metron . dataloads . extractor . HashMap < java . lang . String , java . lang . Object > ( ) { { put ( "foo" , "VAL1" ) ; put ( "bar" , "val2" ) ; put ( "baz" , "val3" ) ; put ( "bar" 0 , "VAL1" ) ; put ( "lowernewvar" , "val1" ) ; } } ) ; org . apache . metron . enrichment . lookup . LookupKV expectedLkv = new org . apache . metron . enrichment . lookup . LookupKV ( expectedLookupKey , expectedLookupValue ) ; org . apache . metron . dataloads . extractor . List < org . apache . metron . enrichment . lookup . LookupKV > expectedLkvs = new org . apache . metron . dataloads . extractor . ArrayList ( ) ; expectedLkvs . add ( expectedLkv ) ; "<AssertPlaceHolder>" ; } add ( java . util . Map [ ] ) { if ( ms != null ) { for ( java . util . Map m : ms ) { if ( m != null ) { this . variableMappings . add ( m ) ; } } } }
org . junit . Assert . assertThat ( extracted , org . hamcrest . CoreMatchers . equalTo ( expectedLkvs ) )
clearDatePartForDate ( ) { java . util . Date date = new java . util . Date ( ) ; java . util . Calendar cal = java . util . Calendar . getInstance ( org . slim3 . util . TimeZoneLocator . get ( ) ) ; cal . setTime ( date ) ; cal . set ( Calendar . YEAR , 1970 ) ; cal . set ( Calendar . MONTH , Calendar . JANUARY ) ; cal . set ( Calendar . DATE , 1 ) ; "<AssertPlaceHolder>" ; } clearDatePart ( java . util . Date ) { if ( date == null ) { return null ; } java . util . Calendar cal = org . slim3 . util . DateUtil . toCalendar ( date ) ; cal = org . slim3 . util . DateUtil . clearDatePart ( cal ) ; return cal . getTime ( ) ; }
org . junit . Assert . assertThat ( org . slim3 . util . DateUtil . clearDatePart ( date ) , org . hamcrest . CoreMatchers . is ( cal . getTime ( ) ) )
testNoFiltersExtract5 ( ) { edu . washington . cs . knowitall . extractor . ReVerbExtractorTest . reverb = new edu . washington . cs . knowitall . extractor . ReVerbExtractor ( 0 , false , true , true ) ; edu . washington . cs . knowitall . extractor . ReVerbExtractorTest . got = edu . washington . cs . knowitall . extractor . ReVerbExtractorTest . extractRels ( "The<sp>key<sp>schedule<sp>for<sp>decryption<sp>is<sp>similar<sp>-<sp>the<sp>subkeys<sp>are<sp>in<sp>reverse<sp>order<sp>compared<sp>to<sp>encryption<sp>." , "DT<sp>JJ<sp>NN<sp>IN<sp>NN<sp>VBZ<sp>JJ<sp>:<sp>DT<sp>NNS<sp>VBP<sp>IN<sp>NN<sp>NN<sp>VBN<sp>TO<sp>NN<sp>." , "B-NP<sp>I-NP<sp>I-NP<sp>O<sp>B-NP<sp>O<sp>O<sp>O<sp>B-NP<sp>I-NP<sp>O<sp>O<sp>B-NP<sp>I-NP<sp>O<sp>O<sp>B-NP<sp>O" ) ; edu . washington . cs . knowitall . extractor . ReVerbExtractorTest . expected . add ( "is" ) ; edu . washington . cs . knowitall . extractor . ReVerbExtractorTest . expected . add ( "compared<sp>to" ) ; edu . washington . cs . knowitall . extractor . ReVerbExtractorTest . expected . add ( "are<sp>in" ) ; "<AssertPlaceHolder>" ; } add ( edu . washington . cs . knowitall . nlp . OpenNlpSentenceChunkerStats ) { this . tagTime += stats . tagTime ( ) ; this . tokenizeTime += stats . tokenizeTime ( ) ; this . chunkTime += stats . chunkTime ( ) ; this . totalTime += stats . totalTime ( ) ; ( count ) ++ ; }
org . junit . Assert . assertEquals ( edu . washington . cs . knowitall . extractor . ReVerbExtractorTest . expected , edu . washington . cs . knowitall . extractor . ReVerbExtractorTest . got )
isEmoji_for_an_emoji_and_other_chars_returns_false ( ) { java . lang . String str = "<sp>test" ; boolean isEmoji = com . vdurmont . emoji . EmojiManager . isEmoji ( str ) ; "<AssertPlaceHolder>" ; } isEmoji ( java . lang . String ) { if ( string == null ) return false ; com . vdurmont . emoji . EmojiParser . UnicodeCandidate unicodeCandidate = com . vdurmont . emoji . EmojiParser . getNextUnicodeCandidate ( string . toCharArray ( ) , 0 ) ; return ( ( unicodeCandidate != null ) && ( ( unicodeCandidate . getEmojiStartIndex ( ) ) == 0 ) ) && ( ( unicodeCandidate . getFitzpatrickEndIndex ( ) ) == ( string . length ( ) ) ) ; }
org . junit . Assert . assertFalse ( isEmoji )
testIsIndexWorkRequiredFalse ( ) { when ( mockNodeDao . isNodeAvailable ( tableIdLong ) ) . thenReturn ( true ) ; when ( mockTableIndexDAO . doesIndexStateMatch ( anyString ( ) , anyLong ( ) , anyString ( ) ) ) . thenReturn ( true ) ; org . sagebionetworks . repo . model . table . TableStatus status = new org . sagebionetworks . repo . model . table . TableStatus ( ) ; status . setState ( TableState . AVAILABLE ) ; when ( mockTableStatusDAO . getTableStatus ( tableId ) ) . thenReturn ( status ) ; boolean workRequired = manager . isIndexWorkRequired ( tableId ) ; "<AssertPlaceHolder>" ; } isIndexWorkRequired ( java . lang . String ) { if ( ! ( isTableAvailable ( tableId ) ) ) { return false ; } if ( ! ( isIndexSynchronizedWithTruth ( tableId ) ) ) { return true ; } org . sagebionetworks . repo . model . table . TableStatus status = tableStatusDAO . getTableStatus ( tableId ) ; return TableState . PROCESSING . equals ( status . getState ( ) ) ; }
org . junit . Assert . assertFalse ( workRequired )
testDecryptAESGCM_withValidInputParameters_decryptsCipherTextProperly ( ) { byte [ ] encrypted = new org . osc . core . broker . util . crypto . EncryptionUtil ( ) . encryptAESGCM ( this . plainText , this . key , this . iv , this . aad ) ; byte [ ] decrypted = new org . osc . core . broker . util . crypto . EncryptionUtil ( ) . decryptAESGCM ( encrypted , this . key , this . iv , this . aad ) ; "<AssertPlaceHolder>" ; } decryptAESGCM ( byte [ ] , javax . crypto . SecretKey , byte [ ] , byte [ ] ) { return new org . osc . core . broker . util . crypto . AESGCMEncryption ( ) . decrypt ( cipherText , key , iv , aad ) ; }
org . junit . Assert . assertArrayEquals ( this . plainText , decrypted )
testSetEndBy ( ) { java . util . Collection < org . opengis . temporal . Period > result = instant1 . getEndedBy ( ) ; java . util . Collection < org . opengis . temporal . Period > endedby = null ; ( ( org . geotools . temporal . object . DefaultInstant ) ( instant1 ) ) . setEndBy ( endedby ) ; "<AssertPlaceHolder>" ; } getEndedBy ( ) { return ( ( net . opengis . fes20 . BinaryTemporalOpType ) ( getMixed ( ) . get ( Fes20Package . Literals . DOCUMENT_ROOT__ENDED_BY , true ) ) ) ; }
org . junit . Assert . assertEquals ( instant1 . getEndedBy ( ) , result )
testWeakReferenceReducesObjectCount ( ) { new com . eclipsesource . v8 . V8Object ( v8 ) . setWeak ( ) ; "<AssertPlaceHolder>" ; } getObjectReferenceCount ( ) { checkReleased ( ) ; return references . size ( ) ; }
org . junit . Assert . assertEquals ( 0 , v8 . getObjectReferenceCount ( ) )
testSameModelSync ( ) { org . jboss . dmr . ModelNode originalModel = readResourceRecursive ( ) ; executeTriggerSyncOperation ( createMasterDcResources ( ) ) ; org . jboss . dmr . ModelNode currentModel = readResourceRecursive ( ) ; "<AssertPlaceHolder>" ; } createMasterDcResources ( ) { org . jboss . as . controller . registry . Resource rootResource = Resource . Factory . create ( ) ; registerCommonChildren ( rootResource , true ) ; rootResource . removeChild ( org . jboss . as . domain . controller . operations . AbstractOrderedChildResourceSyncModelTestCase . HOST_ELEMEMT ) ; return rootResource ; }
org . junit . Assert . assertEquals ( originalModel , currentModel )
isButtonEnabled ( ) { marketplaceGotoBean . setSelectedMarketplace ( "mid" ) ; boolean isEnabled = marketplaceGotoBean . isButtonEnabled ( ) ; "<AssertPlaceHolder>" ; } isButtonEnabled ( ) { return ( ( getSelectedMarketplace ( ) ) != null ) && ( ( getSelectedMarketplace ( ) . length ( ) ) > 0 ) ; }
org . junit . Assert . assertTrue ( isEnabled )
setContext_interruptionEnd_contextIsSet ( ) { java . lang . String readingContext = "Interruption.End" ; sampledValue . setContext ( readingContext ) ; "<AssertPlaceHolder>" ; } getContext ( ) { return context ; }
org . junit . Assert . assertThat ( sampledValue . getContext ( ) , org . hamcrest . CoreMatchers . equalTo ( readingContext ) )
testWhenCallingGetRedirectedURI_shouldReturnURIWithBaseURIPreprended ( ) { java . lang . String baseURI = "http://base.uri.example/path/" ; com . microsoft . windowsazure . services . media . implementation . ResourceLocationManager m = new com . microsoft . windowsazure . services . media . implementation . ResourceLocationManager ( baseURI ) ; java . net . URI originalURI = new java . net . URI ( "Assets" ) ; java . net . URI redirectedURI = m . getRedirectedURI ( originalURI ) ; "<AssertPlaceHolder>" ; } toString ( ) { return this . value ; }
org . junit . Assert . assertEquals ( ( baseURI + "Assets" ) , redirectedURI . toString ( ) )
testGet ( ) { com . dongsw . authority . model . ResourceFilters result = resourceFiltersService . get ( java . lang . Integer . valueOf ( 0 ) ) ; "<AssertPlaceHolder>" ; } get ( java . lang . Integer ) { return dao . unique ( id ) ; }
org . junit . Assert . assertEquals ( new com . dongsw . authority . model . ResourceFilters ( ) , result )
testStaticGetInterestPolicyWithNull ( ) { "<AssertPlaceHolder>" ; } getInterestPolicy ( org . springframework . data . gemfire . InterestPolicyType ) { return interestPolicyType != null ? interestPolicyType . getInterestPolicy ( ) : null ; }
org . junit . Assert . assertNull ( org . springframework . data . gemfire . InterestPolicyType . getInterestPolicy ( null ) )
deleteAllGPSTracks_empty_emptyAfterwards ( ) { dbHandler . deleteAllGPSTracks ( ) ; "<AssertPlaceHolder>" ; } getGPSTrackCount ( ) { final android . database . Cursor cursor = getReadableDatabase ( ) . rawQuery ( ( "SELECT<sp>COUNT(1)<sp>FROM<sp>" + ( io . github . data4all . handler . DataBaseHandler . TABLE_GPSTRACK ) ) , null ) ; cursor . moveToNext ( ) ; final int count = cursor . getInt ( 0 ) ; cursor . close ( ) ; return count ; }
org . junit . Assert . assertEquals ( 0 , dbHandler . getGPSTrackCount ( ) )
testGetCurrentContainer ( ) { org . apache . tiles . request . Request request = createMock ( org . apache . tiles . request . Request . class ) ; org . apache . tiles . request . ApplicationContext context = createMock ( org . apache . tiles . request . ApplicationContext . class ) ; org . apache . tiles . TilesContainer container = createMock ( org . apache . tiles . TilesContainer . class ) ; java . util . Map < java . lang . String , java . lang . Object > attribs = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; attribs . put ( "myKey" , container ) ; java . util . Map < java . lang . String , java . lang . Object > requestScope = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; requestScope . put ( TilesAccess . CURRENT_CONTAINER_ATTRIBUTE_NAME , container ) ; expect ( request . getApplicationContext ( ) ) . andReturn ( context ) ; expect ( context . getApplicationScope ( ) ) . andReturn ( attribs ) . anyTimes ( ) ; expect ( request . getContext ( "request" ) ) . andReturn ( requestScope ) ; replay ( request , context , container ) ; "<AssertPlaceHolder>" ; verify ( request , context , container ) ; } getCurrentContainer ( org . apache . tiles . request . Request ) { org . apache . tiles . request . ApplicationContext context = request . getApplicationContext ( ) ; java . util . Map < java . lang . String , java . lang . Object > requestScope = request . getContext ( "request" ) ; org . apache . tiles . TilesContainer container = ( ( org . apache . tiles . TilesContainer ) ( requestScope . get ( org . apache . tiles . access . TilesAccess . CURRENT_CONTAINER_ATTRIBUTE_NAME ) ) ) ; if ( container == null ) { container = org . apache . tiles . access . TilesAccess . getContainer ( context ) ; requestScope . put ( org . apache . tiles . access . TilesAccess . CURRENT_CONTAINER_ATTRIBUTE_NAME , container ) ; } return container ; }
org . junit . Assert . assertEquals ( container , org . apache . tiles . access . TilesAccess . getCurrentContainer ( request ) )
alias_ ( ) { com . querydsl . collections . Cat cc = alias ( com . querydsl . collections . Cat . class , "cat1" ) ; com . querydsl . collections . Cat ck = alias ( com . querydsl . collections . Cat . class , "cat2" ) ; java . util . List < com . querydsl . collections . Cat > rv = com . querydsl . collections . CollQueryFactory . from ( $ ( cc ) , cats ) . leftJoin ( $ ( cc . getKittens ( ) ) , $ ( ck ) ) . where ( $ ( ck ) . isNotNull ( ) , $ ( cc . getName ( ) ) . eq ( $ ( ck . getName ( ) ) ) ) . fetch ( ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return ( values . isEmpty ( ) ) && ( batches . isEmpty ( ) ) ; }
org . junit . Assert . assertFalse ( rv . isEmpty ( ) )
validateEntries ( ) { java . util . Map < java . lang . String , org . digidoc4j . impl . asic . manifest . ManifestEntry > entriesFromManifest = new java . util . HashMap < java . lang . String , org . digidoc4j . impl . asic . manifest . ManifestEntry > ( ) { { put ( "1" , new org . digidoc4j . impl . asic . manifest . ManifestEntry ( "1" , "a" ) ) ; put ( "2" , new org . digidoc4j . impl . asic . manifest . ManifestEntry ( "2" , "b" ) ) ; } } ; java . util . Set < org . digidoc4j . impl . asic . manifest . ManifestEntry > entriesFromSignature = new java . util . HashSet < org . digidoc4j . impl . asic . manifest . ManifestEntry > ( ) { { add ( new org . digidoc4j . impl . asic . manifest . ManifestEntry ( "1" , "a" ) ) ; add ( new org . digidoc4j . impl . asic . manifest . ManifestEntry ( "2" , "b" ) ) ; } } ; "<AssertPlaceHolder>" ; } validateEntries ( java . util . Map , java . util . Set , java . lang . String ) { org . digidoc4j . impl . asic . manifest . ManifestValidator . logger . debug ( "" ) ; java . util . ArrayList < org . digidoc4j . impl . asic . manifest . ManifestErrorMessage > errorMessages = new java . util . ArrayList ( ) ; if ( ( signatureEntries . size ( ) ) == 0 ) return errorMessages ; java . util . Set < org . digidoc4j . impl . asic . manifest . ManifestEntry > one = new java . util . HashSet ( manifestEntries . values ( ) ) ; java . util . Set < org . digidoc4j . impl . asic . manifest . ManifestEntry > onePrim = new java . util . HashSet ( manifestEntries . values ( ) ) ; java . util . Set < org . digidoc4j . impl . asic . manifest . ManifestEntry > two = new java . util . HashSet ( signatureEntries ) ; java . util . Set < org . digidoc4j . impl . asic . manifest . ManifestEntry > twoPrim = new java . util . HashSet ( ) ; for ( org . digidoc4j . impl . asic . manifest . ManifestEntry manifestEntry : signatureEntries ) { java . lang . String mimeType = manifestEntry . getMimeType ( ) ; java . lang . String alterName = manifestEntry . getFileName ( ) . replaceAll ( "\\+" , "<sp>" ) ; twoPrim . add ( new org . digidoc4j . impl . asic . manifest . ManifestEntry ( alterName , mimeType ) ) ; } one . removeAll ( signatureEntries ) ; onePrim . removeAll ( twoPrim ) ; two . removeAll ( manifestEntries . values ( ) ) ; twoPrim . removeAll ( manifestEntries . values ( ) ) ; if ( ( ( one . size ( ) ) > 0 ) && ( ( onePrim . size ( ) ) > 0 ) ) { for ( org . digidoc4j . impl . asic . manifest . ManifestEntry manifestEntry : one ) { java . lang . String fileName = manifestEntry . getFileName ( ) ; org . digidoc4j . impl . asic . manifest . ManifestEntry signatureEntry = org . digidoc4j . impl . asic . manifest . ManifestValidator . signatureEntryForFile ( fileName , signatureEntries ) ; if ( signatureEntry != null ) { errorMessages . add ( new org . digidoc4j . impl . asic . manifest . ManifestErrorMessage ( ( ( ( ( ( ( ( ( "<sp>" 1 + fileName ) + "><sp>with<sp>mimetype<sp><" ) + ( manifestEntry . getMimeType ( ) ) ) + "><sp>but<sp>the<sp>signature<sp>file<sp>for<sp>signature<sp>" ) + signatureId ) + "<sp>indicates<sp>the<sp>mimetype<sp>is<sp><" ) + ( signatureEntry . getMimeType ( ) ) ) + "<sp>" 0 ) , signatureId ) ) ; two . remove ( signatureEntry ) ; } else { errorMessages . add ( new org . digidoc4j . impl . asic . manifest . ManifestErrorMessage ( ( ( ( ( ( ( "<sp>" 1 + fileName ) + "><sp>with<sp>mimetype<sp><" ) + ( manifestEntry . getMimeType ( ) ) ) + "><sp>but<sp>the<sp>signature<sp>file<sp>for<sp>signature<sp>" ) + signatureId ) + "<sp>does<sp>not<sp>have<sp>an<sp>entry<sp>for<sp>this<sp>file" ) , signatureId ) ) ; } } } if ( ( ( two . size ( ) ) > 0 ) && ( ( twoPrim . size ( ) ) > 0 ) ) { for ( org . digidoc4j . impl . asic . manifest . ManifestEntry manifestEntry : two ) { errorMessages . add ( new org . digidoc4j . impl . asic . manifest . ManifestErrorMessage ( ( ( ( ( ( ( "The<sp>signature<sp>file<sp>for<sp>signature<sp>" + signatureId ) + "<sp>has<sp>an<sp>entry<sp>for<sp>file<sp><" ) + ( manifestEntry . getFileName ( ) ) ) + "><sp>with<sp>mimetype<sp><" ) + ( manifestEntry . getMimeType ( ) ) ) + "><sp>but<sp>the<sp>manifest<sp>file<sp>does<sp>not<sp>have<sp>an<sp>entry<sp>for<sp>this<sp>file" ) , signatureId ) ) ; } } return errorMessages ; }
org . junit . Assert . assertEquals ( 0 , org . digidoc4j . impl . asic . manifest . ManifestValidator . validateEntries ( entriesFromManifest , entriesFromSignature , "" ) . size ( ) )
testRWForAllTypesWithNextTuple ( ) { int rowNum = 10000 ; org . apache . tajo . tuple . memory . MemoryRowBlock rowBlock = org . apache . tajo . storage . raw . TestDirectRawFile . createRowBlock ( rowNum ) ; org . apache . tajo . storage . raw . TableMeta meta = org . apache . tajo . storage . raw . CatalogUtil . newTableMeta ( BuiltinStorages . DRAW , tajoConf ) ; org . apache . hadoop . fs . FileStatus outputFile = writeRowBlock ( tajoConf , meta , rowBlock ) ; rowBlock . release ( ) ; org . apache . tajo . storage . fragment . FileFragment fragment = new org . apache . tajo . storage . fragment . FileFragment ( "testRWForAllTypesWithNextTuple" , outputFile . getPath ( ) , 0 , outputFile . getLen ( ) ) ; org . apache . tajo . storage . rawfile . DirectRawFileScanner reader = new org . apache . tajo . storage . rawfile . DirectRawFileScanner ( tajoConf , org . apache . tajo . storage . raw . TestDirectRawFile . schema , meta , fragment ) ; reader . init ( ) ; long readStart = java . lang . System . currentTimeMillis ( ) ; int j = 0 ; org . apache . tajo . storage . Tuple tuple ; while ( ( tuple = reader . next ( ) ) != null ) { org . apache . tajo . storage . raw . TestDirectRawFile . validateTupleResult ( j , tuple ) ; j ++ ; } org . apache . tajo . storage . raw . TestDirectRawFile . LOG . info ( ( "Total<sp>read<sp>rows:<sp>" + j ) ) ; long readEnd = java . lang . System . currentTimeMillis ( ) ; org . apache . tajo . storage . raw . TestDirectRawFile . LOG . info ( ( ( "reading<sp>takes<sp>" + ( readEnd - readStart ) ) + "<sp>msec" ) ) ; reader . close ( ) ; "<AssertPlaceHolder>" ; } close ( ) { if ( ( resultSet ) != null ) { resultSet . close ( ) ; } resultSet = null ; isClosed = true ; }
org . junit . Assert . assertEquals ( rowNum , j )
testFind ( ) { final java . lang . String testPath = "/foo/bar" ; when ( mockSession . getNode ( testPath ) ) . thenReturn ( mockDsNode ) ; when ( mockDsNode . isNodeType ( org . fcrepo . kernel . modeshape . services . FEDORA_BINARY ) ) . thenReturn ( true ) ; final org . fcrepo . kernel . api . models . FedoraBinary resultBinary = testObj . find ( testSession , testPath ) ; "<AssertPlaceHolder>" ; } find ( org . fcrepo . kernel . api . FedoraSession , java . lang . String ) { return cast ( findNode ( session , path ) ) ; }
org . junit . Assert . assertNotNull ( resultBinary )
testSerializeServerEntryWithEmptyDN ( ) { org . apache . directory . api . ldap . model . entry . Entry entry = new org . apache . directory . api . ldap . model . entry . DefaultEntry ( org . apache . directory . server . core . partition . impl . btree . jdbm . ServerEntrySerializerTest . schemaManager , "" , "objectClass:<sp>top" , "objectClass:<sp>person" , "objectClass:<sp>inetOrgPerson" , "objectClass:<sp>organizationalPerson" , "cn:<sp>text" , "cn:<sp>test" , "SN:<sp>Test" , "userPassword" , org . apache . directory . api . util . Strings . getBytesUtf8 ( "password" ) ) ; org . apache . directory . server . core . partition . impl . btree . jdbm . EntrySerializer ses = new org . apache . directory . server . core . partition . impl . btree . jdbm . EntrySerializer ( org . apache . directory . server . core . partition . impl . btree . jdbm . ServerEntrySerializerTest . schemaManager ) ; byte [ ] data = ses . serialize ( entry ) ; org . apache . directory . api . ldap . model . entry . Entry result = ( ( org . apache . directory . api . ldap . model . entry . Entry ) ( ses . deserialize ( data ) ) ) ; "<AssertPlaceHolder>" ; } deserialize ( byte [ ] ) { if ( ( ( bytes == null ) || ( ( bytes . length ) != ( org . apache . directory . server . core . partition . impl . btree . jdbm . BTreeRedirectMarshaller . SIZE ) ) ) || ( ( bytes [ 0 ] ) != 1 ) ) { if ( bytes != null ) { throw new java . io . IOException ( org . apache . directory . server . i18n . I18n . err ( I18n . ERR_568 , org . apache . directory . api . util . Strings . dumpBytes ( bytes ) ) ) ; } else { throw new java . io . IOException ( org . apache . directory . server . i18n . I18n . err ( I18n . ERR_569 ) ) ; } } long recId = ( ( ( ( ( ( ( ( ( long ) ( ( bytes [ 1 ] ) & 255 ) ) << 56 ) | ( ( ( long ) ( ( bytes [ 2 ] ) & 255 ) ) << 48 ) ) | ( ( ( long ) ( ( bytes [ 3 ] ) & 255 ) ) << 40 ) ) | ( ( ( long ) ( ( bytes [ 4 ] ) & 255 ) ) << 32 ) ) | ( ( ( long ) ( ( bytes [ 5 ] ) & 255 ) ) << 24 ) ) | ( ( ( long ) ( ( bytes [ 6 ] ) & 255 ) ) << 16 ) ) | ( ( ( long ) ( ( bytes [ 7 ] ) & 255 ) ) << 8 ) ) | ( ( long ) ( ( bytes [ 8 ] ) & 255 ) ) ; return new org . apache . directory . server . core . partition . impl . btree . jdbm . BTreeRedirect ( recId ) ; }
org . junit . Assert . assertEquals ( entry , result )
removeFlashAttr ( ) { org . jooby . internal . handlers . FlashScopeHandler . FlashMap flash = new org . jooby . internal . handlers . FlashScopeHandler . FlashMap ( new java . util . HashMap ( ) ) ; flash . put ( "foo" , "bar" ) ; new org . jooby . RequestTest . RequestMock ( ) { @ org . jooby . Override public Request . Flash flash ( ) { return flash ; } } . flash ( "foo" , null ) ; "<AssertPlaceHolder>" ; } get ( org . jooby . Session$Builder ) { org . junit . Assert . assertEquals ( "678" , builder . sessionId ( ) ) ; java . util . Map < java . lang . String , java . lang . String > attrs = new java . util . LinkedHashMap < java . lang . String , java . lang . String > ( ) ; attrs . put ( "k1" , "v1.1" ) ; org . jooby . Session session = builder . accessedAt ( org . jooby . session . SessionRestoreFeature . lastAccessed . get ( ) ) . createdAt ( org . jooby . session . SessionRestoreFeature . createdAt . get ( ) ) . savedAt ( org . jooby . session . SessionRestoreFeature . lastSaved . get ( ) ) . set ( "k1" , "v1" ) . set ( attrs ) . build ( ) ; org . jooby . session . SessionRestoreFeature . latch . countDown ( ) ; return session ; }
org . junit . Assert . assertEquals ( null , flash . get ( "foo" ) )
testGeonetworkInsertDeserialization ( ) { com . thoughtworks . xstream . XStream xstream = new com . thoughtworks . xstream . XStream ( ) ; it . geosolutions . geobatch . xstream . Alias alias = new it . geosolutions . geobatch . xstream . Alias ( ) ; alias . setAliasRegistry ( aliasRegistry ) ; alias . setAliases ( xstream ) ; java . io . File configFile = new java . io . File ( "src/test/resources/geonetworkInsertFlow.xml" ) ; it . geosolutions . geobatch . configuration . flow . file . FileBasedFlowConfiguration configuration = ( ( it . geosolutions . geobatch . configuration . flow . file . FileBasedFlowConfiguration ) ( xstream . fromXML ( configFile ) ) ) ; boolean configurationDeserialized = false ; for ( it . geosolutions . geobatch . configuration . event . action . ActionConfiguration actionConfiguration : configuration . getEventConsumerConfiguration ( ) . getActions ( ) ) { if ( ( actionConfiguration != null ) && ( actionConfiguration instanceof it . geosolutions . geobatch . actions . geonetwork . configuration . GeonetworkInsertConfiguration ) ) { configurationDeserialized = true ; break ; } } "<AssertPlaceHolder>" ; } getActions ( ) { return this . actions ; }
org . junit . Assert . assertTrue ( configurationDeserialized )