input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
testReadable ( ) { java . util . ArrayList < java . io . File > files = new java . util . ArrayList < java . io . File > ( 4 ) ; files . add ( new java . io . File ( outputDir , "org/hibernate/tool/hbm2x/hbm2hbmxml/ListArrayTest/Fee.hbm.xml" ) ) ; files . add ( new java . io . File ( outputDir , "org/hibernate/tool/hbm2x/hbm2hbmxml/ListArrayTest/Glarch.hbm.xml" ) ) ; java . util . Properties properties = new java . util . Properties ( ) ; properties . setProperty ( AvailableSettings . DIALECT , HibernateUtil . Dialect . class . getName ( ) ) ; org . hibernate . tool . api . metadata . MetadataDescriptor metadataDescriptor = org . hibernate . tool . api . metadata . MetadataDescriptorFactory . createNativeDescriptor ( null , files . toArray ( new java . io . File [ 2 ] ) , properties ) ; "<AssertPlaceHolder>" ; } createMetadata ( ) { return metadata ; } | org . junit . Assert . assertNotNull ( metadataDescriptor . createMetadata ( ) ) |
testOneIteratorExp01 ( ) { testpackage . Class1 class1 ; class1 = new testpackage . Class1 ( ) ; "<AssertPlaceHolder>" ; } testOneIteratorExp01 ( ) { testpackage . Class1 class1 ; class1 = new testpackage . Class1 ( ) ; org . junit . Assert . assertTrue ( class1 . testOneIteratorExp01 ( ) ) ; } | org . junit . Assert . assertTrue ( class1 . testOneIteratorExp01 ( ) ) |
testCloseBeforeAuthSucceed ( ) { org . apache . sshd . SshClient client = org . apache . sshd . SshClient . setUpDefaultClient ( ) ; client . start ( ) ; org . apache . sshd . ClientSession session = client . connect ( "localhost" , port ) . await ( ) . getSession ( ) ; org . apache . sshd . client . future . AuthFuture authFuture = session . authPassword ( "smx" , "smx" ) ; org . apache . sshd . common . future . CloseFuture closeFuture = session . close ( false ) ; authFuture . await ( ) ; closeFuture . await ( ) ; "<AssertPlaceHolder>" ; } getException ( ) { java . lang . Object v = getValue ( ) ; if ( v instanceof java . lang . Throwable ) { return ( ( java . lang . Throwable ) ( v ) ) ; } else { return null ; } } | org . junit . Assert . assertNotNull ( authFuture . getException ( ) ) |
ExtractSubjectFromMessageWhenControlActProcessNull ( ) { gov . hhs . fha . nhinc . transform . subdisc . HL7Extractors extractor = new gov . hhs . fha . nhinc . transform . subdisc . HL7Extractors ( ) ; org . hl7 . v3 . PRPAIN201301UV02 message = new org . hl7 . v3 . PRPAIN201301UV02 ( ) ; org . hl7 . v3 . PRPAIN201301UV02MFMIMT700701UV01Subject1 subject1 = extractor . ExtractSubjectFromMessage ( message ) ; "<AssertPlaceHolder>" ; } ExtractSubjectFromMessage ( org . hl7 . v3 . PRPAIN201310UV02 ) { if ( message == null ) { gov . hhs . fha . nhinc . transform . subdisc . HL7Extractors . LOG . info ( "message<sp>is<sp>null<sp>-<sp>no<sp>patient" ) ; return null ; } org . hl7 . v3 . PRPAIN201310UV02MFMIMT700711UV01ControlActProcess controlActProcess = message . getControlActProcess ( ) ; if ( controlActProcess == null ) { gov . hhs . fha . nhinc . transform . subdisc . HL7Extractors . LOG . info ( "controlActProcess<sp>is<sp>null<sp>-<sp>no<sp>patient" ) ; return null ; } java . util . List < org . hl7 . v3 . PRPAIN201310UV02MFMIMT700711UV01Subject1 > subjects = controlActProcess . getSubject ( ) ; if ( ( subjects == null ) || ( subjects . isEmpty ( ) ) ) { gov . hhs . fha . nhinc . transform . subdisc . HL7Extractors . LOG . info ( "subjects<sp>is<sp>blank/null<sp>-<sp>no<sp>patient" ) ; return null ; } return subjects . get ( 0 ) ; } | org . junit . Assert . assertNull ( subject1 ) |
testCreate ( ) { org . oscarehr . hospitalReportManager . model . HRMProviderConfidentialityStatement entity = new org . oscarehr . hospitalReportManager . model . HRMProviderConfidentialityStatement ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( entity ) ; entity . setId ( "999998" ) ; dao . persist ( entity ) ; "<AssertPlaceHolder>" ; } getId ( ) { return this . id ; } | org . junit . Assert . assertNotNull ( entity . getId ( ) ) |
testEscape ( ) { initGraph ( ) ; greycatTest . internal . task . Task t = greycat . Tasks . newTask ( ) ; t . parse ( "readIndex(\'nodes\').select(\'node.get(\\\'name\\\')==\"root\"\')" , graph ) ; "<AssertPlaceHolder>" ; removeGraph ( ) ; } toString ( ) { java . lang . StringBuilder result = new java . lang . StringBuilder ( ) ; double [ ] coefs = unphasedState ( ) . getFromKeyWithDefault ( org . mwg . mlx . algorithm . AbstractLinearRegressionNode . COEFFICIENTS_KEY , org . mwg . mlx . algorithm . AbstractLinearRegressionNode . COEFFICIENTS_DEF ) ; result . append ( "Coefficients:<sp>" ) ; for ( int j = 0 ; j < ( coefs . length ) ; j ++ ) { result . append ( ( ( coefs [ j ] ) + ",<sp>" ) ) ; } return result . toString ( ) ; } | org . junit . Assert . assertEquals ( "readIndex(\'nodes\').select(\'node.get(\\\'name\\\')==\"root\"\')" , t . toString ( ) ) |
testPUTWithRealPayload ( ) { org . codehaus . httpcache4j . cache . HTTPResponse response = createRealResponse ( ) ; storage . insert ( org . codehaus . httpcache4j . cache . REQUEST , response ) ; "<AssertPlaceHolder>" ; } size ( ) { return varyHeaders . size ( ) ; } | org . junit . Assert . assertEquals ( 1 , storage . size ( ) ) |
beanBinder_nullRepresentationIsNotDisabled ( ) { com . vaadin . data . Binder < com . vaadin . tests . data . bean . Person > binder = new com . vaadin . data . Binder ( com . vaadin . tests . data . bean . Person . class ) ; binder . forField ( nameField ) . bind ( "firstName" ) ; com . vaadin . tests . data . bean . Person person = new com . vaadin . tests . data . bean . Person ( ) ; binder . setBean ( person ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return select . getFirstSelectedOption ( ) . getText ( ) ; } | org . junit . Assert . assertEquals ( "" , nameField . getValue ( ) ) |
testRetainOneType ( ) { java . lang . Iterable < java . lang . Object > objects = java . util . Arrays . asList ( ( ( java . lang . Object ) ( "foo" ) ) , "bar" , "baz" , 2L , BigInteger . ZERO ) ; java . lang . Iterable < java . lang . String > strings = org . apache . commons . functor . core . collection . FilteredIterable . of ( objects ) . retain ( java . lang . String . class ) ; for ( java . lang . String s : strings ) { "<AssertPlaceHolder>" ; } } retain ( java . lang . Class [ ] ) { return this ; } | org . junit . Assert . assertTrue ( ( s instanceof java . lang . String ) ) |
testL ( ) { tillerino . tillerinobot . predicates . NumericPropertyPredicate < tillerino . tillerinobot . predicates . TitleLength > build = builder . build ( "tl<12" , null ) ; "<AssertPlaceHolder>" ; } build ( java . lang . String , tillerino . tillerinobot . lang . Language ) { if ( ! ( argument . toLowerCase ( ) . startsWith ( property . getName ( ) . toLowerCase ( ) ) ) ) { return null ; } java . lang . String rest = argument . substring ( property . getName ( ) . length ( ) ) ; tillerino . tillerinobot . predicates . NumericPredicateBuilder . Relation relation = null ; if ( rest . startsWith ( "<=" ) ) { relation = tillerino . tillerinobot . predicates . NumericPredicateBuilder . Relation . LEQ ; rest = rest . substring ( 2 ) ; } if ( rest . startsWith ( "<" ) ) { relation = tillerino . tillerinobot . predicates . NumericPredicateBuilder . Relation . L ; rest = rest . substring ( 1 ) ; } if ( rest . startsWith ( ">=" ) ) { relation = tillerino . tillerinobot . predicates . NumericPredicateBuilder . Relation . GEQ ; rest = rest . substring ( 2 ) ; } if ( rest . startsWith ( ">" ) ) { relation = tillerino . tillerinobot . predicates . NumericPredicateBuilder . Relation . G ; rest = rest . substring ( 1 ) ; } if ( rest . startsWith ( "=" ) ) { relation = tillerino . tillerinobot . predicates . NumericPredicateBuilder . Relation . EQ ; rest = rest . substring ( 1 ) ; } if ( relation == null ) { throw new tillerino . tillerinobot . UserException ( lang . invalidChoice ( argument , correctFormat ( ) ) ) ; } double d ; try { d = java . lang . Double . parseDouble ( rest ) ; } catch ( java . lang . NumberFormatException e ) { throw new tillerino . tillerinobot . UserException ( lang . invalidChoice ( argument , correctFormat ( ) ) ) ; } double max = ( ( ( relation == ( tillerino . tillerinobot . predicates . NumericPredicateBuilder . Relation . EQ ) ) || ( relation == ( tillerino . tillerinobot . predicates . NumericPredicateBuilder . Relation . LEQ ) ) ) || ( relation == ( tillerino . tillerinobot . predicates . NumericPredicateBuilder . Relation . L ) ) ) ? d : Double . POSITIVE_INFINITY ; double min = ( ( ( relation == ( tillerino . tillerinobot . predicates . NumericPredicateBuilder . Relation . EQ ) ) || ( relation == ( tillerino . tillerinobot . predicates . NumericPredicateBuilder . Relation . GEQ ) ) ) || ( relation == ( tillerino . tillerinobot . predicates . NumericPredicateBuilder . Relation . G ) ) ) ? d : Double . NEGATIVE_INFINITY ; return new tillerino . tillerinobot . predicates . NumericPropertyPredicate ( argument , property , min , ( relation != ( tillerino . tillerinobot . predicates . NumericPredicateBuilder . Relation . G ) ) , max , ( relation != ( tillerino . tillerinobot . predicates . NumericPredicateBuilder . Relation . L ) ) ) ; } | org . junit . Assert . assertEquals ( new tillerino . tillerinobot . predicates . NumericPropertyPredicate ( "tl<12" , new tillerino . tillerinobot . predicates . TitleLength ( ) , Double . NEGATIVE_INFINITY , true , 12 , false ) , build ) |
testSchemaValidation ( ) { io . cdap . plugin . CSVFormatter . Config config = new io . cdap . plugin . CSVFormatter . Config ( "DELIMITED" , "VBAR" , io . cdap . plugin . CSVFormatterTest . OUTPUT . toString ( ) ) ; io . cdap . cdap . etl . api . Transform < io . cdap . cdap . api . data . format . StructuredRecord , io . cdap . cdap . api . data . format . StructuredRecord > transform = new io . cdap . plugin . CSVFormatter ( config ) ; io . cdap . cdap . etl . mock . common . MockPipelineConfigurer mockPipelineConfigurer = new io . cdap . cdap . etl . mock . common . MockPipelineConfigurer ( io . cdap . plugin . CSVFormatterTest . INPUT1 ) ; transform . configurePipeline ( mockPipelineConfigurer ) ; "<AssertPlaceHolder>" ; } getOutputSchema ( ) { java . util . List < io . cdap . cdap . api . data . schema . Schema . Field > fields = new java . util . ArrayList ( ) ; java . lang . String [ ] mappings = fieldTypeMapping . split ( "," ) ; for ( java . lang . String mapping : mappings ) { java . lang . String [ ] params = mapping . split ( ":" ) ; java . lang . String fieldName = params [ 0 ] . trim ( ) ; if ( com . google . common . base . Strings . isNullOrEmpty ( fieldName ) ) { throw new java . lang . IllegalArgumentException ( "Field<sp>name<sp>cannot<sp>be<sp>null<sp>or<sp>empty." ) ; } else if ( ( ( params . length ) < 2 ) || ( com . google . common . base . Strings . isNullOrEmpty ( params [ 1 ] ) ) ) { throw new java . lang . IllegalArgumentException ( ( "Type<sp>cannot<sp>be<sp>null.<sp>Please<sp>specify<sp>type<sp>for<sp>" + fieldName ) ) ; } io . cdap . cdap . api . data . schema . Schema . Field field = Schema . Field . of ( fieldName , io . cdap . cdap . api . data . schema . Schema . nullableOf ( io . cdap . cdap . api . data . schema . Schema . of ( Schema . Type . valueOf ( params [ 1 ] . trim ( ) . toUpperCase ( ) ) ) ) ) ; if ( fields . contains ( field ) ) { throw new java . lang . IllegalArgumentException ( java . lang . String . format ( "Field<sp>%s<sp>already<sp>has<sp>type<sp>specified.<sp>Duplicate<sp>field<sp>%s" , fieldName , fieldName ) ) ; } else { fields . add ( field ) ; } } return io . cdap . cdap . api . data . schema . Schema . recordOf ( "record" , fields ) ; } | org . junit . Assert . assertEquals ( io . cdap . plugin . CSVFormatterTest . OUTPUT , mockPipelineConfigurer . getOutputSchema ( ) ) |
decodeHugeBuffer ( ) { char [ ] huge = new char [ 8192 ] ; java . util . Arrays . fill ( huge , 'A' ) ; java . lang . String value = new java . lang . String ( huge ) ; redis . set ( key , value ) ; "<AssertPlaceHolder>" ; } get ( K ) { return dispatch ( com . lambdaworks . redis . GET , new com . lambdaworks . redis . ValueOutput < K , V > ( codec ) , key ) ; } | org . junit . Assert . assertEquals ( value , redis . get ( key ) ) |
testUpdateLastPublishDateFirstPublishPortlet ( ) { java . util . Date now = new java . util . Date ( ) ; java . util . Date startDate = new java . util . Date ( ( ( now . getTime ( ) ) + ( com . liferay . portal . kernel . util . Time . DAY ) ) ) ; java . util . Date endDate = new java . util . Date ( ( ( now . getTime ( ) ) + ( com . liferay . portal . kernel . util . Time . WEEK ) ) ) ; com . liferay . portal . kernel . util . DateRange dateRange = new com . liferay . portal . kernel . util . DateRange ( startDate , endDate ) ; com . liferay . exportimport . kernel . lar . ExportImportDateUtil . updateLastPublishDate ( PortletKeys . EXPORT_IMPORT , _portletPreferences , dateRange , endDate ) ; java . util . Date lastPublishDate = com . liferay . exportimport . kernel . lar . ExportImportDateUtil . getLastPublishDate ( _portletPreferences ) ; "<AssertPlaceHolder>" ; } getLastPublishDate ( com . liferay . portal . kernel . model . LayoutSet ) { long lastPublishDate = com . liferay . portal . kernel . util . GetterUtil . getLong ( layoutSet . getSettingsProperty ( com . liferay . exportimport . kernel . lar . ExportImportDateUtil . _LAST_PUBLISH_DATE ) ) ; if ( lastPublishDate == 0 ) { return null ; } return new java . util . Date ( lastPublishDate ) ; } | org . junit . Assert . assertNull ( lastPublishDate ) |
test5 ( ) { java_programs . Node node = new java_programs . Node ( "0" ) ; java . lang . Boolean result = java_programs . DETECT_CYCLE . detect_cycle ( node ) ; java . lang . String resultStr = "" ; if ( result ) { resultStr = "Cycle<sp>detected!" ; } else { resultStr = "Cycle<sp>not<sp>detected!" ; } "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( "Cycle<sp>not<sp>detected!" , resultStr ) |
shouldPassVerificationWithNullRequest ( ) { org . mockserver . filters . MockServerEventLog logFilter = new org . mockserver . filters . MockServerEventLog ( mockLogFormatter , org . mockserver . filters . LogFilterRequestLogEntryVerificationSequenceTest . scheduler ) ; logFilter . add ( new org . mockserver . log . model . RequestLogEntry ( request ( "one" ) ) ) ; logFilter . add ( new org . mockserver . log . model . RequestLogEntry ( request ( "multi" ) ) ) ; logFilter . add ( new org . mockserver . log . model . RequestLogEntry ( request ( "three" ) ) ) ; logFilter . add ( new org . mockserver . log . model . RequestLogEntry ( request ( "multi" ) ) ) ; logFilter . add ( new org . mockserver . log . model . RequestLogEntry ( request ( "four" ) ) ) ; "<AssertPlaceHolder>" ; } verify ( org . mockserver . client . HttpRequest [ ] ) { if ( ( ( httpRequests == null ) || ( ( httpRequests . length ) == 0 ) ) || ( ( httpRequests [ 0 ] ) == null ) ) { throw new java . lang . IllegalArgumentException ( "verify(HttpRequest...)<sp>requires<sp>a<sp>non<sp>null<sp>non<sp>empty<sp>array<sp>of<sp>HttpRequest<sp>objects" ) ; } org . mockserver . verify . VerificationSequence verificationSequence = new org . mockserver . verify . VerificationSequence ( ) . withRequests ( httpRequests ) ; java . lang . String result = sendRequest ( request ( ) . withMethod ( "PUT" ) . withPath ( calculatePath ( "verifySequence" ) ) . withBody ( verificationSequenceSerializer . serialize ( verificationSequence ) , StandardCharsets . UTF_8 ) ) . getBodyAsString ( ) ; if ( ( result != null ) && ( ! ( result . isEmpty ( ) ) ) ) { throw new java . lang . AssertionError ( result ) ; } return clientClass . cast ( this ) ; } | org . junit . Assert . assertThat ( logFilter . verify ( ( ( org . mockserver . verify . VerificationSequence ) ( null ) ) ) , org . hamcrest . CoreMatchers . is ( "" ) ) |
putActorMappingInBar ( ) { final org . bonitasoft . engine . bpm . process . impl . ProcessDefinitionBuilder processDefinitionBuilder = new org . bonitasoft . engine . bpm . process . impl . ProcessDefinitionBuilder ( ) . createNewInstance ( "ProductionPlanning" , "3.1" ) ; final org . bonitasoft . engine . bpm . process . DesignProcessDefinition designProcessDefinition = processDefinitionBuilder . done ( ) ; org . bonitasoft . engine . bpm . bar . actorMapping . ActorMapping actorMapping = new org . bonitasoft . engine . bpm . bar . actorMapping . ActorMapping ( ) ; final org . bonitasoft . engine . bpm . bar . BusinessArchive businessArchive = new org . bonitasoft . engine . bpm . bar . BusinessArchiveBuilder ( ) . createNewBusinessArchive ( ) . setProcessDefinition ( designProcessDefinition ) . setActorMapping ( actorMapping ) . done ( ) ; org . bonitasoft . engine . bpm . bar . BusinessArchiveFactory . writeBusinessArchiveToFile ( businessArchive , barFile ) ; final org . bonitasoft . engine . bpm . bar . BusinessArchive readBusinessArchive = org . bonitasoft . engine . bpm . bar . BusinessArchiveFactory . readBusinessArchive ( barFile ) ; "<AssertPlaceHolder>" ; } getActorMapping ( ) { final org . bonitasoft . engine . bpm . bar . actorMapping . ActorMapping actorMapping = new org . bonitasoft . engine . bpm . bar . actorMapping . ActorMapping ( ) ; org . bonitasoft . engine . persistence . QueryOptions queryOptions = new org . bonitasoft . engine . persistence . QueryOptions ( 0 , 100 , org . bonitasoft . engine . actor . mapping . model . SActor . class , "id" , org . bonitasoft . engine . persistence . OrderByType . ASC ) ; java . util . List < org . bonitasoft . engine . actor . mapping . model . SActor > actors = actorMappingService . getActors ( processDefinitionId , queryOptions ) ; while ( ! ( actors . isEmpty ( ) ) ) { for ( final org . bonitasoft . engine . actor . mapping . model . SActor sActor : actors ) { final org . bonitasoft . engine . bpm . bar . actorMapping . Actor actor = new org . bonitasoft . engine . bpm . bar . actorMapping . Actor ( sActor . getName ( ) ) ; final java . util . List < org . bonitasoft . engine . actor . mapping . model . SActorMember > actorMembers = actorMappingService . getActorMembers ( sActor . getId ( ) , 0 , Integer . MAX_VALUE ) ; for ( final org . bonitasoft . engine . actor . mapping . model . SActorMember sActorMember : actorMembers ) { addUser ( actor , sActorMember ) ; addGroup ( actor , sActorMember ) ; addRole ( actor , sActorMember ) ; addMembership ( actor , sActorMember ) ; } actorMapping . addActor ( actor ) ; } queryOptions = org . bonitasoft . engine . persistence . QueryOptions . getNextPage ( queryOptions ) ; actors = actorMappingService . getActors ( processDefinitionId , queryOptions ) ; } return actorMapping ; } | org . junit . Assert . assertEquals ( actorMapping , readBusinessArchive . getActorMapping ( ) ) |
emptyROIContainsPoint ( ) { it . geosolutions . jaiext . vectorbin . ROIGeometry roi = createEmptyROI ( ) ; "<AssertPlaceHolder>" ; } contains ( double , double ) { testPointCS . setOrdinate ( 0 , 0 , x ) ; testPointCS . setOrdinate ( 0 , 1 , y ) ; testPoint . geometryChanged ( ) ; return theGeom . contains ( testPoint ) ; } | org . junit . Assert . assertFalse ( roi . contains ( 0 , 0 ) ) |
testSetRenderer ( ) { org . jfree . chart . plot . CategoryPlot plot = new org . jfree . chart . plot . CategoryPlot ( ) ; org . jfree . chart . renderer . category . CategoryItemRenderer renderer = new org . jfree . chart . renderer . category . LineAndShapeRenderer ( ) ; plot . setRenderer ( renderer ) ; org . jfree . chart . plot . MyPlotChangeListener listener = new org . jfree . chart . plot . MyPlotChangeListener ( ) ; plot . addChangeListener ( listener ) ; renderer . setSeriesPaint ( 0 , Color . BLACK ) ; "<AssertPlaceHolder>" ; } getEvent ( ) { return this . event ; } | org . junit . Assert . assertTrue ( ( ( listener . getEvent ( ) ) != null ) ) |
testGithubProviderWithAuthTypeParam ( ) { com . streamreduce . rest . dto . response . ConnectionProvidersResponseDTO responseDTO = jsonToObject ( makeRequest ( ( ( connectionsBaseUrl ) + "/providers/projecthosting?showAuthTypes=true" ) , "GET" , null , authnToken ) , org . codehaus . jackson . map . type . TypeFactory . defaultInstance ( ) . constructType ( com . streamreduce . rest . dto . response . ConnectionProvidersResponseDTO . class ) ) ; "<AssertPlaceHolder>" ; com . streamreduce . rest . dto . response . ConnectionProviderResponseDTO githubProviderDTO = com . google . common . collect . Iterables . find ( responseDTO . getProviders ( ) , new com . google . common . base . Predicate < com . streamreduce . rest . dto . response . ConnectionProviderResponseDTO > ( ) { @ com . streamreduce . rest . Override public boolean apply ( @ javax . annotation . Nullable com . streamreduce . rest . dto . response . ConnectionProviderResponseDTO input ) { return ( input != null ) && ( input . getId ( ) . equals ( "github" ) ) ; } } ) ; java . util . List < com . streamreduce . rest . dto . response . AuthTypeResponseDTO > authTypes = githubProviderDTO . getAuthTypes ( ) . getAuthTypes ( ) ; com . google . common . collect . Iterables . find ( authTypes , new com . google . common . base . Predicate < com . streamreduce . rest . dto . response . AuthTypeResponseDTO > ( ) { @ com . streamreduce . rest . Override public boolean apply ( @ javax . annotation . Nullable com . streamreduce . rest . dto . response . AuthTypeResponseDTO input ) { return ( ( ( input != null ) && ( input . getType ( ) . equals ( AuthType . USERNAME_PASSWORD . toString ( ) ) ) ) && ( input . getUsernameLabel ( ) . equalsIgnoreCase ( "UserName" ) ) ) && ( input . getPasswordLabel ( ) . equalsIgnoreCase ( "Password" ) ) ; } } ) ; com . google . common . collect . Iterables . find ( authTypes , new com . google . common . base . Predicate < com . streamreduce . rest . dto . response . AuthTypeResponseDTO > ( ) { @ com . streamreduce . rest . Override public boolean apply ( @ javax . annotation . Nullable com . streamreduce . rest . dto . response . AuthTypeResponseDTO input ) { return ( ( ( ( ( input != null ) && ( input . getType ( ) . equals ( AuthType . OAUTH . toString ( ) ) ) ) && ( ( input . getUsernameLabel ( ) ) == null ) ) && ( ( input . getPasswordLabel ( ) ) == null ) ) && ( input . getOauthEndpoint ( ) . equals ( "/api/oauth/providers/github" ) ) ) && ( ( input . getCommandLabel ( ) ) != null ) ; } } ) ; } getProviders ( ) { return providers ; } | org . junit . Assert . assertTrue ( ( ( responseDTO . getProviders ( ) . size ( ) ) == 2 ) ) |
testGetPortletInvocationWhitelistActionsFromPortalProperties ( ) { java . util . Set < java . lang . String > portletInvocationWhitelistActions = com . liferay . portal . kernel . security . auth . AuthTokenWhitelistUtil . getPortletInvocationWhitelistActions ( ) ; java . lang . String [ ] actions = com . liferay . portal . util . PropsValues . PORTLET_ADD_DEFAULT_RESOURCE_CHECK_WHITELIST_ACTIONS ; for ( java . lang . String action : actions ) { "<AssertPlaceHolder>" ; } } toString ( ) { com . liferay . petra . string . StringBundler sb = new com . liferay . petra . string . StringBundler ( 23 ) ; sb . append ( ",<sp>width=" 1 ) ; sb . append ( uuid ) ; sb . append ( ",<sp>width=" 0 ) ; sb . append ( amImageEntryId ) ; sb . append ( ",<sp>groupId=" ) ; sb . append ( groupId ) ; sb . append ( ",<sp>companyId=" ) ; sb . append ( companyId ) ; sb . append ( ",<sp>createDate=" ) ; sb . append ( createDate ) ; sb . append ( ",<sp>configurationUuid=" ) ; sb . append ( configurationUuid ) ; sb . append ( ",<sp>fileVersionId=" ) ; sb . append ( fileVersionId ) ; sb . append ( ",<sp>mimeType=" ) ; sb . append ( mimeType ) ; sb . append ( ",<sp>height=" ) ; sb . append ( height ) ; sb . append ( ",<sp>width=" ) ; sb . append ( width ) ; sb . append ( ",<sp>size=" ) ; sb . append ( size ) ; sb . append ( "}" ) ; return sb . toString ( ) ; } | org . junit . Assert . assertTrue ( portletInvocationWhitelistActions . toString ( ) , portletInvocationWhitelistActions . contains ( action ) ) |
initEmpty ( ) { jetbrains . jetpad . projectional . svg . SvgTextElement element = new jetbrains . jetpad . projectional . svg . SvgTextElement ( ) ; "<AssertPlaceHolder>" ; } children ( ) { return new jetbrains . jetpad . projectional . view . View . ExternalChildList ( ) ; } | org . junit . Assert . assertTrue ( element . children ( ) . isEmpty ( ) ) |
testReadStringFromNullString ( ) { org . apache . activemq . artemis . jms . client . ActiveMQStreamMessage message = new org . apache . activemq . artemis . jms . client . ActiveMQStreamMessage ( ) ; message . writeString ( null ) ; message . reset ( ) ; "<AssertPlaceHolder>" ; } readString ( ) { if ( bodyWriteOnly ) { throw new javax . jms . MessageNotReadableException ( "The<sp>message<sp>body<sp>is<sp>writeonly" ) ; } try { java . lang . Object value = content . get ( position ) ; offset = 0 ; if ( value == null ) { ( position ) ++ ; return null ; } else if ( value instanceof java . lang . Boolean ) { ( position ) ++ ; return ( ( java . lang . Boolean ) ( value ) ) . toString ( ) ; } else if ( value instanceof java . lang . Byte ) { ( position ) ++ ; return ( ( java . lang . Byte ) ( value ) ) . toString ( ) ; } else if ( value instanceof java . lang . Short ) { ( position ) ++ ; return ( ( java . lang . Short ) ( value ) ) . toString ( ) ; } else if ( value instanceof java . lang . Character ) { ( position ) ++ ; return ( ( java . lang . Character ) ( value ) ) . toString ( ) ; } else if ( value instanceof java . lang . Integer ) { ( position ) ++ ; return ( ( java . lang . Integer ) ( value ) ) . toString ( ) ; } else if ( value instanceof java . lang . Long ) { ( position ) ++ ; return ( ( java . lang . Long ) ( value ) ) . toString ( ) ; } else if ( value instanceof java . lang . Float ) { ( position ) ++ ; return ( ( java . lang . Float ) ( value ) ) . toString ( ) ; } else if ( value instanceof java . lang . Double ) { ( position ) ++ ; return ( ( java . lang . Double ) ( value ) ) . toString ( ) ; } else if ( value instanceof java . lang . String ) { ( position ) ++ ; return ( ( java . lang . String ) ( value ) ) ; } else { throw new javax . jms . MessageFormatException ( "Invalid<sp>conversion" ) ; } } catch ( java . lang . IndexOutOfBoundsException e ) { throw new javax . jms . MessageEOFException ( "" ) ; } } | org . junit . Assert . assertNull ( message . readString ( ) ) |
testBuilder ( ) { de . akquinet . jbosscc . needle . junit . testrule . DatabaseTestRule build = de . akquinet . jbosscc . needle . junit . NeedleBuilders . databaseTestRule ( ) . build ( ) ; org . junit . runners . model . Statement statement = new org . junit . runners . model . Statement ( ) { @ de . akquinet . jbosscc . needle . junit . testrule . Override public void evaluate ( ) throws java . lang . Throwable { } } ; build . apply ( statement , null ) ; statement . evaluate ( ) ; "<AssertPlaceHolder>" ; } getEntityManager ( ) { return configuration . getEntityManager ( ) ; } | org . junit . Assert . assertNotNull ( build . getEntityManager ( ) ) |
testFilterTwoValues ( ) { final java . util . function . Predicate < io . vertigo . dynamo . collections . data . domain . SmartItem > filterA = io . vertigo . dynamo . criteria . Criterions . isEqualTo ( DtDefinitions . Fields . LABEL , "aaa" ) . toPredicate ( ) ; final java . util . function . Predicate < io . vertigo . dynamo . collections . data . domain . SmartItem > filterB = io . vertigo . dynamo . criteria . Criterions . isEqualTo ( DtDefinitions . Fields . ID , 13L ) . toPredicate ( ) ; final io . vertigo . dynamo . domain . model . DtList < io . vertigo . dynamo . collections . data . domain . SmartItem > result = io . vertigo . dynamo . collections . CollectionsManagerTest . createItemsForRangeTest ( ) . stream ( ) . filter ( filterA . and ( filterB ) ) . collect ( io . vertigo . dynamo . domain . util . VCollectors . toDtList ( io . vertigo . dynamo . collections . data . domain . SmartItem . class ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return lines . size ( ) ; } | org . junit . Assert . assertEquals ( 1 , result . size ( ) ) |
selectExecutorsTwoWorkersValid ( ) { java . util . Map < alluxio . wire . WorkerInfo , alluxio . job . util . SerializableVoid > result = selectExecutorsTestHelper ( com . google . common . collect . Lists . newArrayList ( new alluxio . wire . BlockLocation ( ) . setWorkerAddress ( alluxio . job . replicate . ReplicateDefinitionTest . ADDRESS_1 ) ) , 2 , com . google . common . collect . Lists . newArrayList ( alluxio . job . replicate . ReplicateDefinitionTest . WORKER_INFO_1 , alluxio . job . replicate . ReplicateDefinitionTest . WORKER_INFO_2 , alluxio . job . replicate . ReplicateDefinitionTest . WORKER_INFO_3 ) ) ; java . util . Map < alluxio . wire . WorkerInfo , alluxio . job . util . SerializableVoid > expected = com . google . common . collect . Maps . newHashMap ( ) ; expected . put ( alluxio . job . replicate . ReplicateDefinitionTest . WORKER_INFO_2 , null ) ; expected . put ( alluxio . job . replicate . ReplicateDefinitionTest . WORKER_INFO_3 , null ) ; "<AssertPlaceHolder>" ; } put ( org . javaswift . joss . model . Access , java . lang . String ) { alluxio . underfs . swift . http . SwiftDirectClient . LOG . debug ( "PUT<sp>method,<sp>object<sp>:<sp>{}" , objectName ) ; java . net . URL url = new java . net . URL ( ( ( ( access . getPublicURL ( ) ) + "/" ) + objectName ) ) ; java . net . URLConnection connection = url . openConnection ( ) ; if ( ! ( connection instanceof java . net . HttpURLConnection ) ) { throw new java . io . IOException ( "Connection<sp>is<sp>not<sp>an<sp>instance<sp>of<sp>HTTP<sp>URL<sp>Connection" ) ; } java . net . HttpURLConnection httpCon = ( ( java . net . HttpURLConnection ) ( connection ) ) ; httpCon . setRequestMethod ( "PUT" ) ; httpCon . addRequestProperty ( "chunked" 0 , access . getToken ( ) ) ; httpCon . addRequestProperty ( "Content-Type" , "binary/octet-stream" ) ; httpCon . setDoInput ( true ) ; httpCon . setRequestProperty ( "Connection" , "close" ) ; httpCon . setReadTimeout ( alluxio . underfs . swift . http . SwiftDirectClient . HTTP_READ_TIMEOUT ) ; httpCon . setRequestProperty ( "Transfer-Encoding" , "chunked" ) ; httpCon . setDoOutput ( true ) ; httpCon . setChunkedStreamingMode ( alluxio . underfs . swift . http . SwiftDirectClient . HTTP_CHUNK_STREAMING ) ; httpCon . connect ( ) ; return new alluxio . underfs . swift . SwiftOutputStream ( httpCon ) ; } | org . junit . Assert . assertEquals ( expected , result ) |
testValidate ( ) { java . lang . String [ ] entries = new java . lang . String [ ] { "abc" , "def" , "ghi" } ; org . apache . deltaspike . beanvalidation . test . BasicPojo p = new org . apache . deltaspike . beanvalidation . test . BasicPojo ( ) ; p . setValue ( entries ) ; final java . util . Set < javax . validation . ConstraintViolation < org . apache . deltaspike . beanvalidation . test . BasicPojo > > violations = validator . validate ( p ) ; java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; for ( javax . validation . ConstraintViolation < org . apache . deltaspike . beanvalidation . test . BasicPojo > violation : violations ) { sb . append ( ( ( ( violation . getMessage ( ) ) + "<sp>" ) + ( violation . getPropertyPath ( ) ) ) ) ; } "<AssertPlaceHolder>" ; } toString ( ) { return ( "WeldContainerControl<sp>[Weld<sp>" + ( org . jboss . weld . util . reflection . Formats . version ( org . jboss . weld . Container . class . getPackage ( ) ) ) ) + ']' ; } | org . junit . Assert . assertTrue ( sb . toString ( ) , violations . isEmpty ( ) ) |
testHashCode ( ) { org . jfree . data . function . PowerFunction2D f1 = new org . jfree . data . function . PowerFunction2D ( 1.0 , 2.0 ) ; org . jfree . data . function . PowerFunction2D f2 = new org . jfree . data . function . PowerFunction2D ( 1.0 , 2.0 ) ; "<AssertPlaceHolder>" ; } hashCode ( ) { int result ; result = ( ( this . data ) != null ) ? this . data . hashCode ( ) : 0 ; result = ( 29 * result ) + ( ( this . xPoints ) != null ? this . xPoints . hashCode ( ) : 0 ) ; result = ( 29 * result ) + ( this . propagateEvents ? 1 : 0 ) ; result = ( 29 * result ) + ( this . autoPrune ? 1 : 0 ) ; return result ; } | org . junit . Assert . assertEquals ( f1 . hashCode ( ) , f2 . hashCode ( ) ) |
atLeastOneAccountIsOwnedByParty ( ) { java . util . List < org . estatio . module . financial . dom . FinancialAccount > allAccounts = financialAccountRepository . allAccounts ( ) ; java . util . List < org . estatio . module . financial . dom . FinancialAccount > partyAccounts = com . google . common . collect . Lists . newArrayList ( com . google . common . collect . Iterables . filter ( allAccounts , new com . google . common . base . Predicate < org . estatio . module . financial . dom . FinancialAccount > ( ) { public boolean apply ( org . estatio . module . financial . dom . FinancialAccount fa ) { return ( fa . getOwner ( ) ) == ( party ) ; } } ) ) ; "<AssertPlaceHolder>" ; } size ( ) { assertThat ( linkRepository . findAllForClassHierarchy ( org . estatio . module . link . dom . LinkRepository_Test . Animal . class ) ) . hasSize ( 2 ) ; assertThat ( linkRepository . findAllForClassHierarchy ( org . estatio . module . link . dom . LinkRepository_Test . Mammal . class ) ) . hasSize ( 2 ) ; assertThat ( linkRepository . findAllForClassHierarchy ( org . estatio . module . link . dom . LinkRepository_Test . Lion . class ) ) . hasSize ( 5 ) ; } | org . junit . Assert . assertThat ( partyAccounts . size ( ) , org . hamcrest . CoreMatchers . is ( 1 ) ) |
testSetReactionSet_IReactionSet ( ) { org . openscience . cdk . interfaces . IChemModel chemModel = ( ( org . openscience . cdk . interfaces . IChemModel ) ( newChemObject ( ) ) ) ; org . openscience . cdk . interfaces . IReactionSet crystal = chemModel . getBuilder ( ) . newInstance ( org . openscience . cdk . interfaces . IReactionSet . class ) ; chemModel . setReactionSet ( crystal ) ; "<AssertPlaceHolder>" ; } getReactionSet ( ) { return this . setOfReactions ; } | org . junit . Assert . assertEquals ( crystal , chemModel . getReactionSet ( ) ) |
shouldSetTempDownloadFolder ( ) { java . lang . String tempFolder = "/tmp/" ; java . lang . System . setProperty ( "java.io.tmpdir" , tempFolder ) ; org . arquillian . container . chameleon . ChameleonConfiguration configuration = new org . arquillian . container . chameleon . ChameleonConfiguration ( ) ; configuration . setChameleonDistributionDownloadFolder ( "TMP" ) ; "<AssertPlaceHolder>" ; } getChameleonDistributionDownloadFolder ( ) { if ( ( chameleonDistributionDownloadFolder ) != null ) { if ( org . arquillian . container . chameleon . ChameleonConfiguration . TMP_FOLDER_EXPRESSION . equalsIgnoreCase ( chameleonDistributionDownloadFolder ) ) { chameleonDistributionDownloadFolder = ( java . lang . System . getProperty ( "java.io.tmpdir" ) ) + "/arquillian_chameleon" ; } return chameleonDistributionDownloadFolder ; } return getOutputDirectory ( ) ; } | org . junit . Assert . assertTrue ( configuration . getChameleonDistributionDownloadFolder ( ) . contains ( ( tempFolder + "/arquillian_chameleon" ) ) ) |
testPortletProjectName ( ) { com . liferay . ide . project . core . model . NewLiferayPluginProjectOp op = newProjectOp ( "test-name" ) ; op . setProjectProvider ( "maven" ) ; op . setPluginType ( PluginType . portlet ) ; op . setUseDefaultLocation ( true ) ; op . setPortletFramework ( "mvc" ) ; op . setPortletName ( "testPortlet" ) ; org . eclipse . core . resources . IProject expectedProject = createMavenProject ( op ) ; java . lang . String expectedProjectName = expectedProject . getName ( ) ; org . eclipse . sapphire . ElementList < com . liferay . ide . project . core . model . ProjectName > names = op . getProjectNames ( ) ; com . liferay . ide . project . core . model . ProjectName name = names . get ( 0 ) ; java . lang . String actualProjectName = name . getName ( ) . content ( ) ; "<AssertPlaceHolder>" ; } getName ( ) { return new com . liferay . ide . ui . swtbot . page . Text ( getShell ( ) . bot ( ) , NAME ) ; } | org . junit . Assert . assertEquals ( expectedProjectName , actualProjectName ) |
testFindAllOrderByAsc ( ) { io . katharsis . queryspec . QuerySpec expectedSpec = new io . katharsis . queryspec . QuerySpec ( io . katharsis . resource . mock . models . Task . class ) ; expectedSpec . addSort ( new io . katharsis . queryspec . SortSpec ( java . util . Arrays . asList ( "name" ) , io . katharsis . queryspec . Direction . ASC ) ) ; java . util . Map < java . lang . String , java . util . Set < java . lang . String > > params = new java . util . HashMap ( ) ; add ( params , "sort[tasks]" , "name" ) ; io . katharsis . queryspec . QuerySpec actualSpec = deserializer . deserialize ( taskInformation , params ) ; "<AssertPlaceHolder>" ; } deserialize ( io . katharsis . resource . information . ResourceInformation , java . util . Map ) { io . katharsis . queryspec . QuerySpec rootQuerySpec = new io . katharsis . queryspec . QuerySpec ( resourceInformation . getResourceClass ( ) ) ; setupDefaults ( rootQuerySpec ) ; java . util . List < io . katharsis . queryspec . DefaultQuerySpecDeserializer . Parameter > parameters = parseParameters ( parameterMap , resourceInformation ) ; for ( io . katharsis . queryspec . DefaultQuerySpecDeserializer . Parameter parameter : parameters ) { io . katharsis . queryspec . QuerySpec querySpec = rootQuerySpec . getQuerySpec ( parameter . resourceInformation ) ; if ( querySpec == null ) { querySpec = rootQuerySpec . getOrCreateQuerySpec ( parameter . resourceInformation ) ; setupDefaults ( querySpec ) ; } switch ( parameter . paramType ) { case sort : deserializeSort ( querySpec , parameter ) ; break ; case filter : deserializeFilter ( querySpec , parameter ) ; break ; case include : deserializeIncludes ( querySpec , parameter ) ; break ; case fields : deserializeFields ( querySpec , parameter ) ; break ; case page : deserializePage ( querySpec , parameter ) ; break ; default : throw new java . lang . IllegalStateException ( parameter . paramType . toString ( ) ) ; } } return rootQuerySpec ; } | org . junit . Assert . assertEquals ( expectedSpec , actualSpec ) |
testSetFormat ( ) { datePicker = new org . uberfire . ext . widgets . common . client . common . DatePicker ( datePickerMock ) ; java . lang . String gwtDateFormat = "dd-MMM-yyyy" ; com . google . gwt . i18n . client . DateTimeFormat gwtDateTimeFormat = com . google . gwt . i18n . client . DateTimeFormat . getFormat ( gwtDateFormat ) ; datePicker . setLocaleName ( "en" ) ; datePicker . setFormat ( gwtDateFormat ) ; verify ( datePickerMock ) . setLanguage ( DatePickerLanguage . EN ) ; verify ( datePickerMock ) . setFormat ( org . uberfire . ext . widgets . common . client . common . DatePickerFormatUtilities . convertToBS3DateFormat ( gwtDateFormat ) ) ; java . util . Date now = new java . util . Date ( ) ; now = gwtDateTimeFormat . parse ( gwtDateTimeFormat . format ( now ) ) ; datePicker . setValue ( now ) ; verify ( textBox ) . setValue ( gwtDateTimeFormat . format ( now ) ) ; when ( textBox . getValue ( ) ) . thenReturn ( gwtDateTimeFormat . format ( now ) ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return select . getValue ( ) ; } | org . junit . Assert . assertEquals ( now , datePicker . getValue ( ) ) |
testInsertActLeg_AtWrongPosition ( ) { org . matsim . api . core . v01 . population . Plan plan = org . matsim . core . population . PopulationUtils . createPlan ( org . matsim . core . population . PopulationUtils . getFactory ( ) . createPerson ( org . matsim . api . core . v01 . Id . create ( 1 , org . matsim . api . core . v01 . population . Person . class ) ) ) ; org . matsim . core . population . PopulationUtils . createAndAddActivityFromCoord ( plan , "h" , new org . matsim . api . core . v01 . Coord ( 0 , 0 ) ) ; org . matsim . core . population . PopulationUtils . createAndAddLeg ( plan , TransportMode . car ) ; org . matsim . core . population . PopulationUtils . createAndAddActivityFromCoord ( plan , "w" , new org . matsim . api . core . v01 . Coord ( 100 , 200 ) ) ; "<AssertPlaceHolder>" ; org . matsim . api . core . v01 . population . Activity a = org . matsim . core . population . PopulationUtils . createActivityFromCoord ( "l" , new org . matsim . api . core . v01 . Coord ( 200 , 100 ) ) ; org . matsim . api . core . v01 . population . Leg l = org . matsim . core . population . PopulationUtils . createLeg ( TransportMode . car ) ; try { final org . matsim . api . core . v01 . population . Leg leg = l ; final org . matsim . api . core . v01 . population . Activity act = a ; org . matsim . core . population . PopulationUtils . insertLegAct ( plan , 2 , leg , act ) ; org . junit . Assert . fail ( "expected<sp>Exception<sp>because<sp>of<sp>wrong<sp>act/leg-index." ) ; } catch ( java . lang . IllegalArgumentException e ) { org . matsim . core . population . PlanImplTest . log . debug ( "catched<sp>expected<sp>exception." , e ) ; } } getPlanElements ( ) { return this . actsLegs ; } | org . junit . Assert . assertEquals ( 3 , plan . getPlanElements ( ) . size ( ) ) |
testEvalPrintf ( ) { java . lang . StringBuilder result = new java . lang . StringBuilder ( ) ; io . termd . core . term . EvalContext context = new io . termd . core . term . EvalContext ( new java . lang . String [ 0 ] , result ) . push ( "hello" ) ; new io . termd . core . term . OpCode . Printf ( null , null , null , 's' ) . eval ( context ) ; "<AssertPlaceHolder>" ; } toString ( ) { return "key:" + c ; } | org . junit . Assert . assertEquals ( "hello" , result . toString ( ) ) |
testRejectingAnonConnection ( ) { final java . lang . Process mosquitto = startMosquitto ( "src/test/resources/mosquitto/mosquitto_specified_users.conf" ) ; final pl . baczkowicz . mqttspy . common . generated . MqttConnectionDetails connectionDetails = createMqttConnectionDetails ( "tcp://localhost:10002" , null , null ) ; final pl . baczkowicz . mqttspy . connectivity . SimpleMqttConnection connection = new pl . baczkowicz . mqttspy . connectivity . SimpleMqttConnection ( reconnectionManager , "0" , connectionDetails ) ; connection . createClient ( createTestCallback ( "tcp://localhost:10002" ) ) ; "<AssertPlaceHolder>" ; java . lang . Thread . sleep ( 1000 ) ; stopProcess ( mosquitto ) ; java . lang . Thread . sleep ( 2000 ) ; } connect ( ) { setConnectionStatus ( ConnectionStatus . CONNECTING ) ; try { connectAndWait ( connectionDetails . getOptions ( ) ) ; pl . baczkowicz . mqttspy . connectivity . SimpleMqttConnection . logger . info ( "Successfully<sp>connected<sp>to<sp>{}" , connectionDetails . getName ( ) ) ; setConnectionStatus ( ConnectionStatus . CONNECTED ) ; return true ; } catch ( pl . baczkowicz . spy . exceptions . SpyException e ) { pl . baczkowicz . mqttspy . connectivity . SimpleMqttConnection . logger . error ( "Connection<sp>attempt<sp>failed" , e ) ; setConnectionStatus ( ConnectionStatus . NOT_CONNECTED ) ; } return false ; } | org . junit . Assert . assertFalse ( connection . connect ( ) ) |
testSAML1AuthnAssertionPropertiesOutbound ( ) { java . io . ByteArrayOutputStream baos = new java . io . ByteArrayOutputStream ( ) ; { java . util . Map < java . lang . String , java . lang . Object > config = new java . util . HashMap ( ) ; config . put ( ConfigurationConstants . ACTION , ConfigurationConstants . SAML_TOKEN_UNSIGNED ) ; org . apache . wss4j . stax . test . saml . SAMLCallbackHandlerImpl callbackHandler = new org . apache . wss4j . stax . test . saml . SAMLCallbackHandlerImpl ( ) ; callbackHandler . setStatement ( SAMLCallbackHandlerImpl . Statement . AUTHN ) ; callbackHandler . setIssuer ( "www.example.com" ) ; callbackHandler . setSignAssertion ( false ) ; config . put ( ConfigurationConstants . SAML_CALLBACK_REF , callbackHandler ) ; org . apache . wss4j . stax . ext . WSSSecurityProperties securityProperties = org . apache . wss4j . stax . setup . ConfigurationConverter . convert ( config ) ; org . apache . wss4j . stax . setup . OutboundWSSec wsSecOut = org . apache . wss4j . stax . setup . WSSec . getOutboundWSSec ( securityProperties ) ; javax . xml . stream . XMLStreamWriter xmlStreamWriter = wsSecOut . processOutMessage ( baos , StandardCharsets . UTF_8 . name ( ) , new java . util . ArrayList < org . apache . xml . security . stax . securityEvent . SecurityEvent > ( ) ) ; javax . xml . stream . XMLStreamReader xmlStreamReader = xmlInputFactory . createXMLStreamReader ( this . getClass ( ) . getClassLoader ( ) . getResourceAsStream ( "testdata/plain-soap-1.1.xml" ) ) ; org . apache . wss4j . stax . test . utils . XmlReaderToWriter . writeAll ( xmlStreamReader , xmlStreamWriter ) ; xmlStreamWriter . close ( ) ; org . w3c . dom . Document document = documentBuilderFactory . newDocumentBuilder ( ) . parse ( new java . io . ByteArrayInputStream ( baos . toByteArray ( ) ) ) ; org . w3c . dom . NodeList nodeList = document . getElementsByTagNameNS ( WSSConstants . TAG_dsig_Signature . getNamespaceURI ( ) , WSSConstants . TAG_dsig_Signature . getLocalPart ( ) ) ; "<AssertPlaceHolder>" ; } { java . lang . String action = org . apache . wss4j . dom . handler . WSHandlerConstants . SAML_TOKEN_UNSIGNED ; doInboundSecurityWithWSS4J ( documentBuilderFactory . newDocumentBuilder ( ) . parse ( new java . io . ByteArrayInputStream ( baos . toByteArray ( ) ) ) , action ) ; } } getLength ( ) { if ( ( pos ) >= ( arr . length ) ) { throw new org . apache . wss4j . common . ext . WSSecurityException ( WSSecurityException . ErrorCode . UNSUPPORTED_SECURITY_TOKEN , "noSKIHandling" , new java . lang . Object [ ] { "Invalid<sp>DER<sp>format" } ) ; } int len ; if ( ( ( arr [ pos ] ) & 255 ) <= 127 ) { len = arr [ ( ( pos ) ++ ) ] ; } else { int nbytes = ( arr [ ( ( pos ) ++ ) ] ) & 127 ; if ( ( ( pos ) + nbytes ) > ( arr . length ) ) { throw new org . apache . wss4j . common . ext . WSSecurityException ( WSSecurityException . ErrorCode . UNSUPPORTED_SECURITY_TOKEN , "noSKIHandling" , new java . lang . Object [ ] { "Invalid<sp>DER<sp>format" } ) ; } byte [ ] lenBytes = new byte [ nbytes ] ; java . lang . System . arraycopy ( arr , pos , lenBytes , 0 , lenBytes . length ) ; len = new java . math . BigInteger ( 1 , lenBytes ) . intValue ( ) ; pos += nbytes ; } return len ; } | org . junit . Assert . assertEquals ( nodeList . getLength ( ) , 0 ) |
serialize_ContainerWithXOHLC_SerializedAsArray ( ) { final com . vaadin . addon . charts . model . junittests . ChartDataSeriesJSONSerializationTest . Pair < com . vaadin . data . provider . ListDataProvider < com . vaadin . addon . charts . model . junittests . ChartDataSeriesJSONSerializationTest . TestItemOHLC > , com . vaadin . addon . charts . model . DataProviderSeries < com . vaadin . addon . charts . model . junittests . ChartDataSeriesJSONSerializationTest . TestItemOHLC > > pair = createTuple ( new com . vaadin . addon . charts . model . junittests . ChartDataSeriesJSONSerializationTest . TestItemOHLC ( 2 , 113.84 , 115.92 , 113.75 , 115.19 ) ) ; final com . vaadin . addon . charts . model . DataProviderSeries < com . vaadin . addon . charts . model . junittests . ChartDataSeriesJSONSerializationTest . TestItemOHLC > chartDataSeries = pair . getT2 ( ) ; chartDataSeries . setX ( com . vaadin . addon . charts . model . junittests . ChartDataSeriesJSONSerializationTest . TestItemOHLC :: getX ) ; chartDataSeries . setOpen ( com . vaadin . addon . charts . model . junittests . ChartDataSeriesJSONSerializationTest . TestItemOHLC :: getO ) ; chartDataSeries . setHigh ( com . vaadin . addon . charts . model . junittests . ChartDataSeriesJSONSerializationTest . TestItemOHLC :: getH ) ; chartDataSeries . setLow ( com . vaadin . addon . charts . model . junittests . ChartDataSeriesJSONSerializationTest . TestItemOHLC :: getL ) ; chartDataSeries . setClose ( com . vaadin . addon . charts . model . junittests . ChartDataSeriesJSONSerializationTest . TestItemOHLC :: getC ) ; final java . lang . String actual = toJSON ( chartDataSeries ) ; final java . lang . String expected = "{\"data\":[[2,113.84,115.92,113.75,115.19]]}" ; "<AssertPlaceHolder>" ; } toJSON ( com . vaadin . addon . charts . model . AbstractConfigurationObject ) { try { return com . vaadin . addon . charts . util . ChartSerialization . jsonWriter . writeValueAsString ( object ) ; } catch ( com . fasterxml . jackson . core . JsonProcessingException e ) { e . printStackTrace ( ) ; throw new java . lang . RuntimeException ( ( "Error<sp>while<sp>serializing<sp>" + ( object . getClass ( ) . getSimpleName ( ) ) ) , e ) ; } } | org . junit . Assert . assertEquals ( expected , actual ) |
shouldReturnSameHashCodeAsEquivalentArrayList ( ) { java . util . List < java . lang . String > copy = new java . util . ArrayList < java . lang . String > ( list ) ; "<AssertPlaceHolder>" ; } hashCode ( ) { return hash ; } | org . junit . Assert . assertThat ( list . hashCode ( ) , org . hamcrest . core . Is . is ( copy . hashCode ( ) ) ) |
testFirstOpList ( ) { org . stringtemplate . v4 . ST e = new org . stringtemplate . v4 . ST ( "<first(names)>" ) ; e . add ( "names" , java . util . Arrays . asList ( "Ter" , "Tom" , "Sriram" ) ) ; java . lang . String expecting = "Ter" ; "<AssertPlaceHolder>" ; } render ( ) { return render ( java . util . Locale . getDefault ( ) ) ; } | org . junit . Assert . assertEquals ( expecting , e . render ( ) ) |
testThrowOnBadServerURI ( ) { new io . nats . client . Options . Builder ( ) . server ( "foo:/bar\\:blammer" ) . build ( ) ; "<AssertPlaceHolder>" ; } build ( ) { if ( ( ( this . username ) != null ) && ( ( this . token ) != null ) ) { throw new java . lang . IllegalStateException ( "Options<sp>can't<sp>have<sp>token<sp>and<sp>username" ) ; } if ( ( servers . size ( ) ) == 0 ) { server ( io . nats . client . Options . DEFAULT_URL ) ; } else if ( ( servers . size ( ) ) == 1 ) { java . net . URI serverURI = servers . get ( 0 ) ; if ( ( "tls" . equals ( serverURI . getScheme ( ) ) ) && ( ( this . sslContext ) == null ) ) { try { this . sslContext = javax . net . ssl . SSLContext . getDefault ( ) ; } catch ( java . security . NoSuchAlgorithmException e ) { throw new java . lang . IllegalStateException ( "Unable<sp>to<sp>create<sp>default<sp>SSL<sp>context" , e ) ; } } else if ( ( "opentls" . equals ( serverURI . getScheme ( ) ) ) && ( ( this . sslContext ) == null ) ) { this . sslContext = io . nats . client . impl . SSLUtils . createOpenTLSContext ( ) ; } } if ( ( this . executor ) == null ) { java . lang . String threadPrefix = ( ( ( this . connectionName ) != null ) && ( ( this . connectionName ) != "" ) ) ? this . connectionName : io . nats . client . Options . DEFAULT_THREAD_NAME_PREFIX ; this . executor = java . util . concurrent . Executors . newCachedThreadPool ( ) ; this . executor = new java . util . concurrent . ThreadPoolExecutor ( 0 , Integer . MAX_VALUE , 500L , java . util . concurrent . TimeUnit . MILLISECONDS , new java . util . concurrent . SynchronousQueue < java . lang . Runnable > ( ) , new io . nats . client . Options . DefaultThreadFactory ( threadPrefix ) ) ; } return new io . nats . client . Options ( this ) ; } | org . junit . Assert . assertFalse ( true ) |
testResponsesToRequestsWithAuthorizationHeadersAreNotCacheableBySharedCache ( ) { request = new org . apache . hc . core5 . http . message . BasicHttpRequest ( "GET" , "/" ) ; request . setHeader ( "Authorization" , "Basic<sp>dXNlcjpwYXNzd2Q=" ) ; "<AssertPlaceHolder>" ; } isResponseCacheable ( org . apache . hc . core5 . http . HttpRequest , org . apache . hc . core5 . http . HttpResponse ) { final org . apache . hc . core5 . http . ProtocolVersion version = ( ( request . getVersion ( ) ) != null ) ? request . getVersion ( ) : org . apache . hc . core5 . http . HttpVersion . DEFAULT ; if ( ( version . compareToVersion ( HttpVersion . HTTP_1_1 ) ) > 0 ) { if ( log . isDebugEnabled ( ) ) { log . debug ( ( ( "Protocol<sp>version<sp>" + version ) + "<sp>is<sp>non-cacheable" ) ) ; } return false ; } final java . lang . String [ ] uncacheableRequestDirectives = new java . lang . String [ ] { org . apache . hc . client5 . http . cache . HeaderConstants . CACHE_CONTROL_NO_STORE } ; if ( hasCacheControlParameterFrom ( request , uncacheableRequestDirectives ) ) { log . debug ( "Response<sp>is<sp>explcitily<sp>non-cacheable<sp>per<sp>cache<sp>control<sp>directive" ) ; return false ; } if ( request . getRequestUri ( ) . contains ( "?" ) ) { if ( ( neverCache1_0ResponsesWithQueryString ) && ( from1_0Origin ( response ) ) ) { log . debug ( "Response<sp>is<sp>not<sp>cacheable<sp>as<sp>it<sp>had<sp>a<sp>query<sp>string" ) ; return false ; } else if ( ! ( isExplicitlyCacheable ( response ) ) ) { log . debug ( "Response<sp>is<sp>not<sp>cacheable<sp>as<sp>it<sp>is<sp>missing<sp>explicit<sp>caching<sp>headers" ) ; return false ; } } if ( expiresHeaderLessOrEqualToDateHeaderAndNoCacheControl ( response ) ) { log . debug ( "Expires<sp>header<sp>less<sp>or<sp>equal<sp>to<sp>Date<sp>header<sp>and<sp>no<sp>cache<sp>control<sp>directives" ) ; return false ; } if ( sharedCache ) { if ( ( ( request . countHeaders ( HeaderConstants . AUTHORIZATION ) ) > 0 ) && ( ! ( hasCacheControlParameterFrom ( response , org . apache . hc . client5 . http . impl . cache . ResponseCachingPolicy . AUTH_CACHEABLE_PARAMS ) ) ) ) { log . debug ( "Request<sp>contains<sp>private<sp>credentials" ) ; return false ; } } final java . lang . String method = request . getMethod ( ) ; return isResponseCacheable ( method , response ) ; } | org . junit . Assert . assertFalse ( policy . isResponseCacheable ( request , response ) ) |
byDefaultUseEnglish ( ) { final java . util . HashMap < java . lang . String , java . lang . String > map = translationManager . getLexicon ( "en" ) ; final java . util . HashMap < java . lang . String , java . lang . String > map2 = translationManager . getLexicon ( "af" ) ; "<AssertPlaceHolder>" ; } size ( ) { int result = 0 ; if ( ( inputMap ) != null ) { result = inputMap . size ( ) ; } return result ; } | org . junit . Assert . assertEquals ( map . size ( ) , map2 . size ( ) ) |
testJavaSerDe ( ) { java . io . File tempFile = folder . newFile ( "test-java-serialize" ) ; java . io . FileOutputStream fos = new java . io . FileOutputStream ( tempFile ) ; org . apache . pirk . serialization . SerializationTest . DummyRecord dummyRecord = new org . apache . pirk . serialization . SerializationTest . DummyRecord ( ) ; org . apache . pirk . serialization . SerializationTest . javaSerializer . write ( fos , new org . apache . pirk . serialization . SerializationTest . DummyRecord ( ) ) ; java . io . FileInputStream fis = new java . io . FileInputStream ( tempFile ) ; java . lang . Object deserializedDummyObject = org . apache . pirk . serialization . SerializationTest . javaSerializer . read ( fis , org . apache . pirk . serialization . SerializationTest . DummyRecord . class ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == o ) { return true ; } if ( ( o == null ) || ( ( getClass ( ) ) != ( o . getClass ( ) ) ) ) { return false ; } org . apache . pirk . query . wideskies . Query query = ( ( org . apache . pirk . query . wideskies . Query ) ( o ) ) ; if ( ! ( queryInfo . equals ( query . queryInfo ) ) ) { return false ; } if ( ! ( queryElements . equals ( query . queryElements ) ) ) { return false ; } if ( ( expTable ) != null ? ! ( expTable . equals ( query . expTable ) ) : ( query . expTable ) != null ) { return false ; } if ( ( expFileBasedLookup ) != null ? ! ( expFileBasedLookup . equals ( query . expFileBasedLookup ) ) : ( query . expFileBasedLookup ) != null ) { return false ; } if ( ! ( N . equals ( query . N ) ) ) { return false ; } return NSquared . equals ( query . NSquared ) ; } | org . junit . Assert . assertTrue ( deserializedDummyObject . equals ( dummyRecord ) ) |
test_TabFolder_getChildren ( ) { java . util . ArrayList < org . eclipse . swt . widgets . Control > children = new java . util . ArrayList ( ) ; for ( int i = 0 ; i < 6 ; i ++ ) { org . eclipse . swt . widgets . TabItem item = new org . eclipse . swt . widgets . TabItem ( tabFolder , org . eclipse . swt . SWT . NONE ) ; item . setText ( ( "TabItem<sp>" + i ) ) ; org . eclipse . swt . widgets . Button button = new org . eclipse . swt . widgets . Button ( tabFolder , org . eclipse . swt . SWT . PUSH ) ; button . setText ( ( "Page<sp>" + i ) ) ; item . setControl ( button ) ; children . add ( button ) ; } org . eclipse . swt . widgets . Label label = new org . eclipse . swt . widgets . Label ( tabFolder , org . eclipse . swt . SWT . NONE ) ; label . setText ( "Unused<sp>Child" ) ; children . add ( label ) ; "<AssertPlaceHolder>" ; } getChildren ( ) { checkWidget ( ) ; return new org . eclipse . swt . custom . Control [ 0 ] ; } | org . junit . Assert . assertArrayEquals ( children . toArray ( ) , tabFolder . getChildren ( ) ) |
testFindAll ( ) { java . util . List < com . hantsylab . example . ee7 . blog . domain . model . Comment > foundComments = comments . findAll ( ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( 1 , foundComments . size ( ) ) |
testFormatParse ( ) { java . time . ZonedDateTime now = java . time . ZonedDateTime . now ( ) ; java . time . ZoneOffset offset = now . getOffset ( ) ; java . lang . String value = type . formatValue ( offset ) ; java . time . ZoneOffset val1 = type . parse ( value ) ; "<AssertPlaceHolder>" ; } parse ( java . lang . String ) { return baseType . parse ( value ) ; } | org . junit . Assert . assertEquals ( offset , val1 ) |
testAndFT ( ) { org . openscience . cdk . isomorphism . matchers . Expr expr = new org . openscience . cdk . isomorphism . matchers . Expr ( AND , new org . openscience . cdk . isomorphism . matchers . Expr ( FALSE ) , new org . openscience . cdk . isomorphism . matchers . Expr ( TRUE ) ) ; org . openscience . cdk . interfaces . IAtom atom = mock ( org . openscience . cdk . interfaces . IAtom . class ) ; "<AssertPlaceHolder>" ; } matches ( org . openscience . cdk . interfaces . IAtomContainer ) { return matches ( atomContainer , true ) ; } | org . junit . Assert . assertFalse ( expr . matches ( atom ) ) |
testGetS3KeyPrefixNoDataVersionSpecifiedLatestDataVersionExistsCreateNewVersionIsTrue ( ) { businessObjectDataServiceTestHelper . createDatabaseEntitiesForGetS3KeyPrefixTesting ( true ) ; java . util . List < org . finra . herd . model . api . xml . SchemaColumn > testPartitionColumns = schemaColumnDaoTestHelper . getTestPartitionColumns ( ) ; java . lang . String testPartitionKey = testPartitionColumns . get ( 0 ) . getName ( ) ; java . util . List < org . finra . herd . model . api . xml . SchemaColumn > testSubPartitionColumns = testPartitionColumns . subList ( 1 , ( ( org . finra . herd . service . SUBPARTITION_VALUES . size ( ) ) + 1 ) ) ; org . finra . herd . model . api . xml . S3KeyPrefixInformation resultS3KeyPrefixInformation = storageUnitService . getS3KeyPrefix ( new org . finra . herd . model . api . xml . BusinessObjectDataKey ( NAMESPACE , BDEF_NAME , FORMAT_USAGE_CODE , FORMAT_FILE_TYPE_CODE , FORMAT_VERSION , PARTITION_VALUE , SUBPARTITION_VALUES , null ) , testPartitionKey , org . finra . herd . service . STORAGE_NAME , true ) ; java . lang . String expectedS3KeyPrefix = getExpectedS3KeyPrefix ( org . finra . herd . service . NAMESPACE , org . finra . herd . service . DATA_PROVIDER_NAME , org . finra . herd . service . BDEF_NAME , org . finra . herd . service . FORMAT_USAGE_CODE , org . finra . herd . service . FORMAT_FILE_TYPE_CODE , org . finra . herd . service . FORMAT_VERSION , testPartitionKey , org . finra . herd . service . PARTITION_VALUE , testSubPartitionColumns . toArray ( new org . finra . herd . model . api . xml . SchemaColumn [ testSubPartitionColumns . size ( ) ] ) , org . finra . herd . service . SUBPARTITION_VALUES . toArray ( new java . lang . String [ org . finra . herd . service . SUBPARTITION_VALUES . size ( ) ] ) , ( ( DATA_VERSION ) + 1 ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return org . finra . herd . service . helper . NotificationMessageInMemoryQueue . QUEUE . get ( ) . size ( ) ; } | org . junit . Assert . assertEquals ( new org . finra . herd . model . api . xml . S3KeyPrefixInformation ( expectedS3KeyPrefix ) , resultS3KeyPrefixInformation ) |
make512Safe_empty ( ) { "<AssertPlaceHolder>" ; } make512Safe ( java . lang . StringBuffer ) { return org . eclipse . xtext . util . MergeableManifest . make512Safe ( lines , org . eclipse . xtext . util . MergeableManifest . LINEBREAK ) ; } | org . junit . Assert . assertEquals ( "" , make512Safe ( "" ) ) |
testIsTrue5 ( ) { org . apache . commons . lang3 . Validate . isTrue ( true , "MSG" , 7.4 ) ; try { org . apache . commons . lang3 . Validate . isTrue ( false , "MSG" , 7.4 ) ; org . junit . Assert . fail ( "Expecting<sp>IllegalArgumentException" ) ; } catch ( java . lang . IllegalArgumentException ex ) { "<AssertPlaceHolder>" ; } } getMessage ( ) { return getMessage ( Locale . US ) ; } | org . junit . Assert . assertEquals ( "MSG" , ex . getMessage ( ) ) |
testExecution ( ) { org . eclipse . tracecompass . lttng2 . ust . core . trace . LttngUstTrace trace = org . eclipse . tracecompass . lttng2 . ust . core . tests . shared . LttngUstTestTraceUtils . getTrace ( org . eclipse . tracecompass . lttng2 . ust . core . tests . analysis . debuginfo . UstDebugInfoAnalysisModuleTest . REAL_TEST_TRACE ) ; executeModule ( trace ) ; org . eclipse . tracecompass . statesystem . core . ITmfStateSystem ss = fModule . getStateSystem ( ) ; "<AssertPlaceHolder>" ; org . eclipse . tracecompass . lttng2 . ust . core . tests . shared . LttngUstTestTraceUtils . dispose ( org . eclipse . tracecompass . lttng2 . ust . core . tests . analysis . debuginfo . UstDebugInfoAnalysisModuleTest . REAL_TEST_TRACE ) ; } getStateSystem ( ) { throw new java . lang . UnsupportedOperationException ( "No<sp>state<sp>system<sp>here..." ) ; } | org . junit . Assert . assertNotNull ( ss ) |
testGetStateTypeFromSelfLink ( ) { java . lang . String selfLink = "/resources/kubernetes-pods/376fdq673" ; java . lang . Class < ? extends com . vmware . admiral . compute . kubernetes . service . BaseKubernetesState > expectedClass = com . vmware . admiral . compute . kubernetes . service . PodService . PodState . class ; java . lang . Class < ? extends com . vmware . admiral . compute . kubernetes . service . BaseKubernetesState > actualClass = com . vmware . admiral . compute . content . kubernetes . KubernetesUtil . getStateTypeFromSelfLink ( selfLink ) ; "<AssertPlaceHolder>" ; } getStateTypeFromSelfLink ( java . lang . String ) { java . lang . Class < ? extends com . vmware . photon . controller . model . resources . ResourceState > resourceStateClass = com . vmware . admiral . compute . container . CompositeComponentRegistry . metaByStateLink ( selfLink ) . stateClass ; return com . vmware . admiral . compute . content . kubernetes . KubernetesUtil . fromResourceStateToBaseKubernetesState ( resourceStateClass ) ; } | org . junit . Assert . assertEquals ( expectedClass , actualClass ) |
testMap12 ( ) { final java . util . concurrent . atomic . AtomicBoolean accessed = new java . util . concurrent . atomic . AtomicBoolean ( false ) ; org . stjs . javascript . functions . Function3 < java . lang . Integer , java . lang . Long , org . stjs . javascript . Array < java . lang . Integer > , java . lang . Boolean > callbackfn = new org . stjs . javascript . functions . Function3 < java . lang . Integer , java . lang . Long , org . stjs . javascript . Array < java . lang . Integer > , java . lang . Boolean > ( ) { @ org . stjs . javascript . Override public org . stjs . javascript . Boolean $invoke ( java . lang . Integer val , java . lang . Long idx , org . stjs . javascript . Array < java . lang . Integer > obj ) { if ( idx > 0 ) { accessed . set ( true ) ; } if ( idx == 0 ) { throw new java . lang . Error ( "Exception<sp>occurred<sp>in<sp>callbackfn" ) ; } return true ; } } ; org . stjs . javascript . Array < java . lang . Integer > obj = new org . stjs . javascript . Array ( 20 ) ; obj . $set ( 0 , 11 ) ; obj . $set ( 4 , 10 ) ; obj . $set ( 10 , 8 ) ; try { obj . map ( callbackfn ) ; throw new java . lang . AssertionError ( "This<sp>point<sp>should<sp>not<sp>be<sp>reached" ) ; } catch ( java . lang . Error e ) { "<AssertPlaceHolder>" ; } } get ( ) { return this ; } | org . junit . Assert . assertFalse ( accessed . get ( ) ) |
testGetNotEqual ( ) { org . openscience . smsd . helper . BinaryTree instance = new org . openscience . smsd . helper . BinaryTree ( 15 ) ; org . openscience . smsd . helper . BinaryTree equal = new org . openscience . smsd . helper . BinaryTree ( 15 ) ; org . openscience . smsd . helper . BinaryTree notEqual = new org . openscience . smsd . helper . BinaryTree ( 10 ) ; instance . setEqual ( equal ) ; instance . setNotEqual ( notEqual ) ; org . openscience . smsd . helper . BinaryTree expResult = notEqual ; org . openscience . smsd . helper . BinaryTree result = instance . getNotEqual ( ) ; "<AssertPlaceHolder>" ; } getNotEqual ( ) { return notEqual ; } | org . junit . Assert . assertEquals ( expResult , result ) |
t40_emptyElement ( ) { io . webfolder . ui4j . api . dom . Element div = io . webfolder . ui4j . test . ElementTest . document . getBody ( ) . query ( "#invalid-id" ) ; "<AssertPlaceHolder>" ; } query ( java . lang . String ) { java . lang . String escapedSelector = selector . replace ( '\'' , '"' ) ; netscape . javascript . JSObject result = ( ( netscape . javascript . JSObject ) ( engine . getEngine ( ) . executeScript ( java . lang . String . format ( "Sizzle('%s')" , escapedSelector ) ) ) ) ; int length = ( ( int ) ( result . getMember ( "length" ) ) ) ; if ( length <= 0 ) { return null ; } else { org . w3c . dom . Node found = ( ( org . w3c . dom . Node ) ( result . getSlot ( 0 ) ) ) ; io . webfolder . ui4j . api . dom . Element element = ( ( io . webfolder . ui4j . webkit . browser . WebKitPageContext ) ( context ) ) . createElement ( found , document , engine ) ; if ( element == null ) { return null ; } else { return element ; } } } | org . junit . Assert . assertNull ( div ) |
testPLIOInt ( ) { java . io . RandomAccessFile file = null ; try { file = new java . io . RandomAccessFile ( "src/test/resources/nom/tam/image/comp/bare/test100Data32.bin" , "r" ) ; byte [ ] bytes = new byte [ ( ( int ) ( file . length ( ) ) ) ] ; file . read ( bytes ) ; int [ ] intArray = new int [ ( bytes . length ) / 4 ] ; java . nio . IntBuffer intBuffer = java . nio . ByteBuffer . wrap ( bytes ) . asIntBuffer ( ) ; intBuffer . get ( intArray ) ; for ( int index = 0 ; index < ( intArray . length ) ; index ++ ) { intArray [ index ] = ( intArray [ index ] ) & 32767 ; } java . nio . ByteBuffer compressed = java . nio . ByteBuffer . wrap ( new byte [ ( ( int ) ( file . length ( ) ) ) * 10 ] ) ; new nom . tam . fits . compression . algorithm . plio . PLIOCompress . IntPLIOCompressor ( ) . compress ( java . nio . IntBuffer . wrap ( intArray ) , compressed ) ; compressed . rewind ( ) ; java . nio . IntBuffer px_dst = java . nio . IntBuffer . allocate ( intArray . length ) ; new nom . tam . fits . compression . algorithm . plio . PLIOCompress . IntPLIOCompressor ( ) . decompress ( compressed , px_dst ) ; "<AssertPlaceHolder>" ; } finally { nom . tam . util . SafeClose . close ( file ) ; } } decompress ( java . nio . ByteBuffer , java . nio . ByteBuffer ) { if ( nom . tam . image . compression . tile . TileCompressorProviderTest . exceptionInMethod ) { throw new java . lang . RuntimeException ( "could<sp>not<sp>decompress" ) ; } } | org . junit . Assert . assertArrayEquals ( intArray , px_dst . array ( ) ) |
testIsSafeLocationSafe ( ) { world . bentobox . bentobox . managers . IslandsManager manager = new world . bentobox . bentobox . managers . IslandsManager ( plugin ) ; "<AssertPlaceHolder>" ; } isSafeLocation ( org . bukkit . Location ) { if ( ( l . getWorld ( ) ) == null ) { return false ; } org . bukkit . block . Block ground = l . getBlock ( ) . getRelative ( BlockFace . DOWN ) ; org . bukkit . block . Block space1 = l . getBlock ( ) ; org . bukkit . block . Block space2 = l . getBlock ( ) . getRelative ( BlockFace . UP ) ; if ( ! ( ground . getType ( ) . isSolid ( ) ) ) { return false ; } if ( ( space1 . isLiquid ( ) ) && ( ( space2 . isLiquid ( ) ) || ( plugin . getIWM ( ) . isWaterNotSafe ( l . getWorld ( ) ) ) ) ) { return false ; } if ( ( ( ( ( ( ( space1 . getType ( ) ) == ( org . bukkit . Material . NETHER_PORTAL ) ) || ( ( ground . getType ( ) ) == ( org . bukkit . Material . NETHER_PORTAL ) ) ) || ( ( space2 . getType ( ) ) == ( org . bukkit . Material . NETHER_PORTAL ) ) ) || ( ( space1 . getType ( ) ) == ( org . bukkit . Material . END_PORTAL ) ) ) || ( ( ground . getType ( ) ) == ( org . bukkit . Material . END_PORTAL ) ) ) || ( ( space2 . getType ( ) ) == ( org . bukkit . Material . END_PORTAL ) ) ) { return false ; } if ( ( ( ground . getType ( ) . equals ( Material . LAVA ) ) || ( space1 . getType ( ) . equals ( Material . LAVA ) ) ) || ( space2 . getType ( ) . equals ( Material . LAVA ) ) ) { return false ; } org . bukkit . block . data . BlockData bd = ground . getBlockData ( ) ; if ( bd instanceof org . bukkit . block . data . Openable ) { return ! ( ( ( org . bukkit . block . data . Openable ) ( bd ) ) . isOpen ( ) ) ; } if ( ( ( ( ( ground . getType ( ) . equals ( Material . CACTUS ) ) || ( ground . getType ( ) . toString ( ) . contains ( "BOAT" ) ) ) || ( ground . getType ( ) . toString ( ) . contains ( "FENCE" ) ) ) || ( ground . getType ( ) . equals ( Material . SIGN ) ) ) || ( ground . getType ( ) . equals ( Material . WALL_SIGN ) ) ) { return false ; } return ( ( ( ! ( space1 . getType ( ) . isSolid ( ) ) ) || ( space1 . getType ( ) . equals ( Material . SIGN ) ) ) || ( space1 . getType ( ) . equals ( Material . WALL_SIGN ) ) ) && ( ( ( ! ( space2 . getType ( ) . isSolid ( ) ) ) || ( space2 . getType ( ) . equals ( Material . SIGN ) ) ) || ( space2 . getType ( ) . equals ( Material . WALL_SIGN ) ) ) ; } | org . junit . Assert . assertTrue ( manager . isSafeLocation ( location ) ) |
createDynamicModule ( ) { de . devsurf . injection . guice . scanner . StartupModule startup = de . devsurf . injection . guice . scanner . StartupModule . create ( de . devsurf . injection . guice . scanner . asm . ASMClasspathScanner . class , de . devsurf . injection . guice . scanner . PackageFilter . create ( de . devsurf . injection . guice . test . aop . inherited . InheritedInterceptorTests . class ) ) ; startup . addFeature ( de . devsurf . injection . guice . aop . feature . InterceptorFeature . class ) ; com . google . inject . Injector injector = com . google . inject . Guice . createInjector ( startup ) ; "<AssertPlaceHolder>" ; } addFeature ( de . devsurf . injection . guice . scanner . features . ScannerFeature ) { _collector . addScannerFeature ( listener ) ; } | org . junit . Assert . assertNotNull ( injector ) |
givenUsersInDB_WhenFindAllWithQueryAnnotation_ThenReturnCollectionWithActiveUsers ( ) { com . baeldung . domain . user . User user1 = new com . baeldung . domain . user . User ( ) ; user1 . setName ( USER_NAME_ADAM ) ; user1 . setEmail ( USER_EMAIL ) ; user1 . setStatus ( ACTIVE_STATUS ) ; userRepository . save ( user1 ) ; com . baeldung . domain . user . User user2 = new com . baeldung . domain . user . User ( ) ; user2 . setName ( USER_NAME_ADAM ) ; user2 . setEmail ( USER_EMAIL2 ) ; user2 . setStatus ( ACTIVE_STATUS ) ; userRepository . save ( user2 ) ; com . baeldung . domain . user . User user3 = new com . baeldung . domain . user . User ( ) ; user3 . setName ( USER_NAME_ADAM ) ; user3 . setEmail ( USER_EMAIL3 ) ; user3 . setStatus ( INACTIVE_STATUS ) ; userRepository . save ( user3 ) ; com . baeldung . dao . repositories . Collection < com . baeldung . domain . user . User > allActiveUsers = userRepository . findAllActiveUsers ( ) ; "<AssertPlaceHolder>" . isEqualTo ( 2 ) ; } size ( ) { return elements . size ( ) ; } | org . junit . Assert . assertThat ( allActiveUsers . size ( ) ) |
testMultipleRegistration ( ) { org . apache . hadoop . ipc . RefreshRegistry . defaultRegistry ( ) . register ( "sharedId" , org . apache . hadoop . TestGenericRefresh . firstHandler ) ; org . apache . hadoop . ipc . RefreshRegistry . defaultRegistry ( ) . register ( "sharedId" , org . apache . hadoop . TestGenericRefresh . secondHandler ) ; org . apache . hadoop . hdfs . tools . DFSAdmin admin = new org . apache . hadoop . hdfs . tools . DFSAdmin ( org . apache . hadoop . TestGenericRefresh . config ) ; java . lang . String [ ] args = new java . lang . String [ ] { "-refresh" , "localhost:" + ( org . apache . hadoop . TestGenericRefresh . NNPort ) , "sharedId" , "one" } ; int exitCode = admin . run ( args ) ; "<AssertPlaceHolder>" ; org . mockito . Mockito . verify ( org . apache . hadoop . TestGenericRefresh . firstHandler ) . handleRefresh ( "sharedId" , new java . lang . String [ ] { "one" } ) ; org . mockito . Mockito . verify ( org . apache . hadoop . TestGenericRefresh . secondHandler ) . handleRefresh ( "sharedId" , new java . lang . String [ ] { "one" } ) ; org . apache . hadoop . ipc . RefreshRegistry . defaultRegistry ( ) . unregisterAll ( "sharedId" ) ; } run ( java . lang . String [ ] ) { final long startTime = org . apache . hadoop . util . Time . now ( ) ; final org . apache . hadoop . conf . Configuration conf = getConf ( ) ; try { org . apache . hadoop . hdfs . server . balancer . Balancer . checkReplicationPolicyCompatibility ( conf ) ; final java . util . List < java . net . URI > namenodes = org . apache . hadoop . hdfs . DFSUtil . getNsServiceRpcUris ( conf ) ; return org . apache . hadoop . hdfs . server . balancer . Balancer . run ( namenodes , org . apache . hadoop . hdfs . server . balancer . Balancer . Cli . parse ( args ) , conf ) ; } catch ( java . io . IOException | java . net . URISyntaxException e ) { System . out . println ( ( e + ".<sp>Exiting<sp>..." ) ) ; return ExitStatus . IO_EXCEPTION . getExitCode ( ) ; } catch ( java . lang . InterruptedException e ) { System . out . println ( ( e + ".<sp>Exiting<sp>..." ) ) ; return ExitStatus . INTERRUPTED . getExitCode ( ) ; } finally { System . out . format ( "%-24s<sp>" , java . text . DateFormat . getDateTimeInstance ( ) . format ( new java . util . Date ( ) ) ) ; System . out . println ( ( "Balancing<sp>took<sp>" + ( org . apache . hadoop . hdfs . server . balancer . Balancer . time2Str ( ( ( org . apache . hadoop . util . Time . now ( ) ) - startTime ) ) ) ) ) ; } } | org . junit . Assert . assertEquals ( ( - 1 ) , exitCode ) |
testLinesBetweenStmts ( ) { java . io . File f = new java . io . File ( "src/test/resources/multipleLinesBetweenStmt.txt" ) ; org . walkmod . javalang . ast . CompilationUnit cu = org . walkmod . javalang . ASTManager . parse ( f ) ; "<AssertPlaceHolder>" ; System . out . println ( cu . toString ( ) ) ; } parse ( java . io . File ) { return org . walkmod . javalang . ASTManager . parse ( file , "UTF-8" ) ; } | org . junit . Assert . assertNotNull ( cu ) |
getName ( ) { "<AssertPlaceHolder>" ; } getName ( ) { org . junit . Assert . assertEquals ( cache . getName ( ) , imcache . getName ( ) ) ; } | org . junit . Assert . assertEquals ( cache . getName ( ) , imcache . getName ( ) ) |
getLocalName ( ) { java . lang . String expected = "expected" ; when ( this . reader . getLocalName ( ) ) . thenReturn ( expected ) ; java . lang . String result = this . filter . getLocalName ( ) ; "<AssertPlaceHolder>" ; } getLocalName ( ) { java . lang . String expected = "expected" ; when ( this . reader . getLocalName ( ) ) . thenReturn ( expected ) ; java . lang . String result = this . filter . getLocalName ( ) ; org . junit . Assert . assertSame ( expected , result ) ; } | org . junit . Assert . assertSame ( expected , result ) |
testDocSearch_fetchMoreIterationLimit ( ) { org . kuali . rice . kew . api . document . search . DocumentSearchCriteria . Builder criteria = DocumentSearchCriteria . Builder . create ( ) ; criteria . setDocumentTypeName ( "SearchDocType" ) ; int fetchIterationLimit = docSearchService . getFetchMoreIterationLimit ( ) ; "<AssertPlaceHolder>" ; } getFetchMoreIterationLimit ( ) { return docSearchDao . getFetchMoreIterationLimit ( ) ; } | org . junit . Assert . assertEquals ( 10 , fetchIterationLimit ) |
test_CayenneExp_Bare ( ) { javax . ws . rs . core . Response r1 = target ( "/e2_Bare" ) . queryParam ( "cayenneExp" , urlEnc ( "name<sp>=<sp>'yyy'" ) ) . request ( ) . get ( ) ; "<AssertPlaceHolder>" ; } get ( ) { return new io . agrest . runtime . processor . select . SelectProcessorFactory ( stages ) ; } | org . junit . Assert . assertNotNull ( r1 ) |
testNoCustomResolver ( ) { org . apache . cxf . jaxrs . provider . ProviderFactory pf = org . apache . cxf . jaxrs . provider . ServerProviderFactory . getInstance ( ) ; pf . registerUserProvider ( new org . apache . cxf . jaxrs . JAXBContextProvider ( ) ) ; pf . registerUserProvider ( new org . apache . cxf . jaxrs . JAXBContextProvider2 ( ) ) ; org . apache . cxf . message . Message message = prepareMessage ( "text/xml+c" , null ) ; javax . ws . rs . ext . ContextResolver < javax . xml . bind . JAXBContext > cr = pf . createContextResolver ( javax . xml . bind . JAXBContext . class , message ) ; "<AssertPlaceHolder>" ; } createContextResolver ( java . lang . reflect . Type , org . apache . cxf . message . Message ) { if ( genericType instanceof java . lang . reflect . ParameterizedType ) { return org . apache . cxf . jaxrs . provider . ProviderFactory . getInstance ( m ) . createContextResolver ( ( ( java . lang . reflect . ParameterizedType ) ( genericType ) ) . getActualTypeArguments ( ) [ 0 ] , m ) ; } else if ( m != null ) { return org . apache . cxf . jaxrs . provider . ProviderFactory . getInstance ( m ) . createContextResolver ( genericType , m ) ; } else { return null ; } } | org . junit . Assert . assertNull ( cr ) |
max ( ) { final java . lang . String sparql = "SELECT<sp>(max(?price)<sp>as<sp>?maxPrice)<sp>{<sp>" + ( "?item<sp><urn:price><sp>?price<sp>.<sp>" + "}" ) ; final org . eclipse . rdf4j . model . ValueFactory vf = org . eclipse . rdf4j . model . impl . SimpleValueFactory . getInstance ( ) ; final java . util . Collection < org . eclipse . rdf4j . model . Statement > statements = com . google . common . collect . Sets . newHashSet ( vf . createStatement ( vf . createIRI ( "urn:apple" ) , vf . createIRI ( "urn:price" ) , vf . createLiteral ( 2.5 ) ) , vf . createStatement ( vf . createIRI ( "urn:gum" ) , vf . createIRI ( "urn:price" ) , vf . createLiteral ( 0.99 ) ) , vf . createStatement ( vf . createIRI ( "urn:sandwich" ) , vf . createIRI ( "urn:price" ) , vf . createLiteral ( 4.99 ) ) ) ; final java . lang . String pcjId = loadDataAndCreateQuery ( sparql , statements ) ; final org . eclipse . rdf4j . query . impl . MapBindingSet expectedResult = new org . eclipse . rdf4j . query . impl . MapBindingSet ( ) ; expectedResult . addBinding ( "maxPrice" , vf . createLiteral ( 4.99 ) ) ; final org . apache . rya . api . model . VisibilityBindingSet result = readLastResult ( pcjId ) ; "<AssertPlaceHolder>" ; } readLastResult ( java . lang . String ) { requireNonNull ( pcjId ) ; org . apache . rya . api . model . VisibilityBindingSet result = null ; try ( final org . apache . kafka . clients . consumer . KafkaConsumer < java . lang . String , org . apache . rya . api . model . VisibilityBindingSet > consumer = makeConsumer ( pcjId ) ) { final org . apache . kafka . clients . consumer . ConsumerRecords < java . lang . String , org . apache . rya . api . model . VisibilityBindingSet > records = consumer . poll ( 5000 ) ; final java . util . Iterator < org . apache . kafka . clients . consumer . ConsumerRecord < java . lang . String , org . apache . rya . api . model . VisibilityBindingSet > > recordIterator = records . iterator ( ) ; while ( recordIterator . hasNext ( ) ) { result = recordIterator . next ( ) . value ( ) ; } } return result ; } | org . junit . Assert . assertEquals ( expectedResult , result ) |
should_find_a_wall ( ) { java . lang . String wallName = "wallName" ; fr . norad . visuwall . core . persistence . dao . WallDAO wallService = org . mockito . Mockito . mock ( fr . norad . visuwall . core . persistence . dao . WallDAO . class ) ; fr . norad . visuwall . core . business . process . WallProcess wallProcess = org . mockito . Mockito . mock ( fr . norad . visuwall . core . business . process . WallProcess . class ) ; fr . norad . visuwall . core . persistence . entity . Wall wall = new fr . norad . visuwall . core . persistence . entity . Wall ( wallName ) ; when ( wallService . update ( wall ) ) . thenReturn ( wall ) ; wallHolderService = new fr . norad . visuwall . core . business . service . WallHolderService ( ) ; wallHolderService . wallDAO = wallService ; wallHolderService . wallProcess = wallProcess ; wallHolderService . init ( ) ; wallHolderService . update ( wall ) ; fr . norad . visuwall . core . persistence . entity . Wall findwall = wallHolderService . find ( wallName ) ; "<AssertPlaceHolder>" ; } find ( java . lang . String ) { javax . persistence . Query query = entityManager . createNamedQuery ( Wall . QUERY_WALLBYNAME ) ; query . setParameter ( Wall . QUERY_PARAM_NAME , wallName ) ; fr . norad . visuwall . core . persistence . entity . Wall wall = ( ( fr . norad . visuwall . core . persistence . entity . Wall ) ( query . getSingleResult ( ) ) ) ; for ( fr . norad . visuwall . core . persistence . entity . SoftwareAccess softwareInfo : wall . getSoftwareAccesses ( ) ) { softwareInfo . getProjectIds ( ) ; softwareInfo . getViewNames ( ) ; } return wall ; } | org . junit . Assert . assertNotNull ( findwall ) |
testAddInv ( ) { de . rub . nds . tlsattacker . core . crypto . ec_ . FieldElementF2m tmp = ( ( de . rub . nds . tlsattacker . core . crypto . ec_ . FieldElementF2m ) ( p4 . addInv ( ) ) ) ; "<AssertPlaceHolder>" ; } addInv ( ) { java . math . BigInteger tmp = this . getData ( ) . negate ( ) ; tmp = tmp . mod ( this . getModulus ( ) ) ; return new de . rub . nds . tlsattacker . core . crypto . ec_ . FieldElementFp ( tmp , this . getModulus ( ) ) ; } | org . junit . Assert . assertEquals ( p4 , tmp ) |
iterateImagesND ( ) { final org . eclipse . january . dataset . ILazyDataset lz = org . eclipse . january . dataset . Random . lazyRand ( 64 , 64 , 100 , 100 ) ; final org . eclipse . january . dataset . PositionIterator it = new org . eclipse . january . dataset . PositionIterator ( new int [ ] { 64 , 64 } ) ; while ( it . hasNext ( ) ) { int [ ] pos = it . getPos ( ) ; org . eclipse . january . dataset . Slice [ ] slice = new org . eclipse . january . dataset . Slice [ lz . getRank ( ) ] ; for ( int i = 0 ; i < ( pos . length ) ; i ++ ) { slice [ i ] = new org . eclipse . january . dataset . Slice ( pos [ i ] , ( ( pos [ i ] ) + 1 ) ) ; } org . eclipse . january . dataset . IDataset image = lz . getSlice ( slice ) ; image . squeeze ( ) ; "<AssertPlaceHolder>" ; } } getShape ( ) { return shape ; } | org . junit . Assert . assertTrue ( java . util . Arrays . equals ( new int [ ] { 100 , 100 } , image . getShape ( ) ) ) |
testArrayListFactoryWithFirstElement ( ) { org . jparsec . ListFactory < java . lang . Integer > intListFactory = org . jparsec . ListFactory . arrayListFactoryWithFirstElement ( 1 ) ; java . util . ArrayList < java . lang . Integer > list = ( ( java . util . ArrayList < java . lang . Integer > ) ( intListFactory . newList ( ) ) ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( java . util . Arrays . asList ( 1 ) , list ) |
testToAbsolutePerformance ( ) { org . apache . catalina . connector . Request req = new org . apache . catalina . connector . TesterMockRequest ( ) ; org . apache . catalina . connector . Response resp = new org . apache . catalina . connector . Response ( ) ; resp . setRequest ( req ) ; long start = java . lang . System . currentTimeMillis ( ) ; for ( int i = 0 ; i < 100000 ; i ++ ) { resp . toAbsolute ( "bar.html" ) ; } long homebrew = ( java . lang . System . currentTimeMillis ( ) ) - start ; start = java . lang . System . currentTimeMillis ( ) ; for ( int i = 0 ; i < 100000 ; i ++ ) { java . net . URI base = java . net . URI . create ( "http://localhost:8080/level1/level2/foo.html" ) ; base . resolve ( java . net . URI . create ( "bar.html" ) ) . toASCIIString ( ) ; } long uri = ( java . lang . System . currentTimeMillis ( ) ) - start ; System . out . println ( ( ( ( ( "Current<sp>'home-brew':<sp>" + homebrew ) + "ms,<sp>Using<sp>URI:<sp>" ) + uri ) + "ms" ) ) ; "<AssertPlaceHolder>" ; } create ( boolean ) { if ( incrementCounter ) size . incrementAndGet ( ) ; org . apache . tomcat . jdbc . pool . PooledConnection con = new org . apache . tomcat . jdbc . pool . PooledConnection ( getPoolProperties ( ) , this ) ; return con ; } | org . junit . Assert . assertTrue ( ( homebrew < uri ) ) |
testGetProjectsMY_PARTICIPATED_PROJECTS ( ) { type = org . sagebionetworks . repo . model . ProjectListType . MY_PARTICIPATED_PROJECTS ; org . sagebionetworks . reflection . model . PaginatedResults < org . sagebionetworks . repo . model . ProjectHeader > results = userProfileManager . getProjects ( caller , userToGetFor , teamToFetch , type , sortColumn , sortDirection , limit , offset ) ; "<AssertPlaceHolder>" ; verify ( mockAuthorizationManager , times ( 2 ) ) . getAccessibleProjectIds ( anySetOf ( org . sagebionetworks . repo . manager . Long . class ) ) ; java . util . Set < java . lang . Long > expectedUserToGetGroups = org . sagebionetworks . repo . manager . UserProfileManagerImpl . getGroupsMinusPublic ( userToGetFor . getGroups ( ) ) ; verify ( mockAuthorizationManager ) . getAccessibleProjectIds ( expectedUserToGetGroups ) ; verify ( mockAuthorizationManager ) . getAccessibleProjectIds ( caller . getGroups ( ) ) ; java . util . Set < java . lang . Long > expectedProjectIds = com . google . common . collect . Sets . intersection ( visibleProjectsOne , visibleProjectsTwo ) ; verify ( mockNodeDao ) . getProjectHeaders ( caller . getId ( ) , expectedProjectIds , type , sortColumn , sortDirection , limit , offset ) ; } getProjects ( org . sagebionetworks . repo . model . UserInfo , org . sagebionetworks . repo . model . UserInfo , org . sagebionetworks . repo . model . Team , org . sagebionetworks . repo . model . ProjectListType , org . sagebionetworks . repo . model . ProjectListSortColumn , org . sagebionetworks . repo . model . entity . query . SortDirection , java . lang . Long , java . lang . Long ) { projectIdsToFilterBy = userToGetAccessibleProjectIds ; } java . util . List < org . sagebionetworks . repo . model . ProjectHeader > page = nodeDao . getProjectHeaders ( caller . getId ( ) , projectIdsToFilterBy , type , sortColumn , sortDirection , limit , offset ) ; return org . sagebionetworks . reflection . model . PaginatedResults . createWithLimitAndOffset ( page , limit , offset ) ; } | org . junit . Assert . assertNotNull ( results ) |
testEmptyCollection ( ) { configure ( "{source:<sp>{<sp>content:<sp>{<sp>value:<sp>[]<sp>}<sp>},<sp>extractor<sp>:<sp>{<sp>json:<sp>{}<sp>},<sp>loader:<sp>{<sp>test:<sp>{}<sp>}<sp>}" ) ; proc . execute ( ) ; "<AssertPlaceHolder>" ; } getResult ( ) { return super . getResult ( ) ; } | org . junit . Assert . assertEquals ( 0 , getResult ( ) . size ( ) ) |
testTwoPackets ( ) { for ( int i = 1 ; i < ( ( ( software . amazon . awssdk . services . s3 . checksums . ChecksumValidatingPublisherTest . TEST_DATA_SIZE ) + ( software . amazon . awssdk . services . s3 . checksums . ChecksumValidatingPublisherTest . CHECKSUM_SIZE ) ) - 1 ) ; i ++ ) { final software . amazon . awssdk . services . s3 . checksums . ChecksumValidatingPublisherTest . TestPublisher driver = new software . amazon . awssdk . services . s3 . checksums . ChecksumValidatingPublisherTest . TestPublisher ( ) ; final software . amazon . awssdk . services . s3 . checksums . ChecksumValidatingPublisherTest . TestSubscriber s = new software . amazon . awssdk . services . s3 . checksums . ChecksumValidatingPublisherTest . TestSubscriber ( java . util . Arrays . copyOfRange ( software . amazon . awssdk . services . s3 . checksums . ChecksumValidatingPublisherTest . testData , 0 , software . amazon . awssdk . services . s3 . checksums . ChecksumValidatingPublisherTest . TEST_DATA_SIZE ) ) ; final software . amazon . awssdk . services . s3 . checksums . ChecksumValidatingPublisher p = new software . amazon . awssdk . services . s3 . checksums . ChecksumValidatingPublisher ( driver , new software . amazon . awssdk . core . checksums . Md5Checksum ( ) , ( ( software . amazon . awssdk . services . s3 . checksums . ChecksumValidatingPublisherTest . TEST_DATA_SIZE ) + ( software . amazon . awssdk . services . s3 . checksums . ChecksumValidatingPublisherTest . CHECKSUM_SIZE ) ) ) ; p . subscribe ( s ) ; driver . doOnNext ( java . nio . ByteBuffer . wrap ( software . amazon . awssdk . services . s3 . checksums . ChecksumValidatingPublisherTest . testData , 0 , i ) ) ; driver . doOnNext ( java . nio . ByteBuffer . wrap ( software . amazon . awssdk . services . s3 . checksums . ChecksumValidatingPublisherTest . testData , i , ( ( ( software . amazon . awssdk . services . s3 . checksums . ChecksumValidatingPublisherTest . TEST_DATA_SIZE ) + ( software . amazon . awssdk . services . s3 . checksums . ChecksumValidatingPublisherTest . CHECKSUM_SIZE ) ) - i ) ) ) ; driver . doOnComplete ( ) ; "<AssertPlaceHolder>" ; } } hasCompleted ( ) { return completed ; } | org . junit . Assert . assertTrue ( s . hasCompleted ( ) ) |
testGetAssetTagNamesNotContainsAllTagNames ( ) { java . lang . String assetTagName1 = com . liferay . portal . kernel . test . util . RandomTestUtil . randomString ( ) ; java . lang . String assetTagName2 = com . liferay . portal . kernel . test . util . RandomTestUtil . randomString ( ) ; com . liferay . asset . publisher . util . test . AssetPublisherUtilTest . AssetQueryRule assetQueryRule = new com . liferay . asset . publisher . util . test . AssetPublisherUtilTest . AssetQueryRule ( false , true , "assetTags" , new java . lang . String [ ] { assetTagName1 , assetTagName2 } ) ; java . util . List < com . liferay . asset . publisher . util . test . AssetPublisherUtilTest . AssetQueryRule > assetQueryRules = new java . util . ArrayList ( ) ; assetQueryRules . add ( assetQueryRule ) ; javax . portlet . PortletPreferences portletPreferences = getAssetPublisherPortletPreferences ( assetQueryRules ) ; java . lang . String [ ] assetTagNames = _assetPublisherHelper . getAssetTagNames ( portletPreferences ) ; "<AssertPlaceHolder>" ; } toString ( net . fortuna . ical4j . model . Calendar ) { net . fortuna . ical4j . data . CalendarOutputter calendarOutputter = new net . fortuna . ical4j . data . CalendarOutputter ( ) ; net . fortuna . ical4j . model . ComponentList componentList = iCalCalendar . getComponents ( ) ; if ( componentList . isEmpty ( ) ) { calendarOutputter . setValidating ( false ) ; } com . liferay . portal . kernel . io . unsync . UnsyncStringWriter unsyncStringWriter = new com . liferay . portal . kernel . io . unsync . UnsyncStringWriter ( ) ; calendarOutputter . output ( iCalCalendar , unsyncStringWriter ) ; unsyncStringWriter . flush ( ) ; return unsyncStringWriter . toString ( ) ; } | org . junit . Assert . assertEquals ( java . util . Arrays . toString ( assetTagNames ) , 0 , assetTagNames . length ) |
referenceToFunctionInClasses ( ) { me . tomassetti . turin . parser . ast . TurinFile turinFile = new me . tomassetti . turin . parser . Parser ( ) . parse ( this . getClass ( ) . getResourceAsStream ( "/ref_to_function_in_classes.to" ) ) ; me . tomassetti . turin . compiler . Compiler instance = new me . tomassetti . turin . compiler . Compiler ( getResolverFor ( turinFile , com . google . common . collect . ImmutableList . of ( "src/test/resources/jars/javaparser-core-2.2.1.jar" ) , com . google . common . collect . ImmutableList . of ( tmpDir . getAbsolutePath ( ) ) ) , new me . tomassetti . turin . compiler . Compiler . Options ( ) ) ; java . util . List < me . tomassetti . turin . classloading . ClassFileDefinition > classFileDefinitions = instance . compile ( turinFile , new me . tomassetti . turin . resolvers . compiled . AbstractCompilerTest . MyErrorCollector ( ) ) ; "<AssertPlaceHolder>" ; } compile ( me . tomassetti . turin . compiler . TurinFile , me . tomassetti . turin . compiler . errorhandling . ErrorCollector ) { ResolverRegistry . INSTANCE . record ( turinFile , resolver ) ; return new me . tomassetti . turin . compiler . Compilation ( resolver , errorCollector ) . compile ( turinFile ) ; } | org . junit . Assert . assertEquals ( 1 , classFileDefinitions . size ( ) ) |
createdBeansAreCached ( ) { com . avanza . astrix . modules . ModulesConfigurer modulesConfigurer = new com . avanza . astrix . modules . ModulesConfigurer ( ) ; modulesConfigurer . register ( new com . avanza . astrix . modules . Module ( ) { @ com . avanza . astrix . modules . test . Override public void prepare ( com . avanza . astrix . modules . ModuleContext context ) { context . bind ( com . avanza . astrix . modules . test . ModulesTest . Ping . class , com . avanza . astrix . modules . test . ModulesTest . PingWithInternalDriver . class ) ; context . export ( com . avanza . astrix . modules . test . ModulesTest . Ping . class ) ; } } ) ; com . avanza . astrix . modules . Modules modules = modulesConfigurer . configure ( ) ; com . avanza . astrix . modules . test . ModulesTest . Ping ping1 = modules . getInstance ( com . avanza . astrix . modules . test . ModulesTest . Ping . class ) ; com . avanza . astrix . modules . test . ModulesTest . Ping ping2 = modules . getInstance ( com . avanza . astrix . modules . test . ModulesTest . Ping . class ) ; "<AssertPlaceHolder>" ; } getInstance ( java . lang . Class ) { return new com . avanza . astrix . modules . ModuleManager . CircularModuleDependenciesAwareCreation ( ) . get ( type ) ; } | org . junit . Assert . assertSame ( ping1 , ping2 ) |
testMarkPreserved_isCleared ( ) { remoteAdapter . markPreserved ( 3 ) ; remoteAdapter . clear ( ) ; "<AssertPlaceHolder>" ; } hasPreserved ( int ) { return ( ( preserved ) & ( 1 << index ) ) != 0 ; } | org . junit . Assert . assertFalse ( remoteAdapter . hasPreserved ( 3 ) ) |
tuple ( ) { org . jboss . hal . meta . AddressTemplate at = org . jboss . hal . meta . AddressTemplate . of ( "{a}/b=c" ) ; "<AssertPlaceHolder>" ; } getTemplate ( ) { return template ; } | org . junit . Assert . assertEquals ( "{a}/b=c" , at . getTemplate ( ) ) |
testGetFirstOnGap ( ) { io . quantumdb . core . versioning . Version first = io . quantumdb . core . migration . VersionTraverser . getFirst ( com . google . common . collect . Sets . newHashSet ( v2 , v4 ) ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( v2 , first ) |
testTriangle4 ( ) { java . lang . StringBuilder query = new java . lang . StringBuilder ( ) ; query . append ( "match<sp>" ) ; query . append ( "{class:TriangleV,<sp>as:<sp>friend1}" ) ; query . append ( "<sp>.out('TriangleE'){as:<sp>friend2,<sp>where:<sp>(uid<sp>=<sp>1)}" ) ; query . append ( "<sp>.out('TriangleE'){as:<sp>friend3}," ) ; query . append ( "{class:TriangleV,<sp>as:<sp>friend1}" ) ; query . append ( "<sp>.out('TriangleE'){as:<sp>friend3}" ) ; query . append ( "return<sp>$matches" ) ; java . util . List < ? > result = com . orientechnologies . orient . graph . sql . OMatchStatementExecutionTest . db . command ( new com . orientechnologies . orient . core . sql . OCommandSQL ( query . toString ( ) ) ) . execute ( ) ; "<AssertPlaceHolder>" ; } size ( ) { throw new java . lang . UnsupportedOperationException ( "Not<sp>implemented<sp>yet" ) ; } | org . junit . Assert . assertEquals ( 1 , result . size ( ) ) |
singletonThroughProvider ( ) { org . codejargon . feather . Feather feather = org . codejargon . feather . Feather . with ( ) ; javax . inject . Provider < org . codejargon . feather . SingletonTest . SingletonObj > provider = feather . provider ( org . codejargon . feather . SingletonTest . SingletonObj . class ) ; "<AssertPlaceHolder>" ; } provider ( java . lang . Class ) { return provider ( org . codejargon . feather . Key . of ( type ) , null ) ; } | org . junit . Assert . assertEquals ( provider . get ( ) , provider . get ( ) ) |
testRedisIsEmpty ( ) { java . util . Set < java . lang . String > result = jedis . keys ( "*" ) ; "<AssertPlaceHolder>" ; } size ( ) { return elements . size ( ) ; } | org . junit . Assert . assertEquals ( 0 , result . size ( ) ) |
whenIsPrineOfLong_shouldReturnFalseeIfNotPrime ( ) { boolean result = com . google . common . math . LongMath . isPrime ( 20L ) ; "<AssertPlaceHolder>" ; } isPrime ( int ) { return java . util . stream . IntStream . rangeClosed ( 2 , ( ( int ) ( java . lang . Math . sqrt ( x ) ) ) ) . allMatch ( ( n ) -> ( x % n ) != 0 ) ; } | org . junit . Assert . assertFalse ( result ) |
testMap ( ) { java . util . Map < java . lang . String , com . ctrip . xpipe . codec . Person > map = new java . util . HashMap ( ) ; map . put ( "a" , new com . ctrip . xpipe . codec . Person ( Person . SEX . FEMALE ) ) ; java . lang . String encode = JsonCodec . INSTANCE . encode ( map ) ; java . util . Map < java . lang . String , com . ctrip . xpipe . codec . Person > decode = JsonCodec . INSTANCE . decode ( encode , new com . ctrip . xpipe . api . codec . GenericTypeReference < java . util . Map < java . lang . String , com . ctrip . xpipe . codec . Person > > ( ) { } ) ; logger . info ( "{}" , decode ) ; "<AssertPlaceHolder>" ; } info ( java . lang . String , java . lang . Throwable ) { } | org . junit . Assert . assertEquals ( map , decode ) |
testPagedGetAuthenticatedUserEvents ( ) { org . gitlab4j . api . Pager < org . gitlab4j . api . models . Event > events = org . gitlab4j . api . TestEventsApi . gitLabApi . getEventsApi ( ) . getAuthenticatedUserEvents ( null , null , null , null , null , 10 ) ; "<AssertPlaceHolder>" ; } getAuthenticatedUserEvents ( org . gitlab4j . api . ActionType , org . gitlab4j . api . TargetType , java . util . Date , java . util . Date , org . gitlab4j . api . SortOrder , int ) { org . gitlab4j . api . GitLabApiForm formData = new org . gitlab4j . api . GitLabApiForm ( ) . withParam ( "action" , action ) . withParam ( "target_type" , ( targetType != null ? targetType . toValue ( ) . toLowerCase ( ) : null ) ) . withParam ( "before" , before ) . withParam ( "after" , after ) . withParam ( "sort" , sortOrder ) ; return new org . gitlab4j . api . Pager < org . gitlab4j . api . models . Event > ( this , org . gitlab4j . api . models . Event . class , itemsPerPage , formData . asMap ( ) , "events" ) ; } | org . junit . Assert . assertNotNull ( events ) |
getChargePointInfoSubscriptionValidateResponse ( ) { subscribeTestSubscriber ( ) ; chargingStationRepository . createOrUpdate ( new io . motown . vas . viewmodel . persistence . entities . ChargingStation ( io . motown . vas . v10 . soap . publisher . CHARGING_STATION_ID . getId ( ) ) ) ; chargingStationRepository . createOrUpdate ( new io . motown . vas . viewmodel . persistence . entities . ChargingStation ( "SECOND_CS" ) ) ; io . motown . vas . v10 . soap . publisher . GetChargePointInfoRequest request = new io . motown . vas . v10 . soap . publisher . GetChargePointInfoRequest ( ) ; io . motown . vas . v10 . soap . publisher . GetChargePointInfoResponse response = service . getChargePointInfo ( request , io . motown . vas . v10 . soap . publisher . SUBSCRIBER_IDENTITY ) ; "<AssertPlaceHolder>" ; } getChargePointInfo ( io . motown . vas . v10 . soap . publisher . GetChargePointInfoRequest , java . lang . String ) { io . motown . vas . v10 . soap . publisher . MotownVasPublisherService . LOG . info ( "GetChargePointInfo<sp>{}" , subscriberIdentity ) ; io . motown . vas . v10 . soap . publisher . GetChargePointInfoResponse response = new io . motown . vas . v10 . soap . publisher . GetChargePointInfoResponse ( ) ; if ( ! ( subscriptionRepository . findBySubscriberIdentity ( subscriberIdentity ) . isEmpty ( ) ) ) { java . util . List < io . motown . vas . v10 . soap . publisher . ChargePoint > chargePoints = response . getChargePoints ( ) ; for ( io . motown . vas . v10 . soap . publisher . ChargingStation chargingStation : chargingStationRepository . findAll ( ) ) { chargePoints . add ( vasConversionService . getVasRepresentation ( chargingStation ) ) ; } } return response ; } | org . junit . Assert . assertEquals ( 2 , response . getChargePoints ( ) . size ( ) ) |
testEncodeDecodeString ( ) { java . lang . String test = "dummy" ; net . tomp2p . message . Buffer encoded = net . tomp2p . rpc . RelayUtils . encodeString ( test ) ; java . lang . String decoded = net . tomp2p . rpc . RelayUtils . decodeString ( encoded ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( test , decoded ) |
testToevalligeGeboorte ( ) { final nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijstBuilder builder = new nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijstBuilder ( ) ; builder . samengesteldeNaamStapel ( maakKindSamengesteldeNaamStapel ( ) ) ; builder . geboorteStapel ( maakKindGeboorteStapel ( ) ) ; builder . geslachtsaanduidingStapel ( maakKindGeslachtsaaanduidingStapel ( ) ) ; final nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijst brpPersoonslijst = builder . build ( ) ; final nl . bzk . migratiebrp . conversie . model . lo3 . Lo3Persoonslijst lo3Persoonslijst = brpConverteerder . converteer ( brpPersoonslijst ) ; "<AssertPlaceHolder>" ; } converteer ( java . util . List ) { if ( brpStapels == null ) { return null ; } final java . util . List < nl . bzk . migratiebrp . conversie . model . lo3 . Lo3Stapel < nl . bzk . migratiebrp . conversie . model . lo3 . categorie . Lo3KindInhoud > > stapels = new java . util . ArrayList ( ) ; for ( final nl . bzk . migratiebrp . conversie . model . brp . BrpStapel < nl . bzk . migratiebrp . conversie . model . brp . groep . BrpIstRelatieGroepInhoud > brpStapel : brpStapels ) { final nl . bzk . migratiebrp . conversie . model . lo3 . Lo3Stapel < nl . bzk . migratiebrp . conversie . model . lo3 . categorie . Lo3KindInhoud > lo3Stapel = converteer ( brpStapel ) ; stapels . add ( lo3Stapel ) ; } return stapels ; } | org . junit . Assert . assertNotNull ( lo3Persoonslijst ) |
testDisableInactivePeer ( ) { utility2 . shutdownMiniHBaseCluster ( ) ; byte [ ] rowkey = org . apache . hadoop . hbase . util . Bytes . toBytes ( "disable<sp>inactive<sp>peer" ) ; org . apache . hadoop . hbase . client . Put put = new org . apache . hadoop . hbase . client . Put ( rowkey ) ; put . addColumn ( famName , row , row ) ; htable1 . put ( put ) ; java . lang . Thread . sleep ( ( ( SLEEP_TIME ) * ( NB_RETRIES ) ) ) ; admin . disablePeer ( "2" ) ; org . apache . hadoop . hbase . StartMiniClusterOption option = org . apache . hadoop . hbase . StartMiniClusterOption . builder ( ) . numRegionServers ( 2 ) . build ( ) ; utility2 . startMiniHBaseCluster ( option ) ; org . apache . hadoop . hbase . client . Get get = new org . apache . hadoop . hbase . client . Get ( rowkey ) ; for ( int i = 0 ; i < ( NB_RETRIES ) ; i ++ ) { org . apache . hadoop . hbase . client . Result res = htable2 . get ( get ) ; if ( ( res . size ( ) ) >= 1 ) { org . junit . Assert . fail ( "Replication<sp>wasn't<sp>disabled" ) ; } else { org . apache . hadoop . hbase . replication . TestReplicationDisableInactivePeer . LOG . info ( "Row<sp>not<sp>replicated,<sp>let's<sp>wait<sp>a<sp>bit<sp>more..." ) ; java . lang . Thread . sleep ( org . apache . hadoop . hbase . replication . SLEEP_TIME ) ; } } admin . enablePeer ( "2" ) ; java . lang . Thread . sleep ( ( ( SLEEP_TIME ) * ( NB_RETRIES ) ) ) ; for ( int i = 0 ; i < ( NB_RETRIES ) ; i ++ ) { org . apache . hadoop . hbase . client . Result res = htable2 . get ( get ) ; if ( res . isEmpty ( ) ) { org . apache . hadoop . hbase . replication . TestReplicationDisableInactivePeer . LOG . info ( "Row<sp>not<sp>available" ) ; java . lang . Thread . sleep ( ( ( SLEEP_TIME ) * ( NB_RETRIES ) ) ) ; } else { "<AssertPlaceHolder>" ; return ; } } org . junit . Assert . fail ( "Waited<sp>too<sp>much<sp>time<sp>for<sp>put<sp>replication" ) ; } value ( ) { return counter . sum ( ) ; } | org . junit . Assert . assertArrayEquals ( row , res . value ( ) ) |
testVariableSubstitution ( ) { final org . eclipse . core . variables . IStringVariableManager manager = org . eclipse . core . variables . VariablesPlugin . getDefault ( ) . getStringVariableManager ( ) ; final org . eclipse . core . variables . IValueVariable var1 = manager . newValueVariable ( "my" , "" , false , "MyTestProject" ) ; final org . eclipse . core . variables . IValueVariable var2 = manager . newValueVariable ( "hello" , "hello<sp>world!" , false , "Hello" ) ; final org . eclipse . core . variables . IValueVariable var3 = manager . newValueVariable ( "ext" , "" , true , "g4" ) ; final org . eclipse . core . variables . IValueVariable [ ] vars = new org . eclipse . core . variables . IValueVariable [ ] { var1 , var2 , var3 } ; manager . addVariables ( vars ) ; final java . lang . String path = "/${my}/${hello}.${ext}" ; final java . lang . String actual = com . github . jknack . antlr4ide . ui . launch . VariableButtonListener . substituteVariables ( path ) ; final java . lang . String expected = "/MyTestProject/Hello.g4" ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( expected , actual ) |
testSerialization ( ) { com . googlecode . concurrenttrees . suffix . ConcurrentSuffixTree < java . lang . Integer > tree1 = new com . googlecode . concurrenttrees . suffix . ConcurrentSuffixTreeTest . ConcurrentSuffixTreeTestImpl < java . lang . Integer > ( getNodeFactory ( ) ) ; tree1 . put ( "TEST" , 1 ) ; tree1 . put ( "TEAM" , 2 ) ; tree1 . put ( "TOAST" , 3 ) ; com . googlecode . concurrenttrees . suffix . ConcurrentSuffixTree < java . lang . Integer > tree2 = com . googlecode . concurrenttrees . testutil . TestUtility . deserialize ( com . googlecode . concurrenttrees . suffix . ConcurrentSuffixTree . class , com . googlecode . concurrenttrees . testutil . TestUtility . serialize ( tree1 ) ) ; "<AssertPlaceHolder>" ; } prettyPrint ( com . googlecode . concurrenttrees . radix . node . util . PrettyPrintable ) { java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; com . googlecode . concurrenttrees . common . PrettyPrinter . prettyPrint ( tree . getNode ( ) , sb , "" , true , true ) ; return sb . toString ( ) ; } | org . junit . Assert . assertEquals ( com . googlecode . concurrenttrees . common . PrettyPrinter . prettyPrint ( tree1 ) , com . googlecode . concurrenttrees . common . PrettyPrinter . prettyPrint ( tree2 ) ) |
testDeployViaStreamService ( ) { this . controller . deploy ( "test" , new java . util . HashMap ( ) ) ; org . mockito . ArgumentCaptor < java . lang . String > argumentCaptor1 = org . mockito . ArgumentCaptor . forClass ( java . lang . String . class ) ; org . mockito . ArgumentCaptor < java . util . Map > argumentCaptor2 = org . mockito . ArgumentCaptor . forClass ( java . util . Map . class ) ; verify ( streamService ) . deployStream ( argumentCaptor1 . capture ( ) , argumentCaptor2 . capture ( ) ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return value ; } | org . junit . Assert . assertEquals ( argumentCaptor1 . getValue ( ) , "test" ) |
test_multi ( ) { final java . util . concurrent . ConcurrentMap < com . zlikun . jee . Singleton3 , java . lang . Boolean > map = new java . util . concurrent . ConcurrentHashMap ( ) ; java . util . concurrent . ExecutorService exec = java . util . concurrent . Executors . newFixedThreadPool ( 400 ) ; final long moment = ( java . lang . System . currentTimeMillis ( ) ) + 1000 ; for ( int i = 0 ; i < 1000 ; i ++ ) { exec . execute ( new java . lang . Runnable ( ) { @ com . zlikun . jee . Override public void run ( ) { while ( true ) { if ( moment < ( java . lang . System . currentTimeMillis ( ) ) ) { map . put ( com . zlikun . jee . Singleton3 . getInstance ( ) , Boolean . TRUE ) ; break ; } } } } ) ; } exec . shutdown ( ) ; while ( ! ( exec . isTerminated ( ) ) ) ; "<AssertPlaceHolder>" ; } getInstance ( ) { if ( ( com . zlikun . jee . Singleton3 . INSTANCE ) == null ) { synchronized ( com . zlikun . jee . Singleton3 . class ) { if ( ( com . zlikun . jee . Singleton3 . INSTANCE ) == null ) { com . zlikun . jee . Singleton3 . INSTANCE = new com . zlikun . jee . Singleton3 ( ) ; } } } return com . zlikun . jee . Singleton3 . INSTANCE ; } | org . junit . Assert . assertEquals ( 1 , map . size ( ) ) |
testSumNull ( ) { tx . putAttributeType ( "random" , AttributeType . DataType . INTEGER ) ; graql . lang . query . GraqlGet . Aggregate query = graql . lang . Graql . match ( graql . lang . Graql . var ( "x" ) . isa ( "movie" ) , graql . lang . Graql . var ( ) . rel ( "x" ) . rel ( "y" ) , graql . lang . Graql . var ( "y" ) . isa ( "random" ) ) . get ( ) . sum ( "y" ) ; "<AssertPlaceHolder>" ; } execute ( graql . lang . query . MatchClause ) { return stream ( matchClause ) . collect ( java . util . stream . Collectors . toList ( ) ) ; } | org . junit . Assert . assertTrue ( tx . execute ( query ) . isEmpty ( ) ) |
testMultiTokenDeletionBeforeLoop ( ) { java . lang . String grammar = "grammar<sp>T;\n" + "a<sp>:<sp>'a'<sp>'b'*<sp>'c';" ; java . lang . String found = execParser ( "T.g4" , grammar , "TParser" , "TLexer" , "a" , "aacabc" , false ) ; java . lang . String expecting = "line<sp>1:1<sp>extraneous<sp>input<sp>\'a\'<sp>expecting<sp>{\'b\',<sp>\'c\'}\n" ; java . lang . String result = stderrDuringParse ; "<AssertPlaceHolder>" ; } execParser ( java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String , boolean ) { return execParser ( grammarFileName , grammarStr , parserName , lexerName , startRuleName , input , debug , false ) ; } | org . junit . Assert . assertEquals ( expecting , result ) |
testInit ( ) { org . openscience . cdk . layout . TemplateHandler th = new org . openscience . cdk . layout . TemplateHandler ( org . openscience . cdk . DefaultChemObjectBuilder . getInstance ( ) ) ; "<AssertPlaceHolder>" ; } getTemplateCount ( ) { return this . templateHandler . getTemplateCount ( ) ; } | org . junit . Assert . assertEquals ( 5 , th . getTemplateCount ( ) ) |
should_assemble_simple_input ( ) { au . edu . wehi . idsv . debruijn . positional . ProcessingContext pc = getContext ( ) ; au . edu . wehi . idsv . debruijn . positional . AssemblyEvidenceSource aes = AES ( pc ) ; pc . getAssemblyParameters ( ) . k = 4 ; java . util . List < au . edu . wehi . idsv . debruijn . positional . DirectedEvidence > input = new java . util . ArrayList < au . edu . wehi . idsv . debruijn . positional . DirectedEvidence > ( ) ; input . add ( SCE ( au . edu . wehi . idsv . debruijn . positional . BWD , Read ( 0 , 10 , "5S5M" ) ) ) ; input . add ( SCE ( au . edu . wehi . idsv . debruijn . positional . FWD , Read ( 0 , 10 , "5M5S" ) ) ) ; input . add ( SCE ( au . edu . wehi . idsv . debruijn . positional . BWD , Read ( 0 , 100 , "5S5M" ) ) ) ; input . add ( SCE ( au . edu . wehi . idsv . debruijn . positional . FWD , Read ( 0 , 100 , "5M5S" ) ) ) ; input . sort ( DirectedEvidenceOrder . ByStartEnd ) ; java . util . ArrayList < htsjdk . samtools . SAMRecord > r = com . google . common . collect . Lists . newArrayList ( new au . edu . wehi . idsv . debruijn . positional . PositionalAssembler ( pc , aes , new au . edu . wehi . idsv . debruijn . positional . SequentialIdGenerator ( "asm" ) , input . iterator ( ) ) ) ; "<AssertPlaceHolder>" ; } size ( ) { org . junit . Assert . assertEquals ( 4 , jagged ( ) . size ( ) ) ; org . junit . Assert . assertEquals ( 2 , noalt ( ) . size ( ) ) ; } | org . junit . Assert . assertEquals ( 4 , r . size ( ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.