input
stringlengths
28
18.7k
output
stringlengths
39
1.69k
constructor_should_compress_graph_at_construction ( ) { au . edu . wehi . idsv . graph . BasePathGraph pg = PG ( G ( 4 ) . add ( "GTACCTA" ) ) ; "<AssertPlaceHolder>" ; } getPathCount ( ) { return pathCount ; }
org . junit . Assert . assertEquals ( 1 , pg . getPathCount ( ) )
testBuilderMetGroep ( ) { final nl . bzk . brp . domain . leveringmodel . MetaObject persoon = nl . bzk . brp . domain . leveringmodel . helper . TestBuilders . maakLeegPersoon ( ) . metGroep ( ) . metGroepElement ( nl . bzk . brp . domain . leveringmodel . PERSOON_GEBOORTE ) . eindeGroep ( ) . build ( ) ; "<AssertPlaceHolder>" ; } getGroep ( nl . bzk . brp . model . basis . BrpObject ) { nl . bzk . brp . model . basis . Groep resultaat = null ; if ( brpObject instanceof nl . bzk . brp . model . logisch . kern . Persoon ) { final nl . bzk . brp . model . logisch . kern . Persoon v = ( ( nl . bzk . brp . model . logisch . kern . Persoon ) ( brpObject ) ) ; resultaat = v . getMigratie ( ) ; } return resultaat ; }
org . junit . Assert . assertNotNull ( persoon . getGroep ( nl . bzk . brp . domain . leveringmodel . PERSOON_GEBOORTE ) )
testParseQuotedDate ( ) { final java . util . Date date1 = org . apache . hc . client5 . http . utils . TestDateUtils . createDate ( 2005 , Calendar . OCTOBER , 14 ) ; final java . lang . String [ ] formats = new java . lang . String [ ] { DateUtils . PATTERN_RFC1123 } ; final java . util . Date date2 = org . apache . hc . client5 . http . utils . DateUtils . parseDate ( "'Fri,<sp>14<sp>Oct<sp>2005<sp>00:00:00<sp>GMT'" , formats ) ; "<AssertPlaceHolder>" ; } parseDate ( org . apache . hc . core5 . http . MessageHeaders , java . lang . String ) { if ( headers == null ) { return null ; } final org . apache . hc . core5 . http . Header header = headers . getFirstHeader ( headerName ) ; if ( header == null ) { return null ; } return org . apache . hc . client5 . http . utils . DateUtils . parseDate ( header . getValue ( ) , null , null ) ; }
org . junit . Assert . assertEquals ( date1 , date2 )
shouldEchoServerSendBinaryFrameWithPayloadFragmentedAndInjectedPingPong ( ) { final org . apache . mina . core . service . IoHandler handler = context . mock ( org . apache . mina . core . service . IoHandler . class ) ; final java . util . List < java . nio . ByteBuffer > bufferList = new java . util . ArrayList ( ) ; context . checking ( new org . kaazing . gateway . transport . test . Expectations ( ) { { oneOf ( handler ) . sessionCreated ( with ( any ( org . kaazing . mina . core . session . IoSessionEx . class ) ) ) ; oneOf ( handler ) . sessionOpened ( with ( any ( org . kaazing . mina . core . session . IoSessionEx . class ) ) ) ; oneOf ( handler ) . sessionClosed ( with ( any ( org . kaazing . mina . core . session . IoSessionEx . class ) ) ) ; allowing ( handler ) . messageReceived ( with ( any ( org . kaazing . mina . core . session . IoSessionEx . class ) ) , with ( any ( java . lang . Object . class ) ) ) ; will ( new org . jmock . lib . action . CustomAction ( "Capture<sp>messageReceived()<sp>parameters" ) { @ org . kaazing . gateway . transport . wsn . specification . ws . connector . Override public java . lang . Object invoke ( org . jmock . api . Invocation invocation ) throws java . lang . Throwable { java . lang . Object message = invocation . getParameter ( 1 ) ; org . kaazing . mina . core . buffer . IoBufferEx ioBuffer = ( ( org . kaazing . mina . core . buffer . IoBufferEx ) ( message ) ) ; bufferList . add ( ioBuffer . buf ( ) ) ; if ( ( bufferList . size ( ) ) == 5 ) { org . kaazing . gateway . transport . wsn . WsnSession wsnConnectSession = ( ( org . kaazing . gateway . transport . wsn . WsnSession ) ( invocation . getParameter ( 0 ) ) ) ; java . nio . ByteBuffer buffer = java . nio . ByteBuffer . allocate ( 4096 ) ; for ( java . nio . ByteBuffer bb : bufferList ) { buffer . put ( bb ) ; } buffer . flip ( ) ; org . kaazing . mina . core . buffer . IoBufferAllocatorEx < ? extends org . kaazing . gateway . transport . ws . bridge . filter . WsBuffer > allocator = wsnConnectSession . getBufferAllocator ( ) ; org . kaazing . gateway . transport . ws . bridge . filter . WsBuffer wsBuffer = allocator . wrap ( buffer , IoBufferEx . FLAG_SHARED ) ; wsBuffer . setKind ( WsBuffer . Kind . BINARY ) ; wsnConnectSession . write ( wsBuffer ) ; } return null ; } } ) ; atMost ( 1 ) . of ( handler ) . exceptionCaught ( with ( any ( org . kaazing . mina . core . session . IoSessionEx . class ) ) , with ( org . hamcrest . core . AllOf . allOf ( any ( java . io . IOException . class ) , org . junit . internal . matchers . ThrowableMessageMatcher . hasMessage ( equal ( LoggingUtils . EARLY_TERMINATION_OF_IOSESSION_MESSAGE ) ) ) ) ) ; } } ) ; final org . apache . mina . core . future . ConnectFuture connectFuture = connector . connect ( "ws://localhost:8080/echo" , null , handler ) ; connectFuture . awaitUninterruptibly ( ) ; "<AssertPlaceHolder>" ; k3po . finish ( ) ; } isConnected ( ) { return channel . isConnected ( ) ; }
org . junit . Assert . assertTrue ( connectFuture . isConnected ( ) )
testHideDefaultTimings ( ) { com . gorillalogic . monkeytalk . Command cmd = new com . gorillalogic . monkeytalk . Command ( "Button<sp>OK<sp>Click" ) ; "<AssertPlaceHolder>" ; } getCommand ( ) { return _command ; }
org . junit . Assert . assertThat ( cmd . getCommand ( ) , org . hamcrest . CoreMatchers . is ( "Button<sp>OK<sp>Click" ) )
inline_rcvMult ( ) { final java . lang . String rulebase = "rules/reloaded/msg003.prova" ; java . util . concurrent . atomic . AtomicInteger count = new java . util . concurrent . atomic . AtomicInteger ( ) ; java . util . Map < java . lang . String , java . lang . Object > globals = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; globals . put ( "$Count" , count ) ; prova = new ws . prova . api2 . ProvaCommunicatorImpl ( test . ws . prova . test2 . ProvaMessagingTest . kAgent , test . ws . prova . test2 . ProvaMessagingTest . kPort , rulebase , ws . prova . api2 . ProvaCommunicatorImpl . SYNC , globals ) ; try { synchronized ( this ) { wait ( 1000 ) ; "<AssertPlaceHolder>" ; } } catch ( java . lang . Exception e ) { } } get ( ) { return count ; }
org . junit . Assert . assertEquals ( 2 , count . get ( ) )
testDistributeWithTwoEntities ( ) { long timestamp = 100 ; java . lang . String entityOne = ( ( java . lang . String ) ( messageOne . get ( "ip_src_addr" ) ) ) ; org . apache . metron . profiler . MessageRoute routeOne = new org . apache . metron . profiler . MessageRoute ( createDefinition ( profileOne ) , entityOne , messageOne , timestamp ) ; distributor . distribute ( routeOne , context ) ; java . lang . String entityTwo = ( ( java . lang . String ) ( messageTwo . get ( "ip_src_addr" ) ) ) ; org . apache . metron . profiler . MessageRoute routeTwo = new org . apache . metron . profiler . MessageRoute ( createDefinition ( profileTwo ) , entityTwo , messageTwo , timestamp ) ; distributor . distribute ( routeTwo , context ) ; java . util . List < org . apache . metron . profiler . ProfileMeasurement > measurements = distributor . flush ( ) ; "<AssertPlaceHolder>" ; } size ( ) { int size = 0 ; for ( java . util . Map m : variableMappings ) { size += m . size ( ) ; } return size ; }
org . junit . Assert . assertEquals ( 2 , measurements . size ( ) )
zoekNietFoutievePersoonslijstOpActueelAnummer ( ) { final nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijst brpPersoonslijst = new nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijstBuilder ( ) . build ( ) ; org . mockito . Mockito . when ( brpPersoonslijstService . zoekPersoonOpAnummerFoutiefOpgeschortUitsluiten ( "1" ) ) . thenReturn ( brpPersoonslijst ) ; final nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijst result = subject . zoekNietFoutievePersoonslijstOpActueelAnummer ( "1" ) ; "<AssertPlaceHolder>" ; org . mockito . Mockito . verify ( brpPersoonslijstService ) . zoekPersoonOpAnummerFoutiefOpgeschortUitsluiten ( "1" ) ; org . mockito . Mockito . verifyNoMoreInteractions ( brpPersoonslijstService , converteerBrpNaarLo3Service ) ; } zoekNietFoutievePersoonslijstOpActueelAnummer ( long ) { return brpDalService . zoekPersoonOpAnummerFoutiefOpgeschortUitsluiten ( anummer ) ; }
org . junit . Assert . assertSame ( brpPersoonslijst , result )
whenNotEnoughTotalVotes_thenFail ( ) { final org . baeldung . persistence . model . Post post = new org . baeldung . persistence . model . Post ( ) ; post . setMinScoreRequired ( 5 ) ; post . setMinTotalVotes ( 15 ) ; final org . baeldung . reddit . util . PostScores postScores = new org . baeldung . reddit . util . PostScores ( 2 , 10 , 1 ) ; "<AssertPlaceHolder>" ; } didPostGoalFail ( org . baeldung . persistence . model . Post , org . baeldung . reddit . util . PostScores ) { final boolean failToReachRequiredScore = ( postScores . getScore ( ) ) < ( post . getMinScoreRequired ( ) ) ; final boolean enoughTotalVotes = ( ( postScores . getTotalVotes ( ) ) >= ( post . getMinTotalVotes ( ) ) ) && ( ( post . getMinTotalVotes ( ) ) > 0 ) ; final boolean keepBecauseOfComments = ( ( postScores . getNoOfComments ( ) ) > 0 ) && ( post . isKeepIfHasComments ( ) ) ; return failToReachRequiredScore && ( ! ( keepBecauseOfComments || enoughTotalVotes ) ) ; }
org . junit . Assert . assertTrue ( didPostGoalFail ( post , postScores ) )
testPropertyIsNullEncoding ( ) { org . opengis . filter . FilterFactory2 ff = new org . geotools . filter . FilterFactoryImpl ( ) ; org . opengis . filter . Filter filter = ff . isNull ( ff . property ( org . geotools . filter . v2_0 . bindings . PropertyIsNullTypeBindingTest . PROP ) ) ; org . geotools . xsd . Configuration configuration = new org . geotools . filter . v2_0 . bindings . org . geotools . filter . v2_0 . FESConfiguration ( ) ; org . geotools . xsd . Encoder encoder = new org . geotools . xsd . Encoder ( configuration ) ; encoder . setIndenting ( true ) ; org . w3c . dom . Document encodedDoc = encoder . encodeAsDOM ( filter , FES . Filter ) ; javax . xml . xpath . XPath xpath = javax . xml . xpath . XPathFactory . newInstance ( ) . newXPath ( ) ; defaultNamespaceContext ( xpath ) ; java . lang . String prop = xpath . evaluate ( "/fes:Filter/fes:PropertyIsNull/fes:ValueReference" , encodedDoc ) ; "<AssertPlaceHolder>" ; } evaluate ( org . geotools . coverage . grid . GridCoordinates2D , double [ ] ) { if ( image . getBounds ( ) . contains ( coord . x , coord . y ) ) { return image . getTile ( image . XToTileX ( coord . x ) , image . YToTileY ( coord . y ) ) . getPixel ( coord . x , coord . y , dest ) ; } throw new org . opengis . coverage . PointOutsideCoverageException ( formatEvaluateError ( coord , true ) ) ; }
org . junit . Assert . assertEquals ( org . geotools . filter . v2_0 . bindings . PropertyIsNullTypeBindingTest . PROP , prop )
testFlatten2D ( ) { org . apache . commons . math3 . linear . RealMatrix [ ] m1 = new org . apache . commons . math3 . linear . RealMatrix [ ] { new org . apache . commons . math3 . linear . Array2DRowRealMatrix ( new double [ ] [ ] { new double [ ] { 1 , 2 , 3 } , new double [ ] { 4 , 5 , 6 } } ) , new org . apache . commons . math3 . linear . Array2DRowRealMatrix ( new double [ ] [ ] { new double [ ] { 7 , 8 , 9 } , new double [ ] { 10 , 11 , 12 } } ) , new org . apache . commons . math3 . linear . Array2DRowRealMatrix ( new double [ ] [ ] { new double [ ] { 13 , 14 , 15 } , new double [ ] { 16 , 17 , 18 } } ) } ; double [ ] actual = hivemall . utils . math . MatrixUtils . flatten ( m1 ) ; double [ ] expected = new double [ 18 ] ; for ( int i = 0 ; i < ( expected . length ) ; i ++ ) { expected [ i ] = i + 1 ; } "<AssertPlaceHolder>" ; } flatten ( org . apache . commons . math3 . linear . RealMatrix [ ] [ ] ) { hivemall . utils . lang . Preconditions . checkArgument ( ( ( grid . length ) >= 1 ) , "The<sp>number<sp>of<sp>rows<sp>must<sp>be<sp>greater<sp>than<sp>1" ) ; hivemall . utils . lang . Preconditions . checkArgument ( ( ( grid [ 0 ] . length ) >= 1 ) , "The<sp>number<sp>of<sp>cols<sp>must<sp>be<sp>greater<sp>than<sp>1" ) ; final int rows = grid . length ; final int cols = grid [ 0 ] . length ; org . apache . commons . math3 . linear . RealMatrix grid00 = grid [ 0 ] [ 0 ] ; hivemall . utils . lang . Preconditions . checkNotNull ( grid00 ) ; int cellRows = grid00 . getRowDimension ( ) ; int cellCols = grid00 . getColumnDimension ( ) ; final hivemall . utils . collections . lists . DoubleArrayList list = new hivemall . utils . collections . lists . DoubleArrayList ( ( ( ( rows * cols ) * cellRows ) * cellCols ) ) ; final org . apache . commons . math3 . linear . RealMatrixPreservingVisitor visitor = new org . apache . commons . math3 . linear . DefaultRealMatrixPreservingVisitor ( ) { @ hivemall . utils . math . Override public void visit ( int row , int column , double value ) { list . add ( value ) ; } } ; for ( int row = 0 ; row < rows ; row ++ ) { for ( int col = 0 ; col < cols ; col ++ ) { org . apache . commons . math3 . linear . RealMatrix cell = grid [ row ] [ col ] ; cell . walkInRowOrder ( visitor ) ; } } return list . toArray ( ) ; }
org . junit . Assert . assertArrayEquals ( expected , actual , 0.0 )
testSubstringOfExpression ( ) { org . odata4j . expression . BoolMethodExpression ex = org . odata4j . expression . Expression . substringOf ( org . odata4j . expression . Expression . string ( "BCD" ) , org . odata4j . expression . Expression . string ( "ABCDE" ) ) ; boolean evaluate = org . odata4j . producer . inmemory . InMemoryEvaluation . evaluate ( ex , this , new org . odata4j . producer . inmemory . BeanBasedPropertyModel ( getClass ( ) ) ) ; "<AssertPlaceHolder>" ; } evaluate ( org . odata4j . expression . CommonExpression , java . lang . Object , org . odata4j . producer . inmemory . PropertyModel ) { if ( expression instanceof org . odata4j . expression . LiteralExpression ) return org . odata4j . expression . Expression . literalValue ( ( ( org . odata4j . expression . LiteralExpression ) ( expression ) ) ) ; if ( expression instanceof org . odata4j . expression . EntitySimpleProperty ) return properties . getPropertyValue ( target , ( ( org . odata4j . expression . EntitySimpleProperty ) ( expression ) ) . getPropertyName ( ) ) ; if ( expression instanceof org . odata4j . expression . BoolCommonExpression ) return org . odata4j . producer . inmemory . InMemoryEvaluation . evaluate ( ( ( org . odata4j . expression . BoolCommonExpression ) ( expression ) ) , target , properties ) ; if ( expression instanceof org . odata4j . expression . AddExpression ) return org . odata4j . producer . inmemory . InMemoryEvaluation . binaryFunction ( ( ( org . odata4j . expression . BinaryCommonExpression ) ( expression ) ) , target , properties , org . odata4j . producer . inmemory . InMemoryEvaluation . BinaryFunction . ADD ) ; if ( expression instanceof org . odata4j . expression . SubExpression ) return org . odata4j . producer . inmemory . InMemoryEvaluation . binaryFunction ( ( ( org . odata4j . expression . BinaryCommonExpression ) ( expression ) ) , target , properties , org . odata4j . producer . inmemory . InMemoryEvaluation . BinaryFunction . SUB ) ; if ( expression instanceof org . odata4j . expression . MulExpression ) return org . odata4j . producer . inmemory . InMemoryEvaluation . binaryFunction ( ( ( org . odata4j . expression . BinaryCommonExpression ) ( expression ) ) , target , properties , org . odata4j . producer . inmemory . InMemoryEvaluation . BinaryFunction . MUL ) ; if ( expression instanceof org . odata4j . expression . DivExpression ) return org . odata4j . producer . inmemory . InMemoryEvaluation . binaryFunction ( ( ( org . odata4j . expression . BinaryCommonExpression ) ( expression ) ) , target , properties , org . odata4j . producer . inmemory . InMemoryEvaluation . BinaryFunction . DIV ) ; if ( expression instanceof org . odata4j . expression . ModExpression ) return org . odata4j . producer . inmemory . InMemoryEvaluation . binaryFunction ( ( ( org . odata4j . expression . BinaryCommonExpression ) ( expression ) ) , target , properties , org . odata4j . producer . inmemory . InMemoryEvaluation . BinaryFunction . MOD ) ; if ( expression instanceof org . odata4j . expression . ParenExpression ) return org . odata4j . producer . inmemory . InMemoryEvaluation . evaluate ( ( ( org . odata4j . expression . ParenExpression ) ( expression ) ) . getExpression ( ) , target , properties ) ; if ( expression instanceof org . odata4j . expression . BoolParenExpression ) return org . odata4j . producer . inmemory . InMemoryEvaluation . evaluate ( ( ( org . odata4j . expression . BoolParenExpression ) ( expression ) ) . getExpression ( ) , target , properties ) ; if ( expression instanceof org . odata4j . expression . CastExpression ) { org . odata4j . expression . CastExpression castExpression = ( ( org . odata4j . expression . CastExpression ) ( expression ) ) ; org . odata4j . edm . EdmSimpleType < ? > t = org . odata4j . edm . EdmType . getSimple ( castExpression . getType ( ) ) ; if ( t == null ) throw new java . lang . UnsupportedOperationException ( "Only<sp>simple<sp>types<sp>supported" ) ; java . lang . Class < ? > javaType = t . getJavaTypes ( ) . iterator ( ) . next ( ) ; return org . odata4j . internal . TypeConverter . convert ( org . odata4j . producer . inmemory . InMemoryEvaluation . evaluate ( castExpression . getExpression ( ) , target , properties ) , javaType ) ; } if ( expression instanceof org . odata4j . expression . ToLowerMethodCallExpression ) { org . odata4j . expression . ToLowerMethodCallExpression e = ( ( org . odata4j . expression . ToLowerMethodCallExpression ) ( expression ) ) ; java . lang . String value = org . odata4j . producer . inmemory . InMemoryEvaluation . evaluateToString ( e . getTarget ( ) , target , properties ) ; return value == null ? null : value . toLowerCase ( ) ; } if ( expression instanceof org . odata4j . expression . ToUpperMethodCallExpression ) { org . odata4j . expression . ToUpperMethodCallExpression e = ( ( org . odata4j . expression . ToUpperMethodCallExpression ) ( expression ) ) ; java . lang . String value = org . odata4j . producer . inmemory . InMemoryEvaluation . evaluateToString ( e . getTarget ( ) , target , properties ) ; return value == null ? null : value . toUpperCase ( ) ; } if ( expression instanceof org . odata4j . expression . SubstringMethodCallExpression ) { org . odata4j . expression . SubstringMethodCallExpression e = ( ( org . odata4j . expression . SubstringMethodCallExpression ) ( expression ) ) ; java . lang . String value = org . odata4j . producer . inmemory . InMemoryEvaluation . evaluateToString ( e . getTarget ( )
org . junit . Assert . assertTrue ( evaluate )
testSurviveErrorOnOpen ( ) { System . out . println ( "Survive<sp>error<sp>on<sp>open<sp>with<sp>WALSource" ) ; java . io . File basedir = com . cloudera . util . FileUtil . mktempdir ( ) ; basedir . deleteOnExit ( ) ; java . io . File logDir = new java . io . File ( basedir , NaiveFileWALManager . LOGGEDDIR ) ; logDir . mkdirs ( ) ; java . io . File corrupt = new java . io . File ( logDir , "walempty.00000000.20091104-101213997-0800.seq" ) ; System . out . println ( ( "corrupt<sp>file<sp>is<sp>named:<sp>" + ( corrupt . getAbsolutePath ( ) ) ) ) ; corrupt . createNewFile ( ) ; corrupt . deleteOnExit ( ) ; com . cloudera . flume . agent . durability . NaiveFileWALManager walman = new com . cloudera . flume . agent . durability . NaiveFileWALManager ( basedir ) ; final com . cloudera . flume . agent . durability . WALSource src = new com . cloudera . flume . agent . durability . WALSource ( walman ) ; src . open ( ) ; src . recover ( ) ; final java . util . concurrent . atomic . AtomicBoolean okstate = new java . util . concurrent . atomic . AtomicBoolean ( true ) ; java . lang . Thread t = new java . lang . Thread ( ) { public void run ( ) { try { src . next ( ) ; } catch ( java . lang . Exception e ) { e . printStackTrace ( ) ; } finally { okstate . set ( false ) ; } } } ; t . start ( ) ; com . cloudera . util . Clock . sleep ( 3000 ) ; src . close ( ) ; "<AssertPlaceHolder>" ; } get ( ) { if ( ( com . cloudera . flume . conf . FlumeConfiguration . singleton ) == null ) com . cloudera . flume . conf . FlumeConfiguration . singleton = new com . cloudera . flume . conf . FlumeConfiguration ( ) ; return com . cloudera . flume . conf . FlumeConfiguration . singleton ; }
org . junit . Assert . assertTrue ( okstate . get ( ) )
shouldMarshalAndUnmarshalValidZoneId ( ) { java . time . ZoneId zone = java . time . ZoneId . of ( "Europe/Berlin" ) ; "<AssertPlaceHolder>" ; } marshalAndUnmarshal ( java . time . ZoneId ) { return new org . opennms . netmgt . config . users . TimeZoneIdAdapter ( ) . unmarshal ( new org . opennms . netmgt . config . users . TimeZoneIdAdapter ( ) . marshal ( zoneId ) ) ; }
org . junit . Assert . assertEquals ( zone , marshalAndUnmarshal ( zone ) )
testWriteAnchor ( ) { tag . writeAnchor ( tag . createTagWriter ( ) , PaginationInfo . DEFAULT_DISABLED_HREF , "" ) ; java . lang . String expected = "<a<sp>href=\"javascript:void(0)\"></a>" ; "<AssertPlaceHolder>" ; } getOutput ( ) { return this . writer . toString ( ) ; }
org . junit . Assert . assertThat ( getOutput ( ) , org . hamcrest . CoreMatchers . is ( expected ) )
testKeys ( ) { K key1 = keyFactory . instance ( ) ; V value1 = valueFactory . instance ( ) ; org . junit . Assume . assumeTrue ( ( ( key1 instanceof java . lang . String ) || ( key1 instanceof byte [ ] ) ) ) ; redisTemplate . opsForValue ( ) . set ( key1 , value1 ) ; K keyPattern = ( key1 instanceof java . lang . String ) ? ( ( K ) ( "*" ) ) : ( ( K ) ( "*" . getBytes ( ) ) ) ; "<AssertPlaceHolder>" ; } keys ( java . lang . String ) { return convertAndReturn ( delegate . keys ( serialize ( pattern ) ) , byteSetToStringSet ) ; }
org . junit . Assert . assertNotNull ( redisTemplate . keys ( keyPattern ) )
testCommitThenRollback ( ) { com . hazelcast . core . Transaction transaction = instance . getTransaction ( ) ; transaction . begin ( ) ; com . hazelcast . core . IMap < java . lang . String , java . lang . String > imap = instance . getMap ( com . alu . e3 . common . caching . TestICacheImpl . AUTH_MAP_NAME ) ; "<AssertPlaceHolder>" ; imap . put ( "key" , "value" ) ; transaction . commit ( ) ; transaction . rollback ( ) ; } get ( K ) { throwNullTableException ( ) ; return null ; }
org . junit . Assert . assertNull ( imap . get ( "key" ) )
runTest ( ) { boolean result = checkNoError ( "Social_Communities_Get_My_Invites" ) ; "<AssertPlaceHolder>" ; } getNoErrorMsg ( ) { return noErrorMsg ; }
org . junit . Assert . assertTrue ( getNoErrorMsg ( ) , result )
assureInputInBatchModeWhenNotRequired ( ) { final com . microsoft . azure . maven . function . AddMojo mojo = getMojoFromPom ( ) ; final com . microsoft . azure . maven . function . AddMojo mojoSpy = spy ( mojo ) ; final java . util . Set < java . lang . String > set = new java . util . HashSet ( ) ; mojoSpy . assureInputInBatchMode ( "a0" , org . codehaus . plexus . util . StringUtils :: isNotEmpty , set :: add , true ) ; "<AssertPlaceHolder>" ; } assureInputInBatchMode ( java . lang . String , java . util . function . Function , java . util . function . Consumer , boolean ) { if ( validator . apply ( input ) ) { info ( com . microsoft . azure . maven . function . AddMojo . FOUND_VALID_VALUE ) ; setter . accept ( input ) ; return ; } if ( required ) { throw new org . apache . maven . plugin . MojoFailureException ( java . lang . String . format ( "invalid<sp>input:<sp>%s" , input ) ) ; } else { java . lang . System . out . printf ( "The<sp>input<sp>is<sp>invalid.<sp>Use<sp>empty<sp>string.%n" ) ; setter . accept ( "" ) ; } }
org . junit . Assert . assertTrue ( set . contains ( "a0" ) )
testBug53792a ( ) { javax . el . MethodExpression me = factory . createMethodExpression ( context , "${beanA.setBean(beanB)}" , null , new java . lang . Class < ? > [ ] { org . apache . el . TesterBeanB . class } ) ; me . invoke ( context , null ) ; me = factory . createMethodExpression ( context , ( ( "${beanB.setName('" + ( org . apache . el . TestMethodExpressionImpl . BUG53792 ) ) + "')}" ) , null , new java . lang . Class < ? > [ ] { org . apache . el . TesterBeanB . class } ) ; me . invoke ( context , null ) ; javax . el . ValueExpression ve = factory . createValueExpression ( context , "#{beanA.getBean().name}" , java . lang . String . class ) ; java . lang . String actual = ( ( java . lang . String ) ( ve . getValue ( context ) ) ) ; "<AssertPlaceHolder>" ; } getValue ( org . apache . el . lang . EvaluationContext ) { java . lang . Object obj = this . children [ 0 ] . getValue ( ctx ) ; if ( obj == null ) { return java . lang . Long . valueOf ( 0 ) ; } if ( obj instanceof java . math . BigDecimal ) { return ( ( java . math . BigDecimal ) ( obj ) ) . negate ( ) ; } if ( obj instanceof java . math . BigInteger ) { return ( ( java . math . BigInteger ) ( obj ) ) . negate ( ) ; } if ( obj instanceof java . lang . String ) { if ( isStringFloat ( ( ( java . lang . String ) ( obj ) ) ) ) { return new java . lang . Double ( ( - ( java . lang . Double . parseDouble ( ( ( java . lang . String ) ( obj ) ) ) ) ) ) ; } return java . lang . Long . valueOf ( ( - ( java . lang . Long . parseLong ( ( ( java . lang . String ) ( obj ) ) ) ) ) ) ; } if ( obj instanceof java . lang . Long ) { return java . lang . Long . valueOf ( ( - ( ( ( java . lang . Long ) ( obj ) ) . longValue ( ) ) ) ) ; } if ( obj instanceof java . lang . Double ) { return new java . lang . Double ( ( - ( ( ( java . lang . Double ) ( obj ) ) . doubleValue ( ) ) ) ) ; } if ( obj instanceof java . lang . Integer ) { return java . lang . Integer . valueOf ( ( - ( ( ( java . lang . Integer ) ( obj ) ) . intValue ( ) ) ) ) ; } if ( obj instanceof java . lang . Float ) { return new java . lang . Float ( ( - ( ( ( java . lang . Float ) ( obj ) ) . floatValue ( ) ) ) ) ; } if ( obj instanceof java . lang . Short ) { return java . lang . Short . valueOf ( ( ( short ) ( - ( ( ( java . lang . Short ) ( obj ) ) . shortValue ( ) ) ) ) ) ; } if ( obj instanceof java . lang . Byte ) { return java . lang . Byte . valueOf ( ( ( byte ) ( - ( ( ( java . lang . Byte ) ( obj ) ) . byteValue ( ) ) ) ) ) ; } java . lang . Long num = ( ( java . lang . Long ) ( coerceToNumber ( obj , org . apache . el . parser . Long . class ) ) ) ; return java . lang . Long . valueOf ( ( - ( num . longValue ( ) ) ) ) ; }
org . junit . Assert . assertEquals ( org . apache . el . TestMethodExpressionImpl . BUG53792 , actual )
testRemoveResourcesCostCategoryAssignment ( ) { org . libreplan . business . costcategories . entities . ResourcesCostCategoryAssignment assignment = createValidResourcesCostCategoryAssignment ( ) ; resourcesCostCategoryAssignmentDAO . save ( assignment ) ; resourcesCostCategoryAssignmentDAO . remove ( assignment . getId ( ) ) ; "<AssertPlaceHolder>" ; } exists ( PK extends java . io . Serializable ) { return ( getSession ( ) . createCriteria ( entityClass ) . add ( org . hibernate . criterion . Restrictions . idEq ( id ) ) . setProjection ( org . hibernate . criterion . Projections . id ( ) ) . uniqueResult ( ) ) != null ; }
org . junit . Assert . assertFalse ( resourcesCostCategoryAssignmentDAO . exists ( assignment . getId ( ) ) )
testWritableWithColumns ( ) { org . apache . hadoop . hive . accumulo . AccumuloHiveRow rowWithColumns = new org . apache . hadoop . hive . accumulo . AccumuloHiveRow ( "row" ) ; rowWithColumns . add ( "cf" , "cq1" , "1" . getBytes ( ) ) ; rowWithColumns . add ( "cf" , "cq2" , "2" . getBytes ( ) ) ; java . io . ByteArrayOutputStream baos = new java . io . ByteArrayOutputStream ( ) ; java . io . DataOutputStream out = new java . io . DataOutputStream ( baos ) ; rowWithColumns . write ( out ) ; out . close ( ) ; org . apache . hadoop . hive . accumulo . AccumuloHiveRow copy = new org . apache . hadoop . hive . accumulo . AccumuloHiveRow ( ) ; java . io . ByteArrayInputStream bais = new java . io . ByteArrayInputStream ( baos . toByteArray ( ) ) ; java . io . DataInputStream in = new java . io . DataInputStream ( bais ) ; copy . readFields ( in ) ; "<AssertPlaceHolder>" ; } readFields ( java . io . DataInput ) { primitiveCategory = org . apache . hadoop . io . WritableUtils . readEnum ( in , org . apache . hadoop . hive . serde2 . objectinspector . PrimitiveObjectInspector . PrimitiveCategory . class ) ; typeName = org . apache . hadoop . io . WritableUtils . readString ( in ) ; try { primitiveJavaType = java . lang . Class . forName ( org . apache . hadoop . io . WritableUtils . readString ( in ) ) ; primitiveJavaClass = java . lang . Class . forName ( org . apache . hadoop . io . WritableUtils . readString ( in ) ) ; primitiveWritableClass = java . lang . Class . forName ( org . apache . hadoop . io . WritableUtils . readString ( in ) ) ; } catch ( java . lang . ClassNotFoundException e ) { throw new java . io . IOException ( e ) ; } }
org . junit . Assert . assertEquals ( rowWithColumns , copy )
testMeter ( ) { org . mockito . Mockito . when ( sampleBuilder . createSample ( "meter" , "_total" , java . util . Collections . < java . lang . String > emptyList ( ) , java . util . Collections . < java . lang . String > emptyList ( ) , 2 ) ) . thenReturn ( new io . prometheus . client . Collector . MetricFamilySamples . Sample ( "meter_total" , java . util . Collections . < java . lang . String > emptyList ( ) , java . util . Collections . < java . lang . String > emptyList ( ) , 2 ) ) ; io . prometheus . client . dropwizard . Meter meter = metricRegistry . meter ( "meter" ) ; meter . mark ( ) ; meter . mark ( ) ; "<AssertPlaceHolder>" ; } getSampleValue ( java . lang . String ) { return getSampleValue ( name , new java . lang . String [ ] { } , new java . lang . String [ ] { } ) ; }
org . junit . Assert . assertEquals ( new java . lang . Double ( 2 ) , registry . getSampleValue ( "meter_total" ) )
test ( ) { org . simpleflatmapper . reflect . getter . ArraySizeGetter getter = new org . simpleflatmapper . reflect . getter . ArraySizeGetter ( ) ; "<AssertPlaceHolder>" ; getter . toString ( ) ; } getInt ( org . simpleflatmapper . csv . CsvRow , org . simpleflatmapper . converter . Context , int ) { return target . getInt ( index ) ; }
org . junit . Assert . assertEquals ( 3 , getter . getInt ( new java . lang . String [ ] { "" , "" , "" } ) )
testMultiColumn ( ) { org . gradoop . common . model . impl . properties . PropertyValue a = org . gradoop . common . model . impl . properties . PropertyValue . create ( "Foo" ) ; org . gradoop . common . model . impl . properties . PropertyValue b = org . gradoop . common . model . impl . properties . PropertyValue . create ( 42 ) ; org . gradoop . flink . model . impl . operators . matching . single . cypher . pojos . Embedding embedding = new org . gradoop . flink . model . impl . operators . matching . single . cypher . pojos . Embedding ( ) ; embedding . add ( org . gradoop . common . model . impl . id . GradoopId . get ( ) , a , b ) ; org . gradoop . flink . model . impl . operators . matching . single . cypher . operators . join . functions . ExtractPropertyJoinColumns udf = new org . gradoop . flink . model . impl . operators . matching . single . cypher . operators . join . functions . ExtractPropertyJoinColumns ( java . util . Arrays . asList ( 0 , 1 ) ) ; "<AssertPlaceHolder>" ; } getRawProperty ( int ) { int offset = getPropertyOffset ( column ) ; int entryLength = com . google . common . primitives . Ints . fromByteArray ( org . apache . commons . lang3 . ArrayUtils . subarray ( propertyData , offset , ( offset + ( Integer . BYTES ) ) ) ) ; return org . apache . commons . lang3 . ArrayUtils . subarray ( propertyData , offset , ( ( offset + ( Integer . BYTES ) ) + entryLength ) ) ; }
org . junit . Assert . assertEquals ( ( ( org . apache . commons . lang . ArrayUtils . toString ( embedding . getRawProperty ( 0 ) ) ) + ( org . apache . commons . lang . ArrayUtils . toString ( embedding . getRawProperty ( 1 ) ) ) ) , udf . getKey ( embedding ) )
testMatchExactly ( ) { "<AssertPlaceHolder>" ; }
org . junit . Assert . assertThat ( result , org . hamcrest . CoreMatchers . is ( true ) )
testBizTwoAddCustomer ( ) { com . alibaba . cola . test . AddCustomerCmd addCustomerCmd = new com . alibaba . cola . test . AddCustomerCmd ( ) ; context . setBizCode ( Constants . BIZ_TWO ) ; addCustomerCmd . setContext ( context ) ; com . alibaba . cola . test . CustomerCO customerCO = new com . alibaba . cola . test . CustomerCO ( ) ; customerCO . setCompanyName ( "alibaba" ) ; customerCO . setSource ( Constants . SOURCE_AD ) ; customerCO . setCustomerType ( CustomerType . IMPORTANT ) ; addCustomerCmd . setCustomerCO ( customerCO ) ; com . alibaba . cola . dto . Response response = customerService . addCustomer ( addCustomerCmd ) ; "<AssertPlaceHolder>" ; } isSuccess ( ) { return isSuccess ; }
org . junit . Assert . assertTrue ( response . isSuccess ( ) )
oneEntityIsTheSameAsItself ( ) { cleancoderscom . entities . Entity e1 = new cleancoderscom . entities . Entity ( ) ; e1 . setId ( "e1ID" ) ; "<AssertPlaceHolder>" ; } isSame ( cleancoderscom . entities . Entity ) { return ( ( id ) != null ) && ( java . util . Objects . equals ( id , entity . id ) ) ; }
org . junit . Assert . assertTrue ( e1 . isSame ( e1 ) )
testOverwriteTable ( ) { java . lang . String namespace = "foo" ; mgr . setTable ( goodNetwork , org . cytoscape . model . CyNode . class , namespace , table1 ) ; mgr . setTable ( goodNetwork , org . cytoscape . model . CyNode . class , namespace , table2 ) ; org . cytoscape . model . CyTable other = mgr . getTable ( goodNetwork , org . cytoscape . model . CyNode . class , namespace ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertSame ( table2 , other )
deveObterNumeroComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe400 . classes . cadastro . NFRetornoConsultaCadastroEndereco retornoConsultaCadastroEndereco = new com . fincatto . documentofiscal . nfe400 . classes . cadastro . NFRetornoConsultaCadastroEndereco ( ) ; retornoConsultaCadastroEndereco . setNumero ( "1435" ) ; "<AssertPlaceHolder>" ; } getNumero ( ) { return this . numero ; }
org . junit . Assert . assertEquals ( "1435" , retornoConsultaCadastroEndereco . getNumero ( ) )
testNietAlleHoofdPersonenVerwerkbaar ( ) { final nl . bzk . brp . bijhouding . bericht . model . RelatieElement relatieElement = builder . maakHuwelijkElement ( "CI_huwelijk" , "1" , builder . maakRelatieGroepElement ( "CI_relatie" , new nl . bzk . brp . bijhouding . bericht . model . ElementBuilder . RelatieGroepParameters ( ) . datumAanvang ( datumAanvangGeldigheid . getWaarde ( ) ) . landGebiedAanvangCode ( "6030" ) ) , java . util . Collections . emptyList ( ) ) ; final nl . bzk . brp . bijhouding . bericht . model . BijhoudingVerzoekBericht bericht = mock ( nl . bzk . brp . bijhouding . bericht . model . BijhoudingVerzoekBericht . class ) ; final nl . bzk . brp . bijhouding . bericht . model . BijhoudingRelatie relatieEntiteit = nl . bzk . brp . bijhouding . bericht . model . CorrectieRegistratieRelatieActieElementTest . maakRelatieEntiteit ( ) ; when ( bericht . getEntiteitVoorObjectSleutel ( nl . bzk . brp . bijhouding . bericht . model . BijhoudingRelatie . class , relatieElement . getObjectSleutel ( ) ) ) . thenReturn ( relatieEntiteit ) ; relatieElement . setVerzoekBericht ( bericht ) ; final nl . bzk . brp . bijhouding . bericht . model . CorrectieRegistratieRelatieActieElement actieElement = new nl . bzk . brp . bijhouding . bericht . model . CorrectieRegistratieRelatieActieElement ( actieAttributen , datumAanvangGeldigheid , null , null , relatieElement ) ; final nl . bzk . algemeenbrp . dal . domein . brp . entity . AdministratieveHandeling administratieveHandeling = new nl . bzk . algemeenbrp . dal . domein . brp . entity . AdministratieveHandeling ( new nl . bzk . algemeenbrp . dal . domein . brp . entity . Partij ( "test" , "000000" ) , nl . bzk . algemeenbrp . dal . domein . brp . enums . SoortAdministratieveHandeling . CORRECTIE_HUWELIJK , new java . sql . Timestamp ( java . lang . System . currentTimeMillis ( ) ) ) ; "<AssertPlaceHolder>" ; } verwerk ( nl . bzk . migratiebrp . bericht . model . sync . impl . VerwerkToevalligeGebeurtenisVerzoekBericht , nl . bzk . migratiebrp . synchronisatie . dal . domein . brp . kern . entity . Persoon ) { bronIdVolgnummer = 1 ; identificatieIdVolgnummer = 1 ; final nl . bzk . migratiebrp . bericht . model . brp . generated . ObjecttypeBerichtBijhouding opdracht = maakBrpToevalligeGebeurtenisOpdracht ( verzoek , rootPersoon ) ; verstuurBrpToevalligeGebeurtenisOpdracht ( opdracht , verzoek . getMessageId ( ) ) ; return true ; }
org . junit . Assert . assertNull ( actieElement . verwerk ( bericht , administratieveHandeling ) )
testGetObjectFromFolder ( ) { repositoryFactory . logOnProject ( sampleProject ) ; org . talend . core . model . properties . Property property = PropertiesFactory . eINSTANCE . createProperty ( ) ; property . setAuthor ( sampleProject . getAuthor ( ) ) ; property . setVersion ( VersionUtils . DEFAULT_VERSION ) ; property . setStatusCode ( "" ) ; property . setLabel ( "myJob" ) ; property . setDisplayName ( "myJob" ) ; final java . lang . String nextId = repositoryFactory . getNextId ( ) ; property . setId ( nextId ) ; org . talend . core . model . properties . ProcessItem processItem = PropertiesFactory . eINSTANCE . createProcessItem ( ) ; processItem . setProperty ( property ) ; org . talend . designer . core . model . utils . emf . talendfile . ProcessType process = TalendFileFactory . eINSTANCE . createProcessType ( ) ; processItem . setProcess ( process ) ; repositoryFactory . create ( sampleProject , processItem , new org . eclipse . core . runtime . Path ( "" ) , false ) ; final org . talend . commons . utils . data . container . RootContainer < java . lang . Object , java . lang . Object > objectFromFolder = repositoryFactory . getObjectFromFolder ( org . talend . repository . ProjectManager . getInstance ( ) . getCurrentProject ( ) , ERepositoryObjectType . PROCESS , true ) ; "<AssertPlaceHolder>" ; for ( org . eclipse . emf . ecore . resource . Resource resource : repositoryFactory . xmiResourceManager . getAffectedResources ( property ) ) { repositoryFactory . xmiResourceManager . deleteResource ( resource ) ; } } getCurrentProject ( ) { initCurrentProject ( ) ; return this . currentProject ; }
org . junit . Assert . assertNotNull ( objectFromFolder )
parseApacheHttpdOnlyDurationTime ( ) { com . navercorp . pinpoint . agent . plugin . proxy . apache . ApacheRequestParser parser = new com . navercorp . pinpoint . agent . plugin . proxy . apache . ApacheRequestParser ( ) ; final long currentTimeMillis = java . lang . System . currentTimeMillis ( ) ; java . lang . String value = "<sp>D=12345" ; com . navercorp . pinpoint . profiler . context . recorder . proxy . ProxyRequestHeader proxyHttpHeader = parser . parse ( value ) ; "<AssertPlaceHolder>" ; } isValid ( ) { return valid ; }
org . junit . Assert . assertFalse ( proxyHttpHeader . isValid ( ) )
test_DoublesPair_of_PairDoubleDouble ( ) { org . testng . eclipse . convert . Pair < java . lang . Double , java . lang . Double > base = org . testng . eclipse . convert . ObjectsPair . of ( java . lang . Double . valueOf ( 1.2 ) , java . lang . Double . valueOf ( 2.5 ) ) ; org . testng . eclipse . convert . DoublesPair test = org . testng . eclipse . convert . DoublesPair . of ( base ) ; "<AssertPlaceHolder>" ; } of ( org . testng . eclipse . convert . DoublesPair ) { return null ; }
org . junit . Assert . assertEquals ( new org . testng . eclipse . convert . DoublesPair ( 1.2 , 2.5 ) , test )
itHandlesEmptyURLs ( ) { com . braintreegateway . TransactionLevelFeeReport report = new com . braintreegateway . TransactionLevelFeeReport ( "" ) ; "<AssertPlaceHolder>" ; } getRows ( ) { return rows ; }
org . junit . Assert . assertEquals ( 0 , report . getRows ( ) . size ( ) )
whenDivideTwoLongValues_shouldDivideThemAndReturnTheResultForFloorRounding ( ) { long result = com . google . common . math . LongMath . divide ( 10L , 3L , RoundingMode . FLOOR ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( 3L , result )
shouldRejectVipsAddress ( ) { org . openstack . atlas . api . validation . results . ValidatorResult result = vipsValidator . validate ( vips , org . openstack . atlas . api . mgmt . validation . validators . VIPS_POST ) ; "<AssertPlaceHolder>" ; } resultMessage ( org . openstack . atlas . api . validation . results . ValidatorResult , java . lang . Enum ) { java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; if ( ! ( result . passedValidation ( ) ) ) { java . util . List < org . openstack . atlas . api . validation . results . ExpectationResult > ers = result . getValidationResults ( ) ; sb . append ( java . lang . String . format ( "ON<sp>%s<sp>result.withMessage([" , ctx . toString ( ) ) ) ; for ( org . openstack . atlas . api . validation . results . ExpectationResult er : ers ) { sb . append ( java . lang . String . format ( "%s" , er . getMessage ( ) ) ) ; sb . append ( "])" ) ; } } else { sb . append ( java . lang . String . format ( "On<sp>%s<sp>All<sp>Expectations<sp>PASSED\n" , ctx . toString ( ) ) ) ; } return sb . toString ( ) ; }
org . junit . Assert . assertFalse ( resultMessage ( result , org . openstack . atlas . api . mgmt . validation . validators . VIPS_POST ) , result . passedValidation ( ) )
testReadFileWithLoadFalse ( ) { com . ibm . sbt . services . client . connections . files . File file = uploadFile ( "testReadFileWithLoadFalse" ) ; com . ibm . sbt . services . client . base . datahandlers . EntityList < com . ibm . sbt . services . client . connections . files . File > listOfFiles = fileService . getMyFiles ( ) ; java . lang . String testFileId = listOfFiles . get ( 0 ) . getFileId ( ) ; com . ibm . sbt . services . client . connections . files . File entry = fileService . getFile ( testFileId , false ) ; "<AssertPlaceHolder>" ; fileService . deleteFile ( file . getFileId ( ) ) ; } getCategory ( ) { return getAsString ( FileEntryXPath . Category ) ; }
org . junit . Assert . assertNull ( entry . getCategory ( ) )
should_return_false_if_is_author_and_there_is_solution ( ) { org . mamute . model . User author = user ( "Fernanda" , "bla@bla.com" , 1L ) ; org . mamute . model . Question question = question ( author ) ; org . mamute . model . Answer answer = answer ( "" , question , author ) ; question . markAsSolvedBy ( answer ) ; "<AssertPlaceHolder>" ; } canMarkAsSolution ( org . mamute . model . User ) { return ( ( user . equals ( author ) ) && ( ( solution ) == null ) ) && ( ( answerCount ) != 0 ) ; }
org . junit . Assert . assertFalse ( question . canMarkAsSolution ( author ) )
testSum ( ) { "<AssertPlaceHolder>" ; }
org . junit . Assert . assertThat ( ( 1 + 2 ) , org . hamcrest . CoreMatchers . equalTo ( 3 ) )
testGroupByWithViewAlias ( ) { java . lang . String functionColumn = "select<sp>id<sp>from<sp>(select<sp>h.id<sp>from<sp>hotnews<sp>h<sp>union<sp>select<sp>h.title<sp>from<sp>hotnews<sp>h<sp>)<sp>as<sp>t1<sp>group<sp>by<sp>t1.id;" ; java . lang . Object result = invokeGroupBy ( functionColumn ) ; "<AssertPlaceHolder>" ; } invokeGroupBy ( java . lang . String ) { java . util . Map < java . lang . String , java . lang . String > aliaColumns = new java . util . TreeMap ( ) ; com . alibaba . druid . sql . ast . expr . SQLIdentifierExpr sqlExpr = mock ( com . alibaba . druid . sql . ast . expr . SQLIdentifierExpr . class ) ; com . alibaba . druid . sql . ast . expr . SQLIdentifierExpr expr = mock ( com . alibaba . druid . sql . ast . expr . SQLIdentifierExpr . class ) ; java . util . List < com . alibaba . druid . sql . ast . SQLExpr > groupByItems = new java . util . ArrayList ( ) ; groupByItems . add ( sqlExpr ) ; when ( sqlExpr . getName ( ) ) . thenReturn ( functionColumn ) ; java . lang . Class c = io . mycat . route . parser . druid . impl . DruidSelectParser . class ; java . lang . reflect . Method method = c . getDeclaredMethod ( "buildGroupByCols" , new java . lang . Class [ ] { java . util . List . class , java . util . Map . class } ) ; method . setAccessible ( true ) ; return method . invoke ( druidSelectParser , groupByItems , aliaColumns ) ; }
org . junit . Assert . assertEquals ( functionColumn , ( ( java . lang . String [ ] ) ( result ) ) [ 0 ] )
testGetUpdateAction ( ) { classUnderTest . setUpdateAction ( 10 ) ; "<AssertPlaceHolder>" ; } getUpdateAction ( ) { return updateAction ; }
org . junit . Assert . assertEquals ( 10 , classUnderTest . getUpdateAction ( ) )
testIsDone_True ( ) { initializeExpectedOperation ( 3 ) ; com . google . cloud . compute . deprecated . Compute [ ] expectedOptions = new Compute . OperationOption [ ] { Compute . OperationOption . fields ( Compute . OperationField . STATUS ) } ; expect ( compute . getOptions ( ) ) . andReturn ( mockOptions ) ; expect ( compute . getOperation ( com . google . cloud . compute . deprecated . OperationTest . GLOBAL_OPERATION_ID , expectedOptions ) ) . andReturn ( globalOperation ) ; replay ( compute ) ; initializeOperation ( ) ; "<AssertPlaceHolder>" ; verify ( compute ) ; } isDone ( ) { while ( ! ( job . isDone ( ) ) ) { java . lang . Thread . sleep ( 1000L ) ; }
org . junit . Assert . assertTrue ( operation . isDone ( ) )
testGetTask ( ) { java . util . List < org . camunda . bpm . engine . task . Task > tasks = taskService . createTaskQuery ( ) . processDefinitionKey ( "oneTaskProcess" ) . list ( ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return deletedCache . isEmpty ( ) ; }
org . junit . Assert . assertFalse ( tasks . isEmpty ( ) )
testWaitForReportReady_polls ( ) { com . google . api . client . util . Sleeper sleeper = mock ( com . google . api . client . util . Sleeper . class ) ; com . google . api . ads . admanager . axis . utils . v201811 . ReportDownloader downloader = new com . google . api . ads . admanager . axis . utils . v201811 . ReportDownloader ( reportService , 1 , sleeper ) ; when ( reportService . getReportJobStatus ( org . mockito . Matchers . anyLong ( ) ) ) . thenReturn ( ReportJobStatus . IN_PROGRESS , ReportJobStatus . COMPLETED ) ; "<AssertPlaceHolder>" ; } waitForReportReady ( ) { com . google . api . ads . admanager . jaxws . v201902 . ReportJobStatus status = reportService . getReportJobStatus ( reportJobId ) ; while ( status == ( com . google . api . ads . admanager . jaxws . v201902 . ReportJobStatus . IN_PROGRESS ) ) { java . lang . Thread . sleep ( com . google . api . ads . admanager . jaxws . utils . v201902 . ReportDownloader . SLEEP_TIMER ) ; status = reportService . getReportJobStatus ( reportJobId ) ; } return status == ( com . google . api . ads . admanager . jaxws . v201902 . ReportJobStatus . COMPLETED ) ; }
org . junit . Assert . assertTrue ( downloader . waitForReportReady ( ) )
testFetchByPrimaryKeysWithNoPrimaryKeys ( ) { java . util . Set < java . io . Serializable > primaryKeys = new java . util . HashSet < java . io . Serializable > ( ) ; java . util . Map < java . io . Serializable , com . liferay . wiki . model . WikiPageResource > wikiPageResources = _persistence . fetchByPrimaryKeys ( primaryKeys ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return _portalCacheListeners . isEmpty ( ) ; }
org . junit . Assert . assertTrue ( wikiPageResources . isEmpty ( ) )
testChangeCacheKeyModifiedIsTrue ( ) { com . ewcms . common . query . cache . CacheResult result = new com . ewcms . common . query . cache . CacheResult ( "testCacheKey" , 100 , new java . util . ArrayList < java . lang . Object > ( ) ) ; com . ewcms . common . query . cache . CacheResult newResult = new com . ewcms . common . query . cache . CacheResult ( "111111" , result ) ; "<AssertPlaceHolder>" ; } isModified ( ) { return true ; }
org . junit . Assert . assertTrue ( newResult . isModified ( ) )
testBuildWithDisabledSecurityConstraintWithOrderBy ( ) { unit . setSecurity ( false ) ; org . lnu . is . domain . degree . type . DegreeType context = new org . lnu . is . domain . degree . type . DegreeType ( ) ; org . lnu . is . pagination . OrderBy orderBy1 = new org . lnu . is . pagination . OrderBy ( "abbrName" , org . lnu . is . pagination . OrderByType . ASC ) ; org . lnu . is . pagination . OrderBy orderBy2 = new org . lnu . is . pagination . OrderBy ( "name" , org . lnu . is . pagination . OrderByType . DESC ) ; java . util . List < org . lnu . is . pagination . OrderBy > orders = java . util . Arrays . asList ( orderBy1 , orderBy2 ) ; java . lang . String expectedQuery = "SELECT<sp>e<sp>FROM<sp>DegreeType<sp>e<sp>WHERE<sp>e.status=:status<sp>ORDER<sp>BY<sp>e.abbrName<sp>ASC,<sp>e.name<sp>DESC" ; org . lnu . is . pagination . MultiplePagedSearch < org . lnu . is . domain . degree . type . DegreeType > pagedSearch = new org . lnu . is . pagination . MultiplePagedSearch ( ) ; pagedSearch . setEntity ( context ) ; pagedSearch . setOrders ( orders ) ; java . lang . String actualQuery = unit . build ( pagedSearch ) ; "<AssertPlaceHolder>" ; } setOrders ( java . util . List ) { this . orders = orders ; }
org . junit . Assert . assertEquals ( expectedQuery , actualQuery )
testBuildWithDisabledDefaultConstraints ( ) { unit . setActive ( false ) ; unit . setSecurity ( false ) ; org . lnu . is . domain . person . name . PersonName context = new org . lnu . is . domain . person . name . PersonName ( ) ; java . lang . String expected = "SELECT<sp>e<sp>FROM<sp>PersonName<sp>e<sp>" ; org . lnu . is . pagination . MultiplePagedSearch < org . lnu . is . domain . person . name . PersonName > pagedSearch = new org . lnu . is . pagination . MultiplePagedSearch ( ) ; pagedSearch . setEntity ( context ) ; java . lang . String actualQuery = unit . build ( pagedSearch ) ; "<AssertPlaceHolder>" ; } setEntity ( T ) { this . entity = entity ; }
org . junit . Assert . assertEquals ( expected , actualQuery )
tesNegativeInfinity ( ) { org . apache . commons . math3 . linear . RealMatrix m = org . apache . commons . math3 . linear . MatrixUtils . createRealMatrix ( new double [ ] [ ] { new double [ ] { Double . NEGATIVE_INFINITY , Double . NEGATIVE_INFINITY , Double . NEGATIVE_INFINITY } } ) ; java . lang . String expected = "{{(-Infinity),(-Infinity),(-Infinity)}}" ; java . lang . String actual = realMatrixFormat . format ( m ) ; "<AssertPlaceHolder>" ; } format ( java . lang . Object [ ] ) { return format . format ( arguments ) ; }
org . junit . Assert . assertEquals ( expected , actual )
testListImagesRequest ( ) { try { com . fit2cloud . aliyun . ecs . model . request . ListImagesRequest r = new com . fit2cloud . aliyun . ecs . model . request . ListImagesRequest ( "cn-qingdao" ) ; r . setPageSize ( 2 ) ; com . fit2cloud . aliyun . ecs . model . response . ListImagesResponse response = client . listImages ( r ) ; System . out . println ( ( "testListImagesRequest<sp>::<sp>" + response ) ) ; "<AssertPlaceHolder>" ; } catch ( java . lang . Exception e ) { e . printStackTrace ( ) ; org . junit . Assert . fail ( e . getMessage ( ) ) ; } } getTotalCount ( ) { return TotalCount ; }
org . junit . Assert . assertTrue ( ( ( response . getTotalCount ( ) ) > 0 ) )
testSerialization ( ) { org . jfree . chart . axis . LogAxis a1 = new org . jfree . chart . axis . LogAxis ( "Test<sp>Axis" ) ; org . jfree . chart . axis . LogAxis a2 = ( ( org . jfree . chart . axis . LogAxis ) ( org . jfree . chart . TestUtils . serialised ( a1 ) ) ) ; "<AssertPlaceHolder>" ; } serialised ( T extends java . io . Serializable ) { T result = null ; java . io . ByteArrayOutputStream buffer = new java . io . ByteArrayOutputStream ( ) ; java . io . ObjectOutput out ; try { out = new java . io . ObjectOutputStream ( buffer ) ; out . writeObject ( original ) ; out . close ( ) ; java . io . ObjectInput in = new java . io . ObjectInputStream ( new java . io . ByteArrayInputStream ( buffer . toByteArray ( ) ) ) ; result = ( ( T ) ( in . readObject ( ) ) ) ; in . close ( ) ; } catch ( java . io . IOException e ) { throw new java . lang . RuntimeException ( e ) ; } catch ( java . lang . ClassNotFoundException e ) { throw new java . lang . RuntimeException ( e ) ; } return result ; }
org . junit . Assert . assertEquals ( a1 , a2 )
testGetDatatypeId ( ) { org . wikidata . wdtk . datamodel . implementation . DatatypeIdValue o1 = new org . wikidata . wdtk . datamodel . implementation . DatatypeIdImpl ( DatatypeIdValue . DT_TIME ) ; org . wikidata . wdtk . datamodel . implementation . DatatypeIdValue o2 = factory . getDatatypeIdValue ( DatatypeIdValue . DT_TIME ) ; "<AssertPlaceHolder>" ; } getDatatypeIdValue ( java . lang . String ) { return new org . wikidata . wdtk . datamodel . implementation . DatatypeIdImpl ( id ) ; }
org . junit . Assert . assertEquals ( o1 , o2 )
testPutThenGetOneFileWithSpecialChars ( ) { java . lang . String testFileName = "testPutThenGetOneFileWithSpecialChars.txt" ; java . lang . String testRetrievedFileName = "testPutThenGetOneFileRetreived,.txt" ; java . lang . String absPath = org . irods . jargon . core . pub . DataTransferOperationsImplTest . scratchFileUtils . createAndReturnAbsoluteScratchPath ( org . irods . jargon . core . pub . DataTransferOperationsImplTest . IRODS_TEST_SUBDIR_PATH ) ; java . lang . String localFileName = org . irods . jargon . testutils . filemanip . FileGenerator . generateFileOfFixedLengthGivenName ( absPath , testFileName , 300 ) ; java . lang . String targetIrodsFile = org . irods . jargon . core . pub . DataTransferOperationsImplTest . testingPropertiesHelper . buildIRODSCollectionAbsolutePathFromTestProperties ( org . irods . jargon . core . pub . DataTransferOperationsImplTest . testingProperties , ( ( ( org . irods . jargon . core . pub . DataTransferOperationsImplTest . IRODS_TEST_SUBDIR_PATH ) + '/' ) + testFileName ) ) ; java . io . File localFile = new java . io . File ( localFileName ) ; org . irods . jargon . core . connection . IRODSAccount irodsAccount = org . irods . jargon . core . pub . DataTransferOperationsImplTest . testingPropertiesHelper . buildIRODSAccountFromTestProperties ( org . irods . jargon . core . pub . DataTransferOperationsImplTest . testingProperties ) ; org . irods . jargon . core . pub . io . IRODSFileFactory irodsFileFactory = org . irods . jargon . core . pub . DataTransferOperationsImplTest . irodsFileSystem . getIRODSFileFactory ( irodsAccount ) ; org . irods . jargon . core . pub . io . IRODSFile destFile = irodsFileFactory . instanceIRODSFile ( targetIrodsFile ) ; org . irods . jargon . core . pub . DataTransferOperations dataTransferOperationsAO = org . irods . jargon . core . pub . DataTransferOperationsImplTest . irodsFileSystem . getIRODSAccessObjectFactory ( ) . getDataTransferOperations ( irodsAccount ) ; dataTransferOperationsAO . putOperation ( localFile , destFile , null , null ) ; java . io . File retrievedLocalFile = new java . io . File ( ( absPath + testRetrievedFileName ) ) ; dataTransferOperationsAO . getOperation ( destFile , retrievedLocalFile , null , null ) ; long origChecksum = org . irods . jargon . core . pub . DataTransferOperationsImplTest . scratchFileUtils . computeFileCheckSumViaAbsolutePath ( localFile . getAbsolutePath ( ) ) ; long retrievedChecksum = org . irods . jargon . core . pub . DataTransferOperationsImplTest . scratchFileUtils . computeFileCheckSumViaAbsolutePath ( localFile . getAbsolutePath ( ) ) ; "<AssertPlaceHolder>" ; } getAbsolutePath ( ) { return absolutePath ; }
org . junit . Assert . assertEquals ( origChecksum , retrievedChecksum )
testGetSingleton_fromMultiThreadedNestedCalls ( ) { org . eclipse . rap . rwt . internal . SingletonManager . install ( uiSession ) ; org . eclipse . rap . rwt . internal . SingletonManager_Test . DependantTestSingleton . currentUISession = uiSession ; org . eclipse . rap . rwt . internal . SingletonManager singletonManager = org . eclipse . rap . rwt . internal . SingletonManager . getInstance ( uiSession ) ; java . lang . Object singleton = singletonManager . getSingleton ( org . eclipse . rap . rwt . internal . SingletonManager_Test . DependantTestSingleton . class ) ; "<AssertPlaceHolder>" ; } getSingleton ( java . lang . Class ) { java . util . concurrent . atomic . AtomicReference < T > singletonHolder = getSingletonHolder ( type ) ; synchronized ( singletonHolder ) { T singleton = singletonHolder . get ( ) ; if ( singleton == null ) { singleton = org . eclipse . rap . rwt . internal . util . ClassUtil . newInstance ( type ) ; singletonHolder . set ( singleton ) ; } return singleton ; } }
org . junit . Assert . assertNotNull ( singleton )
testReturnTypeException ( ) { java . lang . Object expected = new java . lang . Object ( ) ; java . lang . Object result = org . slieb . throwables . UnaryOperatorWithThrowable . castUnaryOperatorWithThrowable ( ( v1 ) -> { throw new java . lang . Exception ( "expect<sp>exception" ) ; } ) . thatReturnsOnCatch ( expected ) . apply ( null ) ; "<AssertPlaceHolder>" ; } apply ( int ) { try { return applyWithThrowable ( v1 ) ; } catch ( java . lang . RuntimeException | java . lang . Error exception ) { throw exception ; } catch ( final java . lang . Throwable throwable ) { throw new org . slieb . throwables . SuppressedException ( throwable ) ; } }
org . junit . Assert . assertEquals ( expected , result )
testDoubleResultType ( ) { org . openscience . cdk . qsar . result . IDescriptorResult type = new org . openscience . cdk . qsar . result . DoubleResultType ( ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertNotNull ( type )
deleteStack_connectionFailed ( ) { createBasicParameters ( "instanceName" , "fosi_v2.json" , "http" ) ; org . oscm . app . openstack . MockHttpURLConnection connection = new org . oscm . app . openstack . MockHttpURLConnection ( 400 , org . oscm . app . openstack . MockURLStreamHandler . respServerActions ( ) ) ; connection . setIOException ( new java . io . IOException ( ) ) ; streamHandler . put ( "/stacks/instanceName" , connection ) ; org . oscm . app . openstack . HeatProcessor hp = givenAnyHeatProcessor_Error ( ) ; try { hp . deleteStack ( paramHandler ) ; org . junit . Assert . fail ( ) ; } catch ( org . oscm . app . openstack . exceptions . HeatException e ) { "<AssertPlaceHolder>" ; } } getResponseCode ( ) { return responseCode ; }
org . junit . Assert . assertEquals ( 400 , e . getResponseCode ( ) )
testSelectAllFilterBaseTable ( ) { org . verdictdb . core . sqlobject . BaseTable base = new org . verdictdb . core . sqlobject . BaseTable ( "myschema" , "mytable" , "t" ) ; org . verdictdb . core . sqlobject . SelectQuery relation = org . verdictdb . core . sqlobject . SelectQuery . create ( java . util . Arrays . < org . verdictdb . core . sqlobject . SelectItem > asList ( new org . verdictdb . core . sqlobject . AsteriskColumn ( ) ) , base ) ; relation . addFilterByAnd ( org . verdictdb . core . sqlobject . ColumnOp . less ( new org . verdictdb . core . sqlobject . BaseColumn ( "t" , "mycolumn" ) , org . verdictdb . core . sqlobject . ColumnOp . rand ( ) ) ) ; java . lang . String expected = "select<sp>*<sp>from<sp>`myschema`.`mytable`<sp>as<sp>t<sp>where<sp>t.`mycolumn`<sp><<sp>rand()" ; org . verdictdb . sqlwriter . SelectQueryToSql relToSql = new org . verdictdb . sqlwriter . SelectQueryToSql ( new org . verdictdb . sqlsyntax . HiveSyntax ( ) ) ; java . lang . String actual = relToSql . toSql ( relation ) ; "<AssertPlaceHolder>" ; } toSql ( org . verdictdb . core . sqlobject . InsertValuesQuery ) { java . lang . StringBuilder sql = new java . lang . StringBuilder ( ) ; java . lang . String schemaName = query . getSchemaName ( ) ; java . lang . String tableName = query . getTableName ( ) ; java . util . List < java . lang . Object > values = query . getValues ( ) ; sql . append ( "insert<sp>into<sp>" ) ; sql . append ( quoteName ( schemaName ) ) ; sql . append ( "." ) ; sql . append ( quoteName ( tableName ) ) ; sql . append ( "<sp>values<sp>(" ) ; boolean isFirst = true ; for ( java . lang . Object v : values ) { if ( isFirst == false ) { sql . append ( ",<sp>" ) ; } if ( v instanceof org . verdictdb . commons . VerdictTimestamp ) { if ( ( syntax ) instanceof org . verdictdb . sqlsyntax . PrestoSyntax ) { sql . append ( ( ( "timestamp<sp>'" + ( v . toString ( ) ) ) + "'" ) ) ; } else { sql . append ( ( ( "'" + ( v . toString ( ) ) ) + "'" ) ) ; } } else if ( v instanceof java . lang . String ) { sql . append ( ( ( "'" + v ) + "'" ) ) ; } else { sql . append ( v . toString ( ) ) ; } isFirst = false ; } sql . append ( ")" ) ; return sql . toString ( ) ; }
org . junit . Assert . assertEquals ( expected , actual )
testFetchAndLockWithoutTenantId ( ) { identityService . setAuthentication ( "aUserId" , null , java . util . Arrays . asList ( org . camunda . bpm . engine . test . api . multitenancy . tenantcheck . MultiTenancyExternalTaskCmdsTenantCheckTest . TENANT_ONE ) ) ; java . util . List < org . camunda . bpm . engine . externaltask . LockedExternalTask > externalTasks = externalTaskService . fetchAndLock ( 1 , org . camunda . bpm . engine . test . api . multitenancy . tenantcheck . MultiTenancyExternalTaskCmdsTenantCheckTest . WORKER_ID ) . topic ( org . camunda . bpm . engine . test . api . multitenancy . tenantcheck . MultiTenancyExternalTaskCmdsTenantCheckTest . TOPIC_NAME , org . camunda . bpm . engine . test . api . multitenancy . tenantcheck . MultiTenancyExternalTaskCmdsTenantCheckTest . LOCK_TIME ) . withoutTenantId ( ) . execute ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return ( ( ( historicProcessInstanceIds . size ( ) ) + ( historicDecisionInstanceIds . size ( ) ) ) + ( historicCaseInstanceIds . size ( ) ) ) + ( historicBatchIds . size ( ) ) ; }
org . junit . Assert . assertEquals ( 0 , externalTasks . size ( ) )
overrideExpectationRecordedInBeforeMethod ( ) { new mockit . Expectations ( ) { { foo . getAnotherValue ( ) ; result = 45 ; } } ; "<AssertPlaceHolder>" ; foo . doSomething ( "sdf" ) ; } getAnotherValue ( ) { return 2 ; }
org . junit . Assert . assertEquals ( 45 , foo . getAnotherValue ( ) )
importAccountDataErrorTest ( ) { int startingCount = jdbcTemplate . queryForInt ( "select<sp>count(*)<sp>from<sp>account" ) ; jobLauncher . run ( job , new org . springframework . batch . core . JobParametersBuilder ( ) . addString ( "inputResource" , accountsErrorResource . getFile ( ) . getAbsolutePath ( ) ) . addLong ( "timestamp" , java . lang . System . currentTimeMillis ( ) ) . toJobParameters ( ) ) ; int accountsAdded = 8 ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( ( startingCount + accountsAdded ) , jdbcTemplate . queryForInt ( "select<sp>count(*)<sp>from<sp>account" ) )
testGetVirtualServer ( ) { org . rackspace . stingray . client . virtualserver . VirtualServer vs = client . getVirtualServer ( vsName ) ; "<AssertPlaceHolder>" ; } getVirtualServer ( java . lang . String ) { return getItem ( name , org . rackspace . stingray . client . virtualserver . VirtualServer . class , ClientConstants . V_SERVER_PATH ) ; }
org . junit . Assert . assertNotNull ( vs )
testEvaluate_MDNMessage_noParentMsgId_assertNullId ( ) { org . nhindirect . monitor . expression . MessageIdCorrelationExpression exp = new org . nhindirect . monitor . expression . MessageIdCorrelationExpression ( ) ; java . util . Map < java . lang . String , org . nhindirect . common . tx . model . TxDetail > details = new java . util . HashMap < java . lang . String , org . nhindirect . common . tx . model . TxDetail > ( ) ; details . put ( TxDetailType . FROM . getType ( ) , new org . nhindirect . common . tx . model . TxDetail ( org . nhindirect . common . tx . model . TxDetailType . FROM , "me@test.com" ) ) ; org . nhindirect . common . tx . model . Tx tx = new org . nhindirect . common . tx . model . Tx ( org . nhindirect . common . tx . model . TxMessageType . MDN , details ) ; org . apache . camel . CamelContext context = mock ( org . apache . camel . CamelContext . class ) ; org . apache . camel . Exchange exchange = new org . apache . camel . impl . DefaultExchange ( context ) ; exchange . getIn ( ) . setBody ( tx ) ; "<AssertPlaceHolder>" ; } setBody ( org . nhindirect . schema . edge . ws . BodyType ) { this . body = value ; }
org . junit . Assert . assertNull ( exp . evaluate ( exchange , java . lang . String . class ) )
testToDBObject_emptyDocumentVisibility ( ) { final com . mongodb . BasicDBObject dbObject = org . apache . rya . mongodb . document . visibility . DocumentVisibilityAdapter . toDBObject ( MongoDbRdfConstants . EMPTY_DV ) ; final com . mongodb . BasicDBObject expected = ( ( com . mongodb . BasicDBObject ) ( com . mongodb . util . JSON . parse ( ( "{" + ( "documentVisibility<sp>:<sp>[]" + "}" ) ) ) ) ) ; "<AssertPlaceHolder>" ; } parse ( java . lang . String ) { checkNotNull ( requestText ) ; int startOfSparql = 0 ; final java . util . Set < org . apache . rya . indexing . pcj . storage . accumulo . VariableOrder > varOrders = new java . util . HashSet ( ) ; final java . util . regex . Matcher matcher = org . apache . rya . indexing . pcj . fluo . client . util . ParsedQueryRequest . varOrdersPattern . matcher ( requestText ) ; while ( matcher . find ( ) ) { final java . lang . String varOrder = matcher . group ( 1 ) ; varOrders . add ( new org . apache . rya . indexing . pcj . storage . accumulo . VariableOrder ( varOrder . split ( ",\\s*" ) ) ) ; startOfSparql = matcher . end ( ) ; } final java . lang . String sparql = requestText . substring ( startOfSparql ) . trim ( ) ; return new org . apache . rya . indexing . pcj . fluo . client . util . ParsedQueryRequest ( sparql , varOrders ) ; }
org . junit . Assert . assertEquals ( expected , dbObject )
testLista ( ) { mx . edu . um . mateo . general . model . Usuario usuario = obtieneUsuario ( ) ; mx . edu . um . mateo . inscripciones . model . Prorroga prorroga = null ; for ( int i = 0 ; i < 20 ; i ++ ) { prorroga = new mx . edu . um . mateo . inscripciones . model . Prorroga ( "1110475" , new java . util . Date ( ) , new java . util . Date ( ) , "test" , new java . lang . Double ( "1203.5" ) , "a" ) ; prorroga . setObservaciones ( "prueba" ) ; prorrogaDao . graba ( prorroga , usuario ) ; "<AssertPlaceHolder>" ; } this . mockMvc . perform ( get ( Constantes . PATH_PRORROGA ) ) . andExpect ( status ( ) . isOk ( ) ) . andExpect ( forwardedUrl ( ( ( "/WEB-INF/jsp/" + ( mx . edu . um . mateo . general . utils . Constantes . PATH_PRORROGA_LISTA ) ) + ".jsp" ) ) ) . andExpect ( model ( ) . attributeExists ( Constantes . CONTAINSKEY_PRORROGAS ) ) . andExpect ( model ( ) . attributeExists ( Constantes . CONTAINSKEY_PAGINACION ) ) . andExpect ( model ( ) . attributeExists ( Constantes . CONTAINSKEY_PAGINAS ) ) . andExpect ( model ( ) . attributeExists ( Constantes . CONTAINSKEY_PAGINA ) ) ; } getId ( ) { return id ; }
org . junit . Assert . assertNotNull ( prorroga . getId ( ) )
getNDR ( ) { final com . rapid7 . client . dcerpc . Header header = unmarshalHeader ( com . rapid7 . client . dcerpc . Test_Header . HEADER_HEX_STRING ) ; "<AssertPlaceHolder>" ; } getNDR ( ) { return ndr ; }
org . junit . Assert . assertArrayEquals ( new byte [ ] { 16 , 0 , 0 , 0 } , header . getNDR ( ) )
shouldRespectWithNullMap ( ) { io . sundr . it . Eager item = new io . sundr . it . EagerBuilder ( ) . withMap ( null ) . build ( ) ; "<AssertPlaceHolder>" ; } getMap ( ) { return this . map ; }
org . junit . Assert . assertNull ( item . getMap ( ) )
checkMetadataLog1OakDirectional ( ) { com . voxelwind . api . game . level . block . BlockState state = generateTestBlockState ( BlockTypes . WOOD , null , com . voxelwind . api . game . item . data . wood . Log . of ( TreeSpecies . OAK , LogDirection . NONE ) ) ; short metadata = com . voxelwind . server . game . serializer . MetadataSerializer . serializeMetadata ( state ) ; "<AssertPlaceHolder>" ; } serializeMetadata ( com . voxelwind . api . game . level . block . BlockState ) { return com . voxelwind . server . game . serializer . MetadataSerializer . INSTANCE . readMetadata ( block ) ; }
org . junit . Assert . assertEquals ( 12 , metadata )
testStrHalf ( ) { java . lang . String str = "rule<sp>R<sp>when\n" + ( ( "<sp>String(this<sp>str[startsWith]<sp>\"M\"<sp>||<sp>str[endsWith]<sp>\"a\"<sp>||<sp>str[length]<sp>10)" + "then\n" ) + "end<sp>" ) ; org . kie . api . runtime . KieSession ksession = getKieSession ( str ) ; ksession . insert ( "Mario" ) ; ksession . insert ( "Luca" ) ; ksession . insert ( "Edoardo" ) ; ksession . insert ( "Valentina" ) ; "<AssertPlaceHolder>" ; } fireAllRules ( ) { return 0 ; }
org . junit . Assert . assertEquals ( 3 , ksession . fireAllRules ( ) )
testRewritePomDependenciesWithNamespace ( ) { java . util . List < org . apache . maven . project . MavenProject > reactorProjects = createReactorProjects ( "pom-with-namespace" ) ; org . apache . maven . shared . release . config . ReleaseDescriptorBuilder builder = createDefaultConfiguration ( reactorProjects , "pom-with-namespace" ) ; phase . execute ( org . apache . maven . shared . release . config . ReleaseUtils . buildReleaseDescriptor ( builder ) , new org . apache . maven . shared . release . env . DefaultReleaseEnvironment ( ) , reactorProjects ) ; "<AssertPlaceHolder>" ; } comparePomFiles ( java . util . List ) { return comparePomFiles ( reactorProjects , true ) ; }
org . junit . Assert . assertTrue ( comparePomFiles ( reactorProjects ) )
test_load_relative_file ( ) { java . net . URL u = com . mycila . maven . plugin . license . util . resource . ResourceFinderTest . finder . findResource ( "src/test/data/compileCP/test.txt" ) ; "<AssertPlaceHolder>" ; } findResource ( java . lang . String ) { java . net . URL res ; try { res = toURL ( new java . io . File ( basedir , resource ) . getCanonicalFile ( ) ) ; } catch ( java . io . IOException e ) { throw new org . apache . maven . plugin . MojoFailureException ( ( ( ( "Resource<sp>" + resource ) + "<sp>not<sp>found<sp>in<sp>file<sp>system,<sp>classpath<sp>or<sp>URL:<sp>" ) + ( e . getMessage ( ) ) ) , e ) ; } if ( res != null ) { return res ; } res = toURL ( new java . io . File ( resource ) ) ; if ( res != null ) { return res ; } java . lang . String cpResource = ( resource . startsWith ( "/" ) ) ? resource . substring ( 1 ) : resource ; res = compileClassPath . getResource ( cpResource ) ; if ( res != null ) { return res ; } res = pluginClassPath . getResource ( cpResource ) ; if ( res != null ) { return res ; } try { res = new java . net . URL ( resource ) ; res . openStream ( ) . close ( ) ; return res ; } catch ( java . lang . Exception e ) { throw new org . apache . maven . plugin . MojoFailureException ( ( ( ( "Resource<sp>" + resource ) + "<sp>not<sp>found<sp>in<sp>file<sp>system,<sp>classpath<sp>or<sp>URL:<sp>" ) + ( e . getMessage ( ) ) ) , e ) ; } }
org . junit . Assert . assertTrue ( u . getPath ( ) . contains ( "src/test/data/compileCP/test.txt" ) )
testPercentiles ( ) { logger . info ( "percentiles" ) ; com . datumbox . framework . common . dataobjects . FlatDataCollection flatDataCollection = generateFlatDataCollection ( ) ; int cutPoints = 4 ; com . datumbox . framework . common . dataobjects . AssociativeArray expResult = new com . datumbox . framework . common . dataobjects . AssociativeArray ( ) ; expResult . put ( 25.0 , ( - 12.5725 ) ) ; expResult . put ( 50.0 , 2.565 ) ; expResult . put ( 75.0 , 26.6925 ) ; com . datumbox . framework . common . dataobjects . AssociativeArray result = com . datumbox . framework . core . statistics . descriptivestatistics . Descriptives . percentiles ( flatDataCollection , cutPoints ) ; for ( java . lang . Object key : result . keySet ( ) ) { double rounded = com . datumbox . framework . core . common . utilities . PHPMethods . round ( result . getDouble ( key ) , 5 ) ; result . put ( key , rounded ) ; } "<AssertPlaceHolder>" ; } put ( java . lang . Object , com . datumbox . framework . common . dataobjects . AssociativeArray ) { return internalData . put ( key , value ) ; }
org . junit . Assert . assertEquals ( expResult , result )
getNextTupleTest5 ( ) { java . util . List < edu . uci . ics . texera . api . tuple . Tuple > data = edu . uci . ics . texera . dataflow . nlp . entity . NlpEntityTestConstants . getTest4Tuple ( ) ; edu . uci . ics . texera . storage . DataWriter twoSentenceDataWriter = edu . uci . ics . texera . storage . RelationManager . getInstance ( ) . getTableDataWriter ( edu . uci . ics . texera . dataflow . nlp . entity . NlpEntityTest . TWO_SENTENCE_TABLE ) ; twoSentenceDataWriter . open ( ) ; for ( edu . uci . ics . texera . api . tuple . Tuple tuple : data ) { twoSentenceDataWriter . insertTuple ( tuple ) ; } twoSentenceDataWriter . close ( ) ; java . lang . String attribute = NlpEntityTestConstants . SENTENCE_TWO ; java . util . List < java . lang . String > attributeNames = new java . util . ArrayList ( ) ; attributeNames . add ( attribute ) ; java . util . List < edu . uci . ics . texera . api . tuple . Tuple > returnedResults = getQueryResults ( edu . uci . ics . texera . dataflow . nlp . entity . NlpEntityTest . TWO_SENTENCE_TABLE , attributeNames , NlpEntityType . NE_ALL ) ; java . util . List < edu . uci . ics . texera . api . tuple . Tuple > expectedResults = edu . uci . ics . texera . dataflow . nlp . entity . NlpEntityTestConstants . getTest5ResultTuples ( ) ; boolean contains = edu . uci . ics . texera . api . utils . TestUtils . equals ( expectedResults , returnedResults ) ; "<AssertPlaceHolder>" ; } equals ( java . util . List , java . util . List ) { expectedResults = Tuple . Builder . removeIfExists ( expectedResults , SchemaConstants . _ID , SchemaConstants . PAYLOAD ) ; exactResults = Tuple . Builder . removeIfExists ( exactResults , SchemaConstants . _ID , SchemaConstants . PAYLOAD ) ; if ( ( expectedResults . size ( ) ) != ( exactResults . size ( ) ) ) return false ; return ( expectedResults . containsAll ( exactResults ) ) && ( exactResults . containsAll ( expectedResults ) ) ; }
org . junit . Assert . assertTrue ( contains )
testAdjustOldLong ( ) { com . j256 . simplemetrics . metric . ControlledMetricRatio metric = new com . j256 . simplemetrics . metric . ControlledMetricRatio ( "component" , "module" , "name" , "desc" , null ) ; long num1 = 2 ; metric . adjustValue ( num1 ) ; long num2 = 2 ; metric . adjustValue ( num2 ) ; "<AssertPlaceHolder>" ; } getValue ( ) { double value ; double adjustedDenominator = ( denominator ) * ( count ) ; if ( adjustedDenominator == 0 ) { value = 0 ; } else { value = ( numerator ) / adjustedDenominator ; } return java . lang . Double . valueOf ( value ) ; }
org . junit . Assert . assertEquals ( ( ( ( double ) ( num1 + num2 ) ) / ( ( double ) ( 2 ) ) ) , ( ( java . lang . Double ) ( metric . getValue ( ) ) ) , 0 )
testBuildWithNullContext ( ) { java . util . List < java . lang . Long > context = null ; java . lang . String expectedQuery = "SELECT<sp>e<sp>FROM<sp>UserGroupView<sp>e<sp>WHERE<sp>e.status=:status<sp>AND<sp>e.crtUserGroup<sp>IN<sp>(:userGroups)<sp>" ; org . lnu . is . pagination . MultiplePagedSearch < java . util . List < java . lang . Long > > pagedSearch = new org . lnu . is . pagination . MultiplePagedSearch ( ) ; pagedSearch . setEntity ( context ) ; java . lang . String actualQuery = unit . build ( pagedSearch ) ; "<AssertPlaceHolder>" ; } setEntity ( T ) { this . entity = entity ; }
org . junit . Assert . assertEquals ( expectedQuery , actualQuery )
shouldRemoveExistingSoftlinkRelation ( ) { java . lang . String existingSoftLinkRef = "existingSoftLinkRef" ; ch . puzzle . itc . mobiliar . business . softlinkRelation . entity . SoftlinkRelationEntity existingSoftlinkRel = new ch . puzzle . itc . mobiliar . builders . SoftlinkRelationEntityBuilder ( ) . withSoftlinkRef ( existingSoftLinkRef ) . withId ( 111 ) . withOwner ( ForeignableOwner . MAIA ) . build ( ) ; ch . puzzle . itc . mobiliar . business . resourcegroup . entity . ResourceEntity cpi = new ch . puzzle . itc . mobiliar . builders . ResourceEntityBuilder ( ) . withId ( 1 ) . withName ( "cpiResource" ) . withSoftlinkRelation ( existingSoftlinkRel ) . withOwner ( ForeignableOwner . MAIA ) . mock ( ) ; ch . puzzle . itc . mobiliar . business . softlinkRelation . entity . SoftlinkRelationEntity result = serviceImportHandler . createOrUpdateSoftlinkRelation ( cpi , null ) ; verify ( softlinkRelationService , times ( 1 ) ) . removeSoftlinkRelation ( cpi ) ; "<AssertPlaceHolder>" ; } removeSoftlinkRelation ( ch . puzzle . itc . mobiliar . business . resourcegroup . entity . ResourceEntity ) { auditService . setResourceIdInThreadLocal ( cpiResource . getId ( ) ) ; java . util . List < ch . puzzle . itc . mobiliar . business . softlinkRelation . entity . SoftlinkRelationEntity > existing = getSoftlinksForCpi ( cpiResource ) ; cpiResource . clearSoftlinkRelations ( ) ; for ( ch . puzzle . itc . mobiliar . business . softlinkRelation . entity . SoftlinkRelationEntity sl : existing ) { entityManager . remove ( sl ) ; } }
org . junit . Assert . assertNull ( result )
testGetKongParsedInfo ( ) { com . t1t . apim . rest . KongInfo parsedInfo = com . t1t . apim . rest . KongClientIntegrationTest . kongClient . getParsedInfo ( ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertNotNull ( parsedInfo )
testDynamicQueryByProjectionMissing ( ) { com . liferay . portal . kernel . dao . orm . DynamicQuery dynamicQuery = com . liferay . portal . kernel . dao . orm . DynamicQueryFactoryUtil . forClass ( com . liferay . journal . model . JournalArticle . class , _dynamicQueryClassLoader ) ; dynamicQuery . setProjection ( com . liferay . portal . kernel . dao . orm . ProjectionFactoryUtil . property ( "id" ) ) ; dynamicQuery . add ( com . liferay . portal . kernel . dao . orm . RestrictionsFactoryUtil . in ( "id" , 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 ( ) )
testOkVerhuizendNaarRni ( ) { final nl . bzk . migratiebrp . bericht . model . sync . impl . BlokkeringInfoAntwoordBericht blokkeringInfoAntwoord = new nl . bzk . migratiebrp . bericht . model . sync . impl . BlokkeringInfoAntwoordBericht ( ) ; blokkeringInfoAntwoord . setStatus ( StatusType . OK ) ; blokkeringInfoAntwoord . setPersoonsaanduiding ( PersoonsaanduidingType . VERHUIZEND_VAN_BRP_NAAR_LO_3_RNI ) ; final java . util . Map < java . lang . String , java . lang . Object > parameters = new java . util . HashMap ( ) ; parameters . put ( "blokkeringInfoAntwoordBericht" , berichtenDao . bewaarBericht ( blokkeringInfoAntwoord ) ) ; final java . util . Map < java . lang . String , java . lang . Object > result = subject . execute ( parameters ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return elementen . isEmpty ( ) ; }
org . junit . Assert . assertTrue ( result . isEmpty ( ) )
testMeterNoMatch ( ) { com . codahale . metrics . Meter m = com . streamsets . datacollector . metrics . MetricsConfigurator . createMeter ( com . streamsets . datacollector . execution . alerts . TestMetricRuleEvaluator . metrics , "testMeterNoMatch" , com . streamsets . datacollector . execution . alerts . TestMetricRuleEvaluator . PIPELINE_NAME , com . streamsets . datacollector . execution . alerts . TestMetricRuleEvaluator . REVISION ) ; m . mark ( 1000 ) ; com . streamsets . datacollector . config . MetricsRuleDefinition metricsRuleDefinition = new com . streamsets . datacollector . config . MetricsRuleDefinition ( "testMeterNoMatch" , "testMeterNoMatch" , "testMeterNoMatch" , com . streamsets . datacollector . config . MetricType . METER , com . streamsets . datacollector . config . MetricElement . METER_COUNT , "${value()>1001}" , false , true , java . lang . System . currentTimeMillis ( ) ) ; com . streamsets . datacollector . execution . alerts . MetricRuleEvaluator metricRuleEvaluator = new com . streamsets . datacollector . execution . alerts . MetricRuleEvaluator ( metricsRuleDefinition , com . streamsets . datacollector . execution . alerts . TestMetricRuleEvaluator . metrics , new com . streamsets . datacollector . execution . alerts . AlertManager ( com . streamsets . datacollector . execution . alerts . TestMetricRuleEvaluator . PIPELINE_NAME , com . streamsets . datacollector . execution . alerts . TestMetricRuleEvaluator . PIPELINE_TITLE , com . streamsets . datacollector . execution . alerts . TestMetricRuleEvaluator . REVISION , null , com . streamsets . datacollector . execution . alerts . TestMetricRuleEvaluator . metrics , com . streamsets . datacollector . execution . alerts . TestMetricRuleEvaluator . runtimeInfo , new com . streamsets . datacollector . execution . EventListenerManager ( ) ) , new com . streamsets . datacollector . creation . RuleDefinitionsConfigBean ( ) , 0 ) ; metricRuleEvaluator . checkForAlerts ( ) ; com . codahale . metrics . Gauge < java . lang . Object > gauge = com . streamsets . datacollector . metrics . MetricsConfigurator . getGauge ( com . streamsets . datacollector . execution . alerts . TestMetricRuleEvaluator . metrics , com . streamsets . datacollector . alerts . AlertsUtil . getAlertGaugeName ( metricsRuleDefinition . getId ( ) ) ) ; "<AssertPlaceHolder>" ; } getId ( ) { return "*" ; }
org . junit . Assert . assertNull ( gauge )
getNumberOfSUserWhoCanStartPendingTask_should_return_users_mapped_through_his_userid_in_actormember ( ) { final org . bonitasoft . engine . actor . mapping . model . SActor actor = repository . add ( anActor ( ) . build ( ) ) ; final org . bonitasoft . engine . core . process . instance . model . SPendingActivityMapping addedPendingMapping = repository . add ( aPendingActivityMapping ( ) . withActorId ( actor . getId ( ) ) . build ( ) ) ; final org . bonitasoft . engine . identity . model . SUser expectedUser = repository . add ( aUser ( ) . withId ( 1L ) . build ( ) ) ; repository . add ( anActorMember ( ) . forActor ( actor ) . withUserId ( expectedUser . getId ( ) ) . build ( ) ) ; repository . add ( aUser ( ) . withId ( 2L ) . build ( ) ) ; final long numberOfUsers = repository . getNumberOfSUserWhoCanStartPendingTask ( addedPendingMapping . getActivityId ( ) ) ; "<AssertPlaceHolder>" . isEqualTo ( 1 ) ; } getActivityId ( ) { return activityId ; }
org . junit . Assert . assertThat ( numberOfUsers )
defaultFieldOnSyntheticIsNoOp ( ) { nl . jqno . equalsverifier . internal . reflection . Outer outer = new nl . jqno . equalsverifier . internal . reflection . Outer ( ) ; nl . jqno . equalsverifier . testhelpers . types . TypeHelper . Outer . Inner inner = outer . new nl . jqno . equalsverifier . testhelpers . types . TypeHelper . Outer . Inner ( ) ; java . lang . String fieldName = getSyntheticFieldName ( inner , "this$" ) ; doNullField ( inner , fieldName ) ; "<AssertPlaceHolder>" ; } getOuter ( ) { return this ; }
org . junit . Assert . assertSame ( outer , inner . getOuter ( ) )
load_bound_fieldValueIsUpdated ( ) { binder . bind ( nameField , Person :: getFirstName , Person :: setFirstName ) ; com . vaadin . tests . data . bean . Person person = new com . vaadin . tests . data . bean . Person ( ) ; java . lang . String name = "bar" ; person . setFirstName ( name ) ; binder . readBean ( person ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return select . getFirstSelectedOption ( ) . getText ( ) ; }
org . junit . Assert . assertEquals ( name , nameField . getValue ( ) )
retrieveSecondTimeOperationReturnsSame ( ) { org . talend . esb . job . controller . GenericOperation operation1 = jobLauncher . retrieveOperation ( org . talend . esb . job . controller . internal . JobLauncherRetrieveOperationTest . JOB_NAME_1 , org . talend . esb . job . controller . internal . JobLauncherRetrieveOperationTest . EMPTY_STRING_ARR ) ; org . talend . esb . job . controller . GenericOperation operation2 = jobLauncher . retrieveOperation ( org . talend . esb . job . controller . internal . JobLauncherRetrieveOperationTest . JOB_NAME_1 , org . talend . esb . job . controller . internal . JobLauncherRetrieveOperationTest . EMPTY_STRING_ARR ) ; "<AssertPlaceHolder>" ; } retrieveOperation ( java . lang . String , java . lang . String [ ] ) { org . talend . esb . job . controller . GenericOperation task = operations . get ( jobName ) ; if ( task == null ) { throw new java . lang . IllegalArgumentException ( ( ( "Talend<sp>ESB<sp>job<sp>with<sp>name<sp>" + jobName ) + "'<sp>not<sp>found" ) ) ; } task . start ( args ) ; return task ; }
org . junit . Assert . assertSame ( operation1 , operation2 )
count_lines_text_java ( ) { java . io . LineNumberReader lineReader = new java . io . LineNumberReader ( new java . io . FileReader ( java . nio . file . Paths . get ( fileLocation ) . toFile ( ) ) ) ; lineReader . skip ( Long . MAX_VALUE ) ; long totalNumberOfLines = ( lineReader . getLineNumber ( ) ) + 1 ; lineReader . close ( ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( 10 , totalNumberOfLines )
testConect ( ) { org . biojava . nbio . structure . io . PDBFileParser pdbPars = new org . biojava . nbio . structure . io . PDBFileParser ( ) ; org . biojava . nbio . structure . io . FileParsingParameters params = pdbPars . getFileParsingParameters ( ) ; params . setCreateAtomBonds ( true ) ; java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; sb . append ( "HETATM<sp>2398<sp>P<sp>FAD<sp>A<sp>500<sp>8.398<sp>46.448<sp>73.490<sp>1.00<sp>13.51<sp>P<sp>\n" ) ; sb . append ( "HETATM<sp>2399<sp>PA<sp>FAD<sp>A<sp>500<sp>6.089<sp>45.580<sp>75.235<sp>1.00<sp>15.88<sp>P<sp>\n" ) ; sb . append ( "HETATM<sp>2400<sp>O1P<sp>FAD<sp>A<sp>500<sp>7.908<sp>47.684<sp>72.869<sp>1.00<sp>4.19<sp>O<sp>\n" ) ; sb . append ( "CONECT<sp>2400<sp>2398\n" ) ; java . lang . String shortLine = sb . toString ( ) ; org . biojava . nbio . structure . Structure s ; try ( java . io . InputStream is = new java . io . ByteArrayInputStream ( shortLine . getBytes ( ) ) ) { s = pdbPars . parsePDBFile ( is ) ; } "<AssertPlaceHolder>" ; } parsePDBFile ( java . io . BufferedReader ) { loadMaxAtoms = params . getMaxAtoms ( ) ; atomCAThreshold = params . getAtomCaThreshold ( ) ; allModels = new java . util . ArrayList ( ) ; structure = new org . biojava . nbio . structure . StructureImpl ( ) ; currentModel = null ; currentChain = null ; currentGroup = null ; startOfMolecule = true ; startOfModel = true ; seqResChains = new java . util . ArrayList < org . biojava . nbio . structure . Chain > ( ) ; siteMap = new java . util . LinkedHashMap < java . lang . String , org . biojava . nbio . structure . Site > ( ) ; pdbHeader = new org . biojava . nbio . structure . PDBHeader ( ) ; connects = new java . util . ArrayList < java . util . Map < java . lang . String , java . lang . Integer > > ( ) ; previousContinuationField = "END" 1 ; continuationField = "END" 1 ; continuationString = "END" 1 ; current_compound = null ; sourceLines . clear ( ) ; compndLines . clear ( ) ; isLastCompndLine = false ; isLastSourceLine = false ; prevMolId = - 1 ; entities . clear ( ) ; helixList . clear ( ) ; strandList . clear ( ) ; turnList . clear ( ) ; lengthCheck = - 1 ; atomCount = 0 ; atomOverflow = false ; linkRecords = new java . util . ArrayList < org . biojava . nbio . structure . io . util . PDBTemporaryStorageUtils . LinkRecord > ( ) ; siteToResidueMap . clear ( ) ; blankChainIdsPresent = false ; parseCAonly = params . isParseCAOnly ( ) ; java . lang . String line = null ; while ( ( line = buf . readLine ( ) ) != null ) { if ( ( line . equals ( "END" 1 ) ) || ( line . equals ( org . biojava . nbio . structure . io . PDBFileParser . NEWLINE ) ) ) { continue ; } if ( line . startsWith ( "END" ) ) { continue ; } if ( ( ( line . length ( ) ) < 6 ) && ( ! ( line . startsWith ( "END" 8 ) ) ) ) { org . biojava . nbio . structure . io . PDBFileParser . logger . info ( ( ( "Found<sp>line<sp>length<sp>below<sp>6.<sp>Ignoring<sp>it,<sp>line:<sp>>" + line ) + "<" ) ) ; continue ; } java . lang . String recordName = null ; if ( ( line . length ( ) ) < 6 ) recordName = line . trim ( ) ; else recordName = line . substring ( 0 , 6 ) . trim ( ) ; try { if ( recordName . equals ( "END" 9 ) ) pdb_ATOM_Handler ( line ) ; else if ( recordName . equals ( "END" 3 ) ) pdb_SEQRES_Handler ( line ) ; else if ( recordName . equals ( "TITLE" 0 ) ) pdb_ATOM_Handler ( line ) ; else if ( recordName . equals ( "MODEL" ) ) pdb_MODEL_Handler ( line ) ; else if ( recordName . equals ( "END" 8 ) ) pdb_TER_Handler ( ) ; else if ( recordName . equals ( "TITLE" 6 ) ) pdb_HEADER_Handler ( line ) ; else if ( recordName . equals ( "AUTHOR" ) ) pdb_AUTHOR_Handler ( line ) ; else if ( recordName . equals ( "TITLE" ) ) pdb_TITLE_Handler ( line ) ; else if ( recordName . equals ( "SOURCE" ) ) sourceLines . add ( line ) ; else if ( recordName . equals ( "TITLE" 9 ) ) compndLines . add ( line ) ; else if ( recordName . equals ( "END" 4 ) ) pdb_JRNL_Handler ( line ) ; else if ( recordName . equals ( "EXPDTA" ) ) pdb_EXPDTA_Handler ( line ) ; else if ( recordName . equals ( "TITLE" 2 ) ) pdb_CRYST1_Handler ( line ) ; else if ( recordName . startsWith ( "TITLE" 8 ) ) pdb_MTRIXn_Handler ( line ) ; else if ( recordName . equals ( "TITLE" 7 ) ) pdb_REMARK_Handler ( line ) ; else if ( recordName . equals ( "CONECT" ) ) pdb_CONECT_Handler ( line ) ; else if ( recordName . equals ( "REVDAT" ) ) pdb_REVDAT_Handler ( line ) ; else if ( recordName . equals ( "TITLE" 4 ) ) pdb_DBREF_Handler ( line ) ; else if ( recordName . equals ( "TITLE" 5 ) ) pdb_SITE_Handler ( line ) ; else if ( recordName . equals ( "TITLE" 1 ) ) pdb_SSBOND_Handler ( line ) ; else if ( recordName . equals ( "END" 7 ) ) pdb_LINK_Handler ( line ) ; else if ( params . isParseSecStruc ( ) ) { if ( recordName . equals ( "END" 0 ) ) pdb_HELIX_Handler ( line ) ; else if ( recordName . equals ( "END"
org . junit . Assert . assertNotNull ( s )
whenGetClassHierarchyIsCalledWithMemberClass_returnedStackContainsMemberAndEnclosingClass ( ) { java . util . Stack < java . lang . Class < ? > > expectedStack = stackForClasses ( Class1stLevel . Class2ndLevel . class , de . bechte . junit . stubs . Class1stLevel . class ) ; java . util . Stack < java . lang . Class < ? > > classHierarchy = de . bechte . junit . runners . util . ReflectionUtil . getClassHierarchy ( Class1stLevel . Class2ndLevel . class ) ; "<AssertPlaceHolder>" ; } getClassHierarchy ( java . lang . Class ) { final java . util . Stack < java . lang . Class < ? > > classHierarchy = new java . util . Stack < java . lang . Class < ? > > ( ) ; java . lang . Class < ? > c = clazz ; while ( c != null ) { classHierarchy . push ( c ) ; c = ( java . lang . reflect . Modifier . isStatic ( c . getModifiers ( ) ) ) ? null : c . getEnclosingClass ( ) ; } return classHierarchy ; }
org . junit . Assert . assertThat ( classHierarchy , is ( equalTo ( expectedStack ) ) )
testPopulateFailure ( ) { org . apache . storm . metricstore . Metric m = new org . apache . storm . metricstore . Metric ( "cpu" , 3000L , "myTopologyId456" , 1.0 , "componentId2" , "executorId2" , "hostname2" , "streamid2" , 7778 , org . apache . storm . metricstore . AggLevel . AGG_LEVEL_NONE ) ; org . apache . storm . metricstore . rocksdb . RocksDbStoreTest . store . insert ( m ) ; waitForInsertFinish ( m ) ; org . apache . storm . metricstore . Metric toFind = new org . apache . storm . metricstore . Metric ( m ) ; toFind . setTopologyId ( "somethingBogus" ) ; boolean res = org . apache . storm . metricstore . rocksdb . RocksDbStoreTest . store . populateValue ( toFind ) ; "<AssertPlaceHolder>" ; } populateValue ( org . apache . storm . metricstore . Metric ) { java . util . Map < java . lang . String , java . lang . Integer > localLookupCache = new java . util . HashMap ( 6 ) ; int topologyId = lookupMetadataString ( KeyType . TOPOLOGY_STRING , metric . getTopologyId ( ) , localLookupCache ) ; if ( ( org . apache . storm . metricstore . rocksdb . RocksDbStore . INVALID_METADATA_STRING_ID ) == topologyId ) { return false ; } int metricId = lookupMetadataString ( KeyType . METRIC_STRING , metric . getMetricName ( ) , localLookupCache ) ; if ( ( org . apache . storm . metricstore . rocksdb . RocksDbStore . INVALID_METADATA_STRING_ID ) == metricId ) { return false ; } int componentId = lookupMetadataString ( KeyType . COMPONENT_STRING , metric . getComponentId ( ) , localLookupCache ) ; if ( ( org . apache . storm . metricstore . rocksdb . RocksDbStore . INVALID_METADATA_STRING_ID ) == componentId ) { return false ; } int executorId = lookupMetadataString ( KeyType . EXEC_ID_STRING , metric . getExecutorId ( ) , localLookupCache ) ; if ( ( org . apache . storm . metricstore . rocksdb . RocksDbStore . INVALID_METADATA_STRING_ID ) == executorId ) { return false ; } int hostId = lookupMetadataString ( KeyType . HOST_STRING , metric . getHostname ( ) , localLookupCache ) ; if ( ( org . apache . storm . metricstore . rocksdb . RocksDbStore . INVALID_METADATA_STRING_ID ) == hostId ) { return false ; } int streamId = lookupMetadataString ( KeyType . STREAM_ID_STRING , metric . getStreamId ( ) , localLookupCache ) ; if ( ( org . apache . storm . metricstore . rocksdb . RocksDbStore . INVALID_METADATA_STRING_ID ) == streamId ) { return false ; } org . apache . storm . metricstore . rocksdb . RocksDbKey key = org . apache . storm . metricstore . rocksdb . RocksDbKey . createMetricKey ( metric . getAggLevel ( ) , topologyId , metric . getTimestamp ( ) , metricId , componentId , executorId , hostId , metric . getPort ( ) , streamId ) ; return populateFromKey ( key , metric ) ; }
org . junit . Assert . assertEquals ( false , res )
testGetSnapshot_Null ( ) { org . easymock . EasyMock . expect ( computeRpcMock . getSnapshot ( com . google . cloud . compute . deprecated . ComputeImplTest . SNAPSHOT_ID . getSnapshot ( ) , com . google . cloud . compute . deprecated . ComputeImplTest . EMPTY_RPC_OPTIONS ) ) . andReturn ( null ) ; org . easymock . EasyMock . replay ( computeRpcMock ) ; compute = options . getService ( ) ; "<AssertPlaceHolder>" ; } getSnapshot ( com . google . cloud . compute . v1 . ProjectGlobalSnapshotName ) { com . google . cloud . compute . v1 . GetSnapshotHttpRequest request = com . google . cloud . compute . v1 . GetSnapshotHttpRequest . newBuilder ( ) . setSnapshot ( ( snapshot == null ? null : snapshot . toString ( ) ) ) . build ( ) ; return getSnapshot ( request ) ; }
org . junit . Assert . assertNull ( compute . getSnapshot ( com . google . cloud . compute . deprecated . ComputeImplTest . SNAPSHOT_ID . getSnapshot ( ) ) )
testSave ( ) { nl . bzk . brp . model . objecttype . operationeel . BerichtModel bericht = new nl . bzk . brp . model . objecttype . operationeel . BerichtModel ( nl . bzk . brp . model . objecttype . operationeel . statisch . Richting . INGAAND , new nl . bzk . brp . model . attribuuttype . Berichtdata ( "test" ) ) ; repository . save ( bericht ) ; "<AssertPlaceHolder>" ; } getId ( ) { return this . id ; }
org . junit . Assert . assertNotNull ( bericht . getId ( ) )
testSetKeyType ( ) { org . pentaho . hbase . shim . api . Mapping mapping = getMapping ( ) ; mapping . setKeyType ( Mapping . KeyType . STRING ) ; "<AssertPlaceHolder>" ; } setKeyType ( org . pentaho . hbase . shim . api . Mapping$KeyType ) { m_keyType = type ; }
org . junit . Assert . assertEquals ( Mapping . KeyType . STRING , mapping . m_keyType )
bgpOpenMessageTest2 ( ) { peer1 . peerChannelHandler . asNumber = 500 ; peer1 . peerChannelHandler . version = 4 ; peer1 . peerChannelHandler . holdTime = 120 ; peer1 . connect ( connectToSocket ) ; boolean result ; result = peer1 . peerFrameDecoder . receivedNotificationMessageLatch . await ( org . onosproject . bgp . BgpControllerImplTest . MESSAGE_TIMEOUT_MS , TimeUnit . MILLISECONDS ) ; "<AssertPlaceHolder>" ; } is ( java . lang . Class ) { return true ; }
org . junit . Assert . assertThat ( result , org . hamcrest . core . Is . is ( true ) )
testNoConfigAndNothingPublished ( ) { subject = new org . eclipse . tycho . plugins . p2 . director . ProductConfig ( null , projectSeeds ) ; "<AssertPlaceHolder>" ; } getProducts ( ) { return products ; }
org . junit . Assert . assertEquals ( java . util . Collections . emptyList ( ) , subject . getProducts ( ) )
testGetStaticLabel ( ) { System . out . println ( "getStaticLabel" ) ; java . lang . String result = instance . getStaticLabel ( ) ; "<AssertPlaceHolder>" ; } getStaticLabel ( ) { return kg . apc . jmeter . JMeterPluginsUtils . prefixLabel ( "Response<sp>Codes<sp>per<sp>Second" ) ; }
org . junit . Assert . assertTrue ( ( ( result . length ( ) ) > 0 ) )
testTrue ( ) { "<AssertPlaceHolder>" ; } toTrueFalseString ( boolean ) { return org . dcache . util . Booleans . toPredefinedString ( value , "true" , "false" ) ; }
org . junit . Assert . assertEquals ( "true" , org . dcache . util . Booleans . toTrueFalseString ( true ) )
testGetColumnClass ( ) { "<AssertPlaceHolder>" ; } getColumnClass ( int ) { return java . lang . Object . class ; }
org . junit . Assert . assertEquals ( java . lang . Object . class , model . getColumnClass ( 0 ) )
tesBerichtSyntaxException ( ) { final java . lang . String berichtOrigineel = org . apache . commons . io . IOUtils . toString ( nl . moderniseringgba . isc . esb . message . brp . impl . NotificatieVerzoekBerichtTest . class . getResourceAsStream ( "notificatieVerzoekBerichtSyntaxExceptionBericht.xml" ) ) ; final nl . moderniseringgba . isc . esb . message . brp . BrpBericht brpBericht = factory . getBericht ( berichtOrigineel ) ; "<AssertPlaceHolder>" ; } getBericht ( java . lang . String ) { try { final javax . xml . bind . JAXBElement < ? > element = NotificatieXml . SINGLETON . stringToElement ( berichtAlsString ) ; return maakBericht ( element . getValue ( ) ) ; } catch ( final javax . xml . bind . JAXBException e ) { nl . bzk . migratiebrp . bericht . model . notificatie . factory . NotificatieBerichtFactory . LOG . warn ( "Verwerken<sp>bericht<sp>mislukt" , e ) ; return new nl . bzk . migratiebrp . bericht . model . notificatie . impl . OngeldigBericht ( berichtAlsString , e . getMessage ( ) ) ; } }
org . junit . Assert . assertTrue ( ( brpBericht instanceof nl . moderniseringgba . isc . esb . message . brp . impl . OngeldigBericht ) )
testScmPortForPerforceShowConfidentialInformation ( ) { com . sap . prd . mobile . ios . mios . versioninfo . v_1_2_2 . SCM scm = new com . sap . prd . mobile . ios . mios . versioninfo . v_1_2_2 . SCM ( ) ; scm . setConnection ( "scm:perforce:p4.example.com:1666://MyProject" ) ; com . sap . prd . mobile . ios . mios . versioninfo . v_1_2_2 . Dependency dependency = new com . sap . prd . mobile . ios . mios . versioninfo . v_1_2_2 . Dependency ( ) ; dependency . setScm ( scm ) ; java . lang . String port = com . sap . prd . mobile . ios . mios . VersionInfoPListManager . getScmPort ( dependency , false ) ; "<AssertPlaceHolder>" ; } getScmPort ( com . sap . prd . mobile . ios . mios . versioninfo . v_1_2_2 . Dependency , boolean ) { if ( ! hideConfidentialInformation ) { return dep . getScm ( ) . getConnection ( ) ; } else { java . lang . String [ ] parts = dep . getScm ( ) . getConnection ( ) . split ( ":" ) ; java . lang . String port ; if ( ( parts . length ) == 1 ) { port = parts [ 0 ] ; } else { int index ; if ( ! ( parts [ 0 ] . equals ( "scm" ) ) ) throw new java . lang . IllegalStateException ( java . lang . String . format ( "Invalid<sp>connection<sp>string:<sp>'%s'." , dep . getScm ( ) . getConnection ( ) ) ) ; if ( parts [ 3 ] . startsWith ( "//github" ) ) { return "" ; } else if ( parts [ 1 ] . equals ( "perforce" ) ) { index = 3 ; } else if ( parts [ 1 ] . equals ( "git" ) ) { index = 4 ; } else { throw new java . lang . IllegalStateException ( java . lang . String . format ( "Invalid<sp>scm<sp>type<sp>(%s)<sp>found<sp>in<sp>connection<sp>string<sp>(%s)." , parts [ 1 ] , dep . getScm ( ) . getConnection ( ) ) ) ; } port = parts [ index ] ; if ( ( parts . length ) > ( index + 1 ) ) { port += parts [ ( index + 1 ) ] ; } } return port ; } }
org . junit . Assert . assertEquals ( "scm:perforce:p4.example.com:1666://MyProject" , port )
testVerifyMax ( ) { int min = 0 ; int max = 100 ; kg . apc . jmeter . gui . IntegerInputVerifier verifier = new kg . apc . jmeter . gui . IntegerInputVerifier ( min , max , kg . apc . jmeter . gui . IntegerInputVerifierTest . background , kg . apc . jmeter . gui . IntegerInputVerifierTest . warningBackground ) ; javax . swing . JTextField input = new javax . swing . JTextField ( java . lang . Integer . toString ( max ) ) ; "<AssertPlaceHolder>" ; } verify ( javax . swing . JComponent ) { javax . swing . JTextField tf = ( ( javax . swing . JTextField ) ( input ) ) ; try { int inputInt = java . lang . Integer . parseInt ( tf . getText ( ) ) ; return ( inputInt >= ( min ) ) && ( inputInt <= ( max ) ) ; } catch ( java . lang . NumberFormatException e ) { return false ; } }
org . junit . Assert . assertTrue ( verifier . verify ( input ) )