input
stringlengths 28
18.7k
| output
stringlengths 39
1.69k
|
|---|---|
testMethodBinding ( ) { final codemining . js . codeutils . binding . JavascriptApproximateVariableBindingExtractor jabe = new codemining . js . codeutils . binding . JavascriptApproximateVariableBindingExtractor ( ) ; final java . util . List < codemining . languagetools . bindings . TokenNameBinding > methodVariableBindings = jabe . getNameBindings ( methodContent ) ; codemining . java . codeutils . binding . BindingTester . checkAllBindings ( methodVariableBindings ) ; "<AssertPlaceHolder>" ; } checkAllBindings ( java . util . List ) { final java . util . Set < java . lang . Integer > indexes = com . google . common . collect . Sets . newHashSet ( ) ; for ( final codemining . languagetools . bindings . TokenNameBinding binding : bindings ) { codemining . java . codeutils . binding . BindingTester . checkBinding ( binding ) ; org . junit . Assert . assertFalse ( "Indexes<sp>appear<sp>only<sp>once" , indexes . removeAll ( binding . nameIndexes ) ) ; indexes . addAll ( binding . nameIndexes ) ; } }
|
org . junit . Assert . assertEquals ( methodVariableBindings . size ( ) , 1 )
|
testFindByFormId ( ) { int formId1 = 101 ; int formId2 = 202 ; org . oscarehr . common . model . CaisiFormQuestion cFQ1 = new org . oscarehr . common . model . CaisiFormQuestion ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( cFQ1 ) ; cFQ1 . setFormId ( formId1 ) ; dao . persist ( cFQ1 ) ; org . oscarehr . common . model . CaisiFormQuestion cFQ2 = new org . oscarehr . common . model . CaisiFormQuestion ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( cFQ2 ) ; cFQ2 . setFormId ( formId2 ) ; dao . persist ( cFQ2 ) ; org . oscarehr . common . model . CaisiFormQuestion cFQ3 = new org . oscarehr . common . model . CaisiFormQuestion ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( cFQ3 ) ; cFQ3 . setFormId ( formId1 ) ; dao . persist ( cFQ3 ) ; java . util . List < org . oscarehr . common . model . CaisiFormQuestion > expectedResult = new java . util . ArrayList < org . oscarehr . common . model . CaisiFormQuestion > ( java . util . Arrays . asList ( cFQ1 , cFQ3 ) ) ; java . util . List < org . oscarehr . common . model . CaisiFormQuestion > result = dao . findByFormId ( formId1 ) ; org . apache . log4j . Logger logger = org . oscarehr . util . MiscUtils . getLogger ( ) ; if ( ( result . size ( ) ) != ( expectedResult . size ( ) ) ) { logger . warn ( "Array<sp>sizes<sp>do<sp>not<sp>match." ) ; org . junit . Assert . fail ( "Array<sp>sizes<sp>do<sp>not<sp>match." ) ; } for ( int i = 0 ; i < ( expectedResult . size ( ) ) ; i ++ ) { if ( ! ( expectedResult . get ( i ) . equals ( result . get ( i ) ) ) ) { logger . warn ( "Items<sp>do<sp>not<sp>match." ) ; org . junit . Assert . fail ( "Items<sp>do<sp>not<sp>match." ) ; } } "<AssertPlaceHolder>" ; } get ( java . lang . String ) { try { return terser . get ( path ) ; } catch ( ca . uhn . hl7v2 . HL7Exception e ) { oscar . oscarLab . ca . all . parsers . CLSHandler . logger . warn ( ( "Unable<sp>to<sp>get<sp>field<sp>at<sp>" + path ) , e ) ; return null ; } }
|
org . junit . Assert . assertTrue ( true )
|
testGetIdentifyingInformation ( ) { org . finra . herd . model . api . xml . JobDefinition jobDefinition = jobDefinitionServiceTestHelper . createJobDefinition ( org . finra . herd . service . ACTIVITI_XML_LOG_VARIABLES_NO_REGEX_WITH_CLASSPATH ) ; java . util . List < org . finra . herd . model . api . xml . JobAction > jobActions = new java . util . ArrayList ( ) ; jobActions . add ( new org . finra . herd . model . api . xml . JobAction ( jobDefinition . getNamespace ( ) , jobDefinition . getJobName ( ) , CORRELATION_DATA ) ) ; org . finra . herd . model . jpa . BusinessObjectDataNotificationRegistrationEntity businessObjectDataNotificationRegistrationEntity = notificationRegistrationDaoTestHelper . createBusinessObjectDataNotificationRegistrationEntity ( new org . finra . herd . model . api . xml . NotificationRegistrationKey ( NAMESPACE , NOTIFICATION_NAME ) , NotificationEventTypeEntity . EventTypesBdata . BUS_OBJCT_DATA_RGSTN . name ( ) , org . finra . herd . service . BDEF_NAMESPACE , 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 , org . finra . herd . service . STORAGE_NAME , null , null , jobActions , NotificationRegistrationStatusEntity . ENABLED ) ; org . finra . herd . model . api . xml . BusinessObjectDataKey businessObjectDataKey = new org . finra . herd . model . api . xml . BusinessObjectDataKey ( BDEF_NAMESPACE , BDEF_NAME , FORMAT_USAGE_CODE , FORMAT_FILE_TYPE_CODE , FORMAT_VERSION , PARTITION_VALUE , SUBPARTITION_VALUES , DATA_VERSION ) ; org . finra . herd . model . jpa . BusinessObjectDataEntity businessObjectDataEntity = businessObjectDataDaoTestHelper . createBusinessObjectDataEntity ( org . finra . herd . service . BDEF_NAMESPACE , 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 , org . finra . herd . service . PARTITION_VALUE , org . finra . herd . service . SUBPARTITION_VALUES , org . finra . herd . service . DATA_VERSION , org . finra . herd . service . LATEST_VERSION_FLAG_SET , org . finra . herd . service . BDATA_STATUS ) ; org . finra . herd . model . dto . BusinessObjectDataNotificationEventParamsDto businessObjectDataNotificationEventParams = new org . finra . herd . model . dto . BusinessObjectDataNotificationEventParamsDto ( ) ; businessObjectDataNotificationEventParams . setBusinessObjectData ( businessObjectDataHelper . createBusinessObjectDataFromEntity ( businessObjectDataEntity ) ) ; businessObjectDataNotificationEventParams . setBusinessObjectDataNotificationRegistration ( businessObjectDataNotificationRegistrationEntity ) ; businessObjectDataNotificationEventParams . setEventType ( NotificationEventTypeEntity . EventTypesBdata . BUS_OBJCT_DATA_RGSTN . name ( ) ) ; businessObjectDataNotificationEventParams . setNotificationJobAction ( ( ( org . finra . herd . model . jpa . NotificationJobActionEntity ) ( businessObjectDataNotificationRegistrationEntity . getNotificationActions ( ) . toArray ( ) [ 0 ] ) ) ) ; businessObjectDataNotificationEventParams . setStorageName ( org . finra . herd . service . STORAGE_NAME ) ; org . finra . herd . service . NotificationActionService notificationActionService = notificationActionFactory . getNotificationActionHandler ( NotificationTypeEntity . NOTIFICATION_TYPE_BDATA , NotificationEventTypeEntity . EventTypesBdata . BUS_OBJCT_DATA_RGSTN . name ( ) ) ; java . lang . String expectedValue = java . lang . String . format ( ( ( "namespace:<sp>\"%s\",<sp>actionId:<sp>\"%s\"<sp>with<sp>" + ( businessObjectDataHelper . businessObjectDataKeyToString ( businessObjectDataKey ) ) ) + ",<sp>storageName:<sp>\"%s\"" ) , businessObjectDataNotificationRegistrationEntity . getNamespace ( ) . getCode ( ) , ( ( org . finra . herd . model . jpa . NotificationJobActionEntity ) ( businessObjectDataNotificationRegistrationEntity . getNotificationActions ( ) . toArray ( ) [ 0 ] ) ) . getId ( ) , org . finra . herd . service . STORAGE_NAME ) ; "<AssertPlaceHolder>" ; } getIdentifyingInformation ( org . finra . herd . model . dto . NotificationEventParamsDto , org . finra . herd . service . helper . BusinessObjectDataHelper ) { if ( notificationEventParams instanceof org . finra . herd . model . dto . BusinessObjectDataNotificationEventParamsDto ) { org . finra . herd . model . dto . BusinessObjectDataNotificationEventParamsDto businessObjectDataNotificationEventParams = ( ( org . finra . herd . model . dto . BusinessObjectDataNotificationEventParamsDto ) ( notificationEventParams ) ) ; return java . lang . String . format ( ( ( "namespace:<sp>\"%s\",<sp>actionId:<sp>\"%s\"<sp>with<sp>" + ( businessObjectDataHelper . businessObjectDataKeyToString ( businessObjectDataHelper . getBusinessObjectDataKey ( businessObjectDataNotificationEventParams . getBusinessObjectData ( ) ) ) ) ) + ",<sp>storageName:<sp>\"%s\"" ) , businessObjectDataNotificationEventParams . getBusinessObjectDataNotificationRegistration ( ) . getNamespace ( ) . getCode ( ) , businessObjectDataNotificationEventParams . getNotificationJobAction ( ) . getId ( ) , businessObjectDataNotificationEventParams . getStorageName ( ) ) ; } else { throw new java . lang . IllegalStateException ( "Notification<sp>event<sp>parameters<sp>DTO<sp>passed<sp>to<sp>the<sp>method<sp>must<sp>be<sp>an<sp>instance<sp>of<sp>BusinessObjectDataNotificationEventParamsDto." ) ; } }
|
org . junit . Assert . assertEquals ( expectedValue , notificationActionService . getIdentifyingInformation ( businessObjectDataNotificationEventParams , businessObjectDataHelper ) )
|
tagNameSpaceTest ( ) { org . finra . datagenerator . engine . scxml . tags . RangeExtension rangeExtension = new org . finra . datagenerator . engine . scxml . tags . RangeExtension ( ) ; "<AssertPlaceHolder>" ; } getTagNameSpace ( ) { return "org.finra.datagenerator" ; }
|
org . junit . Assert . assertEquals ( "org.finra.datagenerator" , rangeExtension . getTagNameSpace ( ) )
|
testForeignId ( ) { java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; com . j256 . ormlite . stmt . query . Foo baseFoo = new com . j256 . ormlite . stmt . query . Foo ( ) ; cmpForeign . appendArgOrValue ( databaseType , foreignFieldType , sb , new java . util . ArrayList < com . j256 . ormlite . stmt . ArgumentHolder > ( ) , baseFoo ) ; java . lang . StringBuilder expectSb = new java . lang . StringBuilder ( ) ; expectSb . append ( baseFoo . id ) ; expectSb . append ( '<sp>' ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( ( ( getClass ( ) . getSimpleName ( ) ) + ":name=" ) + ( field . getName ( ) ) ) + ",class=" ) + ( field . getDeclaringClass ( ) . getSimpleName ( ) ) ; }
|
org . junit . Assert . assertEquals ( expectSb . toString ( ) , sb . toString ( ) )
|
testSizeSmall ( ) { testWithHandler ( new com . sun . mail . imap . IMAPMessageTest . IMAPTest ( ) { @ com . sun . mail . imap . Override public void test ( javax . mail . Folder folder , com . sun . mail . imap . IMAPMessageTest . IMAPHandlerMessage handler ) throws javax . mail . MessagingException { javax . mail . Message m = folder . getMessage ( 1 ) ; "<AssertPlaceHolder>" ; } } , new com . sun . mail . imap . IMAPMessageTest . IMAPHandlerMessage ( ) { { { size = 123 ; } } } ) ; } getSize ( ) { if ( ( content ) != null ) return content . length ; if ( ( contentStream ) != null ) { try { int size = contentStream . available ( ) ; if ( size > 0 ) return size ; } catch ( javax . mail . internet . IOException ex ) { } } return - 1 ; }
|
org . junit . Assert . assertEquals ( 123 , m . getSize ( ) )
|
unknownExceptionPassthrough ( ) { flex . messaging . MessageException expected = new flex . messaging . MessageException ( ) ; expected . setCode ( "Server.Processing" ) ; expected . setRootCause ( new java . lang . RuntimeException ( ) ) ; when ( this . endpoint . serviceMessage ( this . inMessage ) ) . thenThrow ( expected ) ; try { this . advisedEndpoint . serviceMessage ( this . inMessage ) ; org . junit . Assert . fail ( ) ; } catch ( flex . messaging . MessageException ex ) { "<AssertPlaceHolder>" ; } } serviceMessage ( flex . messaging . messages . Message ) { return message ; }
|
org . junit . Assert . assertSame ( expected , ex )
|
testUpdate_MapFields ( ) { com . jmethods . catatumbo . entities . MapFields entity = com . jmethods . catatumbo . entities . MapFields . getSampleEntity1 ( ) ; entity = com . jmethods . catatumbo . EntityManagerTest . em . insert ( entity ) ; entity . getStringMap ( ) . put ( "Catatumbo" , "Framework<sp>for<sp>GCS" ) ; entity = com . jmethods . catatumbo . EntityManagerTest . em . update ( entity ) ; com . jmethods . catatumbo . entities . MapFields entity2 = com . jmethods . catatumbo . EntityManagerTest . em . load ( com . jmethods . catatumbo . entities . MapFields . class , entity . getId ( ) ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( obj == null ) { return false ; } if ( ! ( obj instanceof com . jmethods . catatumbo . GeoLocation ) ) { return false ; } com . jmethods . catatumbo . GeoLocation that = ( ( com . jmethods . catatumbo . GeoLocation ) ( obj ) ) ; return ( ( this . latitude ) == ( that . latitude ) ) && ( ( this . longitude ) == ( that . longitude ) ) ; }
|
org . junit . Assert . assertTrue ( entity . equals ( entity2 ) )
|
testWithConfig2 ( ) { org . eclipse . che . api . project . server . type . ProjectType type3 = mock ( org . eclipse . che . api . project . server . type . ProjectType . class ) ; when ( type3 . getId ( ) ) . thenReturn ( "type3" ) ; pts . add ( type3 ) ; java . net . URL resource = com . google . common . io . Resources . getResource ( getClass ( ) , "pt-tmpl" ) ; java . nio . file . Path path = java . nio . file . Paths . get ( java . net . URI . create ( resource . toString ( ) ) ) ; "<AssertPlaceHolder>" ; org . eclipse . che . api . project . server . ProjectTemplateDescriptionLoader loader = new org . eclipse . che . api . project . server . ProjectTemplateDescriptionLoader ( path . toString ( ) , null , pts , templateRegistry ) ; loader . start ( ) ; verify ( templateRegistry ) . register ( eq ( projectType1 ) , anyListOf ( org . eclipse . che . api . project . shared . dto . ProjectTemplateDescriptor . class ) ) ; verify ( templateRegistry ) . register ( eq ( projectType2 ) , anyListOf ( org . eclipse . che . api . project . shared . dto . ProjectTemplateDescriptor . class ) ) ; verify ( templateRegistry , never ( ) ) . register ( eq ( "type3" ) , anyListOf ( org . eclipse . che . api . project . shared . dto . ProjectTemplateDescriptor . class ) ) ; } toString ( ) { return ( ( ( ( ( "FileLock{" + "lockToken='" ) + ( lockToken ) ) + '\'' ) + ",<sp>expired=" ) + ( expired ) ) + '}' ; }
|
org . junit . Assert . assertNotNull ( resource )
|
testIsLocal_fromProperties_withLocal ( ) { com . hazelcast . simulator . common . SimulatorProperties properties = com . hazelcast . simulator . utils . CloudProviderUtilsTest . getSimulatorProperties ( com . hazelcast . simulator . utils . CloudProviderUtils . PROVIDER_LOCAL ) ; "<AssertPlaceHolder>" ; } isLocal ( com . hazelcast . simulator . common . SimulatorProperties ) { return com . hazelcast . simulator . utils . CloudProviderUtils . isLocal ( properties . getCloudProvider ( ) ) ; }
|
org . junit . Assert . assertTrue ( com . hazelcast . simulator . utils . CloudProviderUtils . isLocal ( properties ) )
|
shouldFailWebSocketConnectionWhenServerSendOpcode7Frame ( ) { final org . apache . mina . core . service . IoHandler handler = context . mock ( org . apache . mina . core . service . IoHandler . class ) ; context . checking ( new org . jmock . Expectations ( ) { { oneOf ( handler ) . sessionCreated ( with ( any ( org . kaazing . mina . core . session . IoSessionEx . class ) ) ) ; oneOf ( handler ) . sessionOpened ( with ( any ( org . kaazing . mina . core . session . IoSessionEx . class ) ) ) ; oneOf ( handler ) . sessionClosed ( with ( any ( org . kaazing . mina . core . session . IoSessionEx . class ) ) ) ; atMost ( 1 ) . of ( handler ) . exceptionCaught ( with ( any ( org . kaazing . mina . core . session . IoSessionEx . class ) ) , with ( org . hamcrest . core . AllOf . allOf ( any ( java . io . IOException . class ) , org . junit . internal . matchers . ThrowableMessageMatcher . hasMessage ( equal ( LoggingUtils . EARLY_TERMINATION_OF_IOSESSION_MESSAGE ) ) ) ) ) ; } } ) ; org . apache . mina . core . future . ConnectFuture connectFuture = connector . connect ( "ws://localhost:8080/echo" , null , handler ) ; connectFuture . awaitUninterruptibly ( ) ; "<AssertPlaceHolder>" ; k3po . finish ( ) ; } isConnected ( ) { return channel . isConnected ( ) ; }
|
org . junit . Assert . assertTrue ( connectFuture . isConnected ( ) )
|
testLookupAbsoluteParentWhenReferenceTypeIsStructure ( ) { final org . kie . workbench . common . dmn . client . editors . types . common . DataType reference = mock ( org . kie . workbench . common . dmn . client . editors . types . common . DataType . class ) ; final org . kie . workbench . common . dmn . client . editors . types . common . DataType expectedParent = mock ( org . kie . workbench . common . dmn . client . editors . types . common . DataType . class ) ; final java . lang . String parentUUID = "parentUUID" ; final java . lang . String structure = "Structure" ; when ( reference . getParentUUID ( ) ) . thenReturn ( parentUUID ) ; when ( expectedParent . getType ( ) ) . thenReturn ( structure ) ; when ( dataTypeStore . get ( parentUUID ) ) . thenReturn ( expectedParent ) ; when ( dataTypeManager . structure ( ) ) . thenReturn ( structure ) ; final java . util . Optional < org . kie . workbench . common . dmn . client . editors . types . common . DataType > actualParent = handler . lookupAbsoluteParent ( reference ) ; "<AssertPlaceHolder>" ; } of ( java . util . function . Supplier ) { return new org . kie . workbench . common . stunner . core . util . SafeComparator < K > ( comparatorSupplier ) ; }
|
org . junit . Assert . assertEquals ( java . util . Optional . of ( expectedParent ) , actualParent )
|
testRulesAreInherited1 ( ) { org . eclipse . tm4e . core . theme . Theme actual = org . eclipse . tm4e . core . theme . Theme . createFromParsedTheme ( new java . util . ArrayList ( java . util . Arrays . asList ( new org . eclipse . tm4e . core . theme . ParsedThemeRule ( "" , null , ( - 1 ) , FontStyle . NotSet , "#F8F8F2" , "#272822" ) , new org . eclipse . tm4e . core . theme . ParsedThemeRule ( "var" , null , ( - 1 ) , FontStyle . Bold , "#ff0000" , null ) , new org . eclipse . tm4e . core . theme . ParsedThemeRule ( "var.identifier" , null , ( - 1 ) , FontStyle . NotSet , "#00ff00" , null ) ) ) ) ; org . eclipse . tm4e . core . theme . ColorMap colorMap = new org . eclipse . tm4e . core . theme . ColorMap ( ) ; int _NOT_SET = 0 ; int _A = colorMap . getId ( "#F8F8F2" ) ; int _B = colorMap . getId ( "#272822" ) ; int _C = colorMap . getId ( "#ff0000" ) ; int _D = colorMap . getId ( "#00ff00" ) ; java . util . Map < java . lang . String , org . eclipse . tm4e . core . theme . ThemeTrieElement > map1_1 = new java . util . HashMap ( ) ; map1_1 . put ( "identifier" , new org . eclipse . tm4e . core . theme . ThemeTrieElement ( new org . eclipse . tm4e . core . theme . ThemeTrieElementRule ( 2 , null , FontStyle . Bold , _D , _NOT_SET ) ) ) ; java . util . Map < java . lang . String , org . eclipse . tm4e . core . theme . ThemeTrieElement > map1 = new java . util . HashMap ( ) ; map1 . put ( "var" , new org . eclipse . tm4e . core . theme . ThemeTrieElement ( new org . eclipse . tm4e . core . theme . ThemeTrieElementRule ( 1 , null , FontStyle . Bold , _C , _NOT_SET ) , java . util . Collections . emptyList ( ) , map1_1 ) ) ; org . eclipse . tm4e . core . theme . Theme expected = new org . eclipse . tm4e . core . theme . Theme ( colorMap , new org . eclipse . tm4e . core . theme . ThemeTrieElementRule ( 0 , null , FontStyle . None , _A , _B ) , new org . eclipse . tm4e . core . theme . ThemeTrieElement ( new org . eclipse . tm4e . core . theme . ThemeTrieElementRule ( 0 , null , FontStyle . NotSet , _NOT_SET , _NOT_SET ) , java . util . Collections . emptyList ( ) , map1 ) ) ; "<AssertPlaceHolder>" ; } getId ( java . lang . String ) { if ( color == null ) { return 0 ; } color = color . toUpperCase ( ) ; java . lang . Integer value = this . _color2id . get ( color ) ; if ( value != null ) { return value ; } value = ++ ( this . _lastColorId ) ; this . _color2id . put ( color , value ) ; return value ; }
|
org . junit . Assert . assertEquals ( actual , expected )
|
testPermute ( ) { final org . apache . calcite . tools . RelBuilder builder = org . apache . calcite . tools . RelBuilder . create ( org . apache . calcite . test . RelBuilderTest . config ( ) . build ( ) ) ; org . apache . calcite . rel . RelNode root = builder . scan ( "EMP" ) . permute ( org . apache . calcite . util . mapping . Mappings . bijection ( java . util . Arrays . asList ( 1 , 2 , 0 ) ) ) . build ( ) ; final java . lang . String expected = "LogicalProject(JOB=[$2],<sp>EMPNO=[$0],<sp>ENAME=[$1])\n" + "<sp>LogicalTableScan(table=[[scott,<sp>EMP]])\n" ; "<AssertPlaceHolder>" ; } hasTree ( java . lang . String ) { return org . apache . calcite . test . Matchers . compose ( org . hamcrest . core . Is . is ( value ) , ( input ) -> { return org . apache . calcite . util . Util . toLinux ( org . apache . calcite . plan . RelOptUtil . toString ( input ) ) ; } ) ; }
|
org . junit . Assert . assertThat ( root , org . apache . calcite . test . Matchers . hasTree ( expected ) )
|
testToString ( ) { java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; sb . append ( "NewSessionTicketMessage:" ) ; sb . append ( "\n<sp>TicketLifeTimeHint:<sp>" ) . append ( "null" ) ; sb . append ( "\n<sp>TicketLength:<sp>" ) . append ( "null" ) ; sb . append ( "\n<sp>Ticket:<sp>" ) . append ( new de . rub . nds . tlsattacker . core . state . SessionTicket ( ) . toString ( ) ) ; "<AssertPlaceHolder>" ; } toString ( ) { java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; sb . append ( "HelloRequestMessage:" ) ; return sb . toString ( ) ; }
|
org . junit . Assert . assertEquals ( message . toString ( ) , sb . toString ( ) )
|
findElementTwoByEmptyChild ( ) { final org . openqa . selenium . support . pagefactory . ByChainedTest . AllDriver driver = mock ( org . openqa . selenium . support . pagefactory . ByChainedTest . AllDriver . class ) ; final org . openqa . selenium . WebElement elem1 = mock ( org . openqa . selenium . WebElement . class , "webElement1" ) ; final org . openqa . selenium . WebElement elem2 = mock ( org . openqa . selenium . support . pagefactory . ByChainedTest . AllElement . class , "webElement2" ) ; final org . openqa . selenium . WebElement elem3 = mock ( org . openqa . selenium . support . pagefactory . ByChainedTest . AllElement . class , "webElement3" ) ; final org . openqa . selenium . WebElement elem4 = mock ( org . openqa . selenium . support . pagefactory . ByChainedTest . AllElement . class , "webElement4" ) ; final org . openqa . selenium . WebElement elem5 = mock ( org . openqa . selenium . support . pagefactory . ByChainedTest . AllElement . class , "webElement5" ) ; final java . util . List < org . openqa . selenium . WebElement > elems = new java . util . ArrayList < org . openqa . selenium . WebElement > ( ) ; final java . util . List < org . openqa . selenium . WebElement > elems12 = new java . util . ArrayList < org . openqa . selenium . WebElement > ( ) ; elems12 . add ( elem1 ) ; elems12 . add ( elem2 ) ; final java . util . List < org . openqa . selenium . WebElement > elems34 = new java . util . ArrayList < org . openqa . selenium . WebElement > ( ) ; elems34 . add ( elem3 ) ; elems34 . add ( elem4 ) ; final java . util . List < org . openqa . selenium . WebElement > elems5 = new java . util . ArrayList < org . openqa . selenium . WebElement > ( ) ; elems5 . add ( elem5 ) ; final java . util . List < org . openqa . selenium . WebElement > elems345 = new java . util . ArrayList < org . openqa . selenium . WebElement > ( ) ; elems345 . addAll ( elems34 ) ; elems345 . addAll ( elems5 ) ; when ( driver . findElementsByName ( "cheese" ) ) . thenReturn ( elems12 ) ; when ( elem1 . findElements ( org . openqa . selenium . By . name ( "photo" ) ) ) . thenReturn ( elems ) ; when ( elem2 . findElements ( org . openqa . selenium . By . name ( "photo" ) ) ) . thenReturn ( elems5 ) ; org . openqa . selenium . support . pagefactory . ByChained by = new org . openqa . selenium . support . pagefactory . ByChained ( org . openqa . selenium . By . name ( "cheese" ) , org . openqa . selenium . By . name ( "photo" ) ) ; "<AssertPlaceHolder>" ; } findElement ( org . openqa . selenium . By ) { return by . findElement ( this ) ; }
|
org . junit . Assert . assertThat ( by . findElement ( driver ) , org . hamcrest . Matchers . equalTo ( elem5 ) )
|
testQueryableLimit ( ) { final java . lang . String [ ] expected = new java . lang . String [ ] { "aa" , "bb" , "-cc" } ; final java . util . List < java . lang . String > actual = me . josephzhu . java8inaction . test . queryable . Queryable . of ( data ) . limit ( 3 ) . toList ( ) ; "<AssertPlaceHolder>" ; } toList ( ) { me . josephzhu . java8inaction . test . queryable . List < T > res = new me . josephzhu . java8inaction . test . queryable . ArrayList ( ) ; forEach ( ( e ) -> res . add ( e ) ) ; return res ; }
|
org . junit . Assert . assertArrayEquals ( expected , actual . toArray ( ) )
|
testTitle ( ) { cn . jpush . api . push . model . notification . AndroidNotification an = cn . jpush . api . push . model . notification . AndroidNotification . newBuilder ( ) . setTitle ( "title" ) . build ( ) ; com . google . gson . JsonObject json = new com . google . gson . JsonObject ( ) ; json . add ( "title" , new com . google . gson . JsonPrimitive ( "title" ) ) ; "<AssertPlaceHolder>" ; } toJSON ( ) { cn . jpush . api . report . model . JsonObject jsonObject = new cn . jpush . api . report . model . JsonObject ( ) ; if ( ( msgId ) != ( - 1L ) ) { jsonObject . addProperty ( cn . jpush . api . report . model . CheckMessagePayload . MSG_ID , msgId ) ; } if ( null != ( registrationIds ) ) { cn . jpush . api . report . model . JsonArray jsonArray = new cn . jpush . api . report . model . JsonArray ( ) ; for ( java . lang . String rid : registrationIds ) { jsonArray . add ( new cn . jpush . api . report . model . JsonPrimitive ( rid ) ) ; } jsonObject . add ( cn . jpush . api . report . model . CheckMessagePayload . REGISTRATION_IDS , jsonArray ) ; } if ( null != ( date ) ) { jsonObject . addProperty ( cn . jpush . api . report . model . CheckMessagePayload . DATE , date ) ; } return jsonObject ; }
|
org . junit . Assert . assertEquals ( "" , json , an . toJSON ( ) )
|
testCompareTo ( ) { final com . gemstone . gemfire . management . internal . web . domain . Link link0 = new com . gemstone . gemfire . management . internal . web . domain . Link ( "resources" , toUri ( "http://host:port/service/v1/resources" ) ) ; final com . gemstone . gemfire . management . internal . web . domain . Link link1 = new com . gemstone . gemfire . management . internal . web . domain . Link ( "resource" , toUri ( "http://host:port/service/v1/resources" ) , com . gemstone . gemfire . management . internal . web . http . HttpMethod . POST ) ; final com . gemstone . gemfire . management . internal . web . domain . Link link2 = new com . gemstone . gemfire . management . internal . web . domain . Link ( "resource" , toUri ( "http://host:port/service/v1/resources/{id}" ) ) ; final com . gemstone . gemfire . management . internal . web . domain . Link link3 = new com . gemstone . gemfire . management . internal . web . domain . Link ( "resource" , toUri ( "http://host:port/service/v1/resources/{name}" ) ) ; final com . gemstone . gemfire . management . internal . web . domain . Link link4 = new com . gemstone . gemfire . management . internal . web . domain . Link ( "resource" , toUri ( "http://host:port/service/v1/resources/{id}" ) , com . gemstone . gemfire . management . internal . web . http . HttpMethod . DELETE ) ; final java . util . List < com . gemstone . gemfire . management . internal . web . domain . Link > expectedList = new java . util . ArrayList < com . gemstone . gemfire . management . internal . web . domain . Link > ( java . util . Arrays . asList ( link1 , link4 , link2 , link3 , link0 ) ) ; final java . util . List < com . gemstone . gemfire . management . internal . web . domain . Link > actualList = com . gemstone . gemfire . internal . util . CollectionUtils . asList ( link0 , link1 , link2 , link3 , link4 ) ; java . util . Collections . sort ( actualList ) ; System . out . println ( toString ( expectedList . toArray ( new com . gemstone . gemfire . management . internal . web . domain . Link [ expectedList . size ( ) ] ) ) ) ; System . out . println ( toString ( actualList . toArray ( new com . gemstone . gemfire . management . internal . web . domain . Link [ actualList . size ( ) ] ) ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return links . size ( ) ; }
|
org . junit . Assert . assertEquals ( expectedList , actualList )
|
testConfigureStaticNatRulesOnLogicalRouterExistingRules ( ) { resource . configure ( "NiciraNvpResource" , parameters ) ; final com . cloud . legacymodel . communication . command . ConfigureStaticNatRulesOnLogicalRouterCommand cmd = mock ( com . cloud . legacymodel . communication . command . ConfigureStaticNatRulesOnLogicalRouterCommand . class ) ; final com . cloud . legacymodel . to . StaticNatRuleTO rule = new com . cloud . legacymodel . to . StaticNatRuleTO ( 1 , "11.11.11.11" , null , null , "10.10.10.10" , null , null , null , false , false ) ; final java . util . List < com . cloud . legacymodel . to . StaticNatRuleTO > rules = new java . util . ArrayList ( ) ; rules . add ( rule ) ; when ( cmd . getRules ( ) ) . thenReturn ( rules ) ; when ( cmd . getLogicalRouterUuid ( ) ) . thenReturn ( "aaaaa" ) ; final com . cloud . network . nicira . NatRule [ ] rulepair = resource . generateStaticNatRulePair ( "10.10.10.10" , "11.11.11.11" ) ; rulepair [ 0 ] . setUuid ( java . util . UUID . randomUUID ( ) ) ; rulepair [ 1 ] . setUuid ( java . util . UUID . randomUUID ( ) ) ; when ( nvpApi . createLogicalRouterNatRule ( eq ( "aaaaa" ) , ( ( com . cloud . network . nicira . NatRule ) ( any ( ) ) ) ) ) . thenReturn ( rulepair [ 0 ] ) . thenReturn ( rulepair [ 1 ] ) ; final java . util . List < com . cloud . network . nicira . NatRule > storedRules = java . util . Arrays . asList ( rulepair ) ; when ( nvpApi . findNatRulesByLogicalRouterUuid ( "aaaaa" ) ) . thenReturn ( storedRules ) ; final com . cloud . legacymodel . communication . answer . ConfigureStaticNatRulesOnLogicalRouterAnswer a = ( ( com . cloud . legacymodel . communication . answer . ConfigureStaticNatRulesOnLogicalRouterAnswer ) ( resource . executeRequest ( cmd ) ) ) ; "<AssertPlaceHolder>" ; verify ( nvpApi , never ( ) ) . createLogicalRouterNatRule ( eq ( "aaaaa" ) , argThat ( new org . mockito . ArgumentMatcher < com . cloud . network . nicira . NatRule > ( ) { @ com . cloud . network . resource . Override public boolean matches ( final java . lang . Object argument ) { final com . cloud . network . nicira . NatRule rule = ( ( com . cloud . network . nicira . NatRule ) ( argument ) ) ; if ( ( rule . getType ( ) . equals ( "DestinationNatRule" ) ) && ( ( ( com . cloud . network . nicira . DestinationNatRule ) ( rule ) ) . getToDestinationIpAddress ( ) . equals ( "10.10.10.10" ) ) ) { return true ; } if ( ( rule . getType ( ) . equals ( "SourceNatRule" ) ) && ( ( ( com . cloud . network . nicira . SourceNatRule ) ( rule ) ) . getToSourceIpAddressMin ( ) . equals ( "11.11.11.11" ) ) ) { return true ; } return false ; } } ) ) ; } getResult ( ) { return result ; }
|
org . junit . Assert . assertTrue ( a . getResult ( ) )
|
$top0UserData ( ) { java . lang . String userDataId = "userdata001" ; org . json . simple . JSONObject body = new org . json . simple . JSONObject ( ) ; body . put ( "__id" , userDataId ) ; try { com . fujitsu . dc . test . utils . TResponse respons = createUserData ( body , HttpStatus . SC_CREATED ) ; java . util . Map < java . lang . String , java . lang . String > etagList = new java . util . HashMap < java . lang . String , java . lang . String > ( ) ; etagList . put ( "userdata001" , respons . getHeader ( HttpHeaders . ETAG ) ) ; com . fujitsu . dc . test . utils . TResponse response = com . fujitsu . dc . test . utils . Http . request ( "box/odatacol/list.txt" ) . with ( "cell" , cellName ) . with ( "d" 1 , boxName ) . with ( "collection" , colName ) . with ( "entityType" , entityTypeName ) . with ( "d" 2 , "?\\$top=0" ) . with ( "accept" , MediaType . APPLICATION_JSON ) . with ( "d" 0 , com . fujitsu . dc . core . DcCoreConfig . getMasterToken ( ) ) . returns ( ) . statusCode ( HttpStatus . SC_OK ) . debug ( ) ; org . json . simple . JSONArray results = ( ( org . json . simple . JSONArray ) ( ( ( org . json . simple . JSONObject ) ( response . bodyAsJson ( ) . get ( "d" ) ) ) . get ( "results" ) ) ) ; "<AssertPlaceHolder>" ; } finally { deleteUserData ( userDataId ) ; } } get ( java . lang . String ) { com . fujitsu . dc . test . jersey . DcRequest req = new com . fujitsu . dc . test . jersey . DcRequest ( url ) ; req . method = javax . ws . rs . HttpMethod . GET ; return req ; }
|
org . junit . Assert . assertEquals ( 0 , results . size ( ) )
|
getExpandedMessageWithPage ( ) { System . out . println ( "getExpandedMessage" ) ; org . krysalis . barcode4j . tools . PageInfo page = new org . krysalis . barcode4j . tools . PageInfo ( 42 , "42" ) ; java . lang . String msg = "#page-number#" ; java . lang . String expResult = "42" ; java . lang . String result = org . krysalis . barcode4j . tools . VariableUtil . getExpandedMessage ( page , msg ) ; "<AssertPlaceHolder>" ; } getExpandedMessage ( org . krysalis . barcode4j . tools . PageInfo , java . lang . String ) { java . lang . String s = msg ; int idx ; while ( ( idx = s . indexOf ( org . krysalis . barcode4j . tools . VariableUtil . PAGE_NUMBER_WITH_FORMAT ) ) >= 0 ) { final int endidx = s . indexOf ( '#' , ( idx + ( org . krysalis . barcode4j . tools . VariableUtil . PAGE_NUMBER_WITH_FORMAT . length ( ) ) ) ) ; if ( endidx < 0 ) { break ; } final java . lang . String fmt = s . substring ( ( idx + ( org . krysalis . barcode4j . tools . VariableUtil . PAGE_NUMBER_WITH_FORMAT . length ( ) ) ) , endidx ) ; final java . lang . StringBuilder sb = new java . lang . StringBuilder ( s ) ; java . lang . String value ; if ( page == null ) { final java . lang . StringBuilder blanks = new java . lang . StringBuilder ( fmt . length ( ) ) ; blanks . setLength ( fmt . length ( ) ) ; for ( int i = 0 ; i < ( blanks . length ( ) ) ; i ++ ) { blanks . setCharAt ( i , '0' ) ; } value = blanks . toString ( ) ; } else { final java . text . NumberFormat nf = new java . text . DecimalFormat ( fmt ) ; value = nf . format ( page . getPageNumber ( ) ) ; } sb . replace ( idx , ( endidx + 1 ) , value ) ; s = sb . toString ( ) ; } if ( page == null ) { s = org . krysalis . barcode4j . tools . VariableUtil . replace ( s , org . krysalis . barcode4j . tools . VariableUtil . PAGE_NUMBER , "000" ) ; s = org . krysalis . barcode4j . tools . VariableUtil . replace ( s , org . krysalis . barcode4j . tools . VariableUtil . FORMATTED_PAGE_NUMBER , "000" ) ; } else { s = org . krysalis . barcode4j . tools . VariableUtil . replace ( s , org . krysalis . barcode4j . tools . VariableUtil . PAGE_NUMBER , java . lang . Integer . toString ( page . getPageNumber ( ) ) ) ; s = org . krysalis . barcode4j . tools . VariableUtil . replace ( s , org . krysalis . barcode4j . tools . VariableUtil . FORMATTED_PAGE_NUMBER , page . getPageNumberString ( ) ) ; } return s ; }
|
org . junit . Assert . assertEquals ( expResult , result )
|
testParseGeoServer_ArchSites_Point ( ) { final javax . xml . namespace . QName featureName = org . geotools . data . wfs . v1_1_0 . DataTestSupport . GEOS_ARCHSITES . TYPENAME ; final int expectedCount = 3 ; final java . lang . String schemaLocation = org . geotools . data . wfs . v1_1_0 . DataTestSupport . GEOS_ARCHSITES . SCHEMA ; final java . lang . String [ ] properties = new java . lang . String [ ] { "cat" , "str1" , "the_geom" } ; final org . opengis . feature . simple . SimpleFeatureType featureType ; featureType = getTypeView ( featureName , schemaLocation , GEOS_ARCHSITES . CRS , properties ) ; final org . opengis . feature . FeatureVisitor assertor = new org . geotools . data . wfs . v1_1_0 . AbstractGetFeatureParserTest . FeatureAssertor ( featureType ) ; java . net . URL url = org . geotools . test . TestData . getResource ( this , GEOS_ARCHSITES . DATA ) ; org . geotools . data . wfs . protocol . wfs . GetFeatureParser parser = getParser ( featureName , schemaLocation , featureType , url ) ; int nof = parser . getNumberOfFeatures ( ) ; "<AssertPlaceHolder>" ; testParseGetFeatures ( featureName , featureType , parser , assertor , expectedCount ) ; } getNumberOfFeatures ( ) { return numberOfFeatures ; }
|
org . junit . Assert . assertEquals ( expectedCount , nof )
|
testConvert ( ) { java . util . List < hudson . plugins . jobConfigHistory . ConfigInfo > result = hudson . plugins . jobConfigHistory . HistoryDescrToConfigInfo . convert ( "Test1" , true , new java . util . ArrayList < hudson . plugins . jobConfigHistory . HistoryDescr > ( historyDao . getRevisions ( new hudson . XmlFile ( new java . io . File ( jenkinsHome , "jobs/Test1/config.xml" ) ) ) . values ( ) ) , true ) ; "<AssertPlaceHolder>" ; } getRevisions ( java . io . File , java . io . File ) { final java . io . File [ ] historyDirsOfItem = historiesDir . listFiles ( HistoryFileFilter . INSTANCE ) ; final java . util . TreeMap < java . lang . String , hudson . plugins . jobConfigHistory . HistoryDescr > map = new java . util . TreeMap < java . lang . String , hudson . plugins . jobConfigHistory . HistoryDescr > ( ) ; if ( historyDirsOfItem == null ) { return map ; } else { for ( java . io . File historyDir : historyDirsOfItem ) { final hudson . XmlFile historyXml = getHistoryXmlFile ( historyDir ) ; final hudson . plugins . jobConfigHistory . LazyHistoryDescr historyDescription = new hudson . plugins . jobConfigHistory . LazyHistoryDescr ( historyXml ) ; map . put ( historyDir . getName ( ) , historyDescription ) ; } return map ; } }
|
org . junit . Assert . assertEquals ( 5 , result . size ( ) )
|
write_max ( ) { com . asakusafw . runtime . value . DoubleOption option = new com . asakusafw . runtime . value . DoubleOption ( ) ; option . modify ( Double . POSITIVE_INFINITY ) ; com . asakusafw . runtime . value . DoubleOption restored = restore ( option ) ; "<AssertPlaceHolder>" ; } get ( ) { if ( canGet ) { return next ; } throw new java . io . IOException ( ) ; }
|
org . junit . Assert . assertThat ( restored . get ( ) , is ( option . get ( ) ) )
|
testIsLockedAndReadOnly_ForLockOwnerWithWriteLockType ( ) { when ( lockService . getLockStatus ( nodeRef ) ) . thenReturn ( LockStatus . LOCK_OWNER ) ; when ( lockService . getLockType ( nodeRef ) ) . thenReturn ( LockType . WRITE_LOCK ) ; boolean returnedVal = org . alfresco . repo . lock . LockUtils . isLockedAndReadOnly ( nodeRef , lockService ) ; "<AssertPlaceHolder>" ; } isLockedAndReadOnly ( org . alfresco . service . cmr . repository . NodeRef , org . alfresco . service . cmr . lock . LockService ) { org . alfresco . service . cmr . lock . LockStatus lockStatus = lockService . getLockStatus ( nodeRef ) ; switch ( lockStatus ) { case NO_LOCK : case LOCK_EXPIRED : return false ; case LOCK_OWNER : return ( lockService . getLockType ( nodeRef ) ) != ( org . alfresco . service . cmr . lock . LockType . WRITE_LOCK ) ; default : return true ; } }
|
org . junit . Assert . assertEquals ( false , returnedVal )
|
authenticateUserUsingGoodCredentialsAndAutoLoginEnabledExpectsSuccess ( ) { user . setId ( 26 ) ; when ( userService . validateLogin ( "user" , "passwd" ) ) . thenReturn ( user ) ; when ( config . getValue ( ConfigKeys . COOKIE_AUTO_LOGIN ) ) . thenReturn ( "x" ) ; when ( config . getValue ( ConfigKeys . COOKIE_USER_HASH ) ) . thenReturn ( "y" ) ; when ( config . getValue ( ConfigKeys . COOKIE_USER_ID ) ) . thenReturn ( "z" ) ; when ( userService . generateAutoLoginSecurityHash ( 26 ) ) . thenReturn ( "456" ) ; when ( userService . generateAutoLoginUserHash ( "456" ) ) . thenReturn ( "789" ) ; userController . authenticateUser ( "user" , "passwd" , true , null ) ; verify ( userSession ) . becomeLogged ( ) ; verify ( userSession ) . addCookie ( "x" , "1" ) ; verify ( userSession ) . addCookie ( "y" , "789" ) ; verify ( userSession ) . addCookie ( "z" , "26" ) ; "<AssertPlaceHolder>" ; } getSecurityHash ( ) { return this . securityHash ; }
|
org . junit . Assert . assertEquals ( "456" , user . getSecurityHash ( ) )
|
commitFilesInDifferentDepthDirectories_allFilesShouldExistInTheResultCommit ( ) { java . lang . String [ ] files = new java . lang . String [ ] { "/dir1/file11.txt" , "/dir2/dir21/file211.txt" , "/dir2/file22.txt" , "/dir2/file23.txt" } ; org . eclipse . jgit . revwalk . RevCommit commit = writeAndCommit ( files ) ; for ( java . lang . String file : files ) "<AssertPlaceHolder>" ; } exists ( java . lang . String , com . beijunyi . parallelgit . utils . AnyObjectId , com . beijunyi . parallelgit . utils . ObjectReader ) { return com . beijunyi . parallelgit . utils . TreeUtils . exists ( file , com . beijunyi . parallelgit . utils . GitFileUtils . getRootTree ( commit , reader ) , reader ) ; }
|
org . junit . Assert . assertTrue ( com . beijunyi . parallelgit . utils . GitFileUtils . exists ( file , commit , repo ) )
|
updateEnvironmentIsSuccessful ( ) { java . lang . String environmentName = ( uniqueName ) + "-environment" ; com . ibm . watson . discovery . v1 . model . CreateEnvironmentOptions createOptions = new com . ibm . watson . discovery . v1 . model . CreateEnvironmentOptions . Builder ( ) . name ( environmentName ) . build ( ) ; com . ibm . watson . discovery . v1 . model . Environment createResponse = createEnvironment ( createOptions ) ; java . lang . String randomDescription = ( java . util . UUID . randomUUID ( ) . toString ( ) ) + "<sp>appbuilder<sp>tests" ; com . ibm . watson . discovery . v1 . model . UpdateEnvironmentOptions . Builder updateBuilder = new com . ibm . watson . discovery . v1 . model . UpdateEnvironmentOptions . Builder ( createResponse . getEnvironmentId ( ) ) . name ( environmentName ) ; updateBuilder . description ( randomDescription ) ; com . ibm . watson . discovery . v1 . model . Environment updateResponse = discovery . updateEnvironment ( updateBuilder . build ( ) ) . execute ( ) . getResult ( ) ; "<AssertPlaceHolder>" ; } getDescription ( ) { return description ; }
|
org . junit . Assert . assertEquals ( randomDescription , updateResponse . getDescription ( ) )
|
executeTestWithOneCommand ( ) { final com . ctrip . platform . dal . dao . DalHints hints = new com . ctrip . platform . dal . dao . DalHints ( ) ; com . ctrip . platform . dal . dao . DalCommand command = new com . ctrip . platform . dal . dao . DalCommand ( ) { @ com . ctrip . platform . dal . dao . unittests . Override public boolean execute ( com . ctrip . platform . dal . dao . DalClient client ) throws java . sql . SQLException { java . lang . String sql = ( "DELETE<sp>FROM<sp>" + ( TABLE_NAME ) ) + "<sp>WHERE<sp>id<sp>=<sp>1" ; com . ctrip . platform . dal . dao . StatementParameters parameters = new com . ctrip . platform . dal . dao . StatementParameters ( ) ; return ( client . update ( sql , parameters , hints ) ) == 1 ; } } ; client . execute ( command , hints ) ; java . util . List < com . ctrip . platform . dal . dao . unitbase . ClientTestModel > models = this . queryModelsByIds ( 1 ) ; "<AssertPlaceHolder>" ; } size ( ) { return allKeys . size ( ) ; }
|
org . junit . Assert . assertEquals ( 0 , models . size ( ) )
|
Equals ( ) { com . mysema . rdfbean . model . Block block1 = com . mysema . rdfbean . model . Blocks . optional ( Blocks . SPOC ) ; com . mysema . rdfbean . model . Block block2 = com . mysema . rdfbean . model . Blocks . optionalFilter ( Blocks . SPOC , QNODE . o . lit ( ) . lt ( "X" ) ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( o == ( this ) ) { return true ; } else if ( o instanceof com . mysema . rdfbean . xsd . Year ) { return ( year ) == ( ( ( com . mysema . rdfbean . xsd . Year ) ( o ) ) . year ) ; } else { return false ; } }
|
org . junit . Assert . assertFalse ( block1 . equals ( block2 ) )
|
getShortestName_shouldReturnTheNameMarkedAsTheShortNameForTheLocaleIfItIsPresent ( ) { org . openmrs . Concept concept = new org . openmrs . Concept ( ) ; concept . addName ( new org . openmrs . ConceptName ( "shortName123" , org . openmrs . api . context . Context . getLocale ( ) ) ) ; concept . setShortName ( new org . openmrs . ConceptName ( "shortName12" , org . openmrs . api . context . Context . getLocale ( ) ) ) ; concept . setShortName ( new org . openmrs . ConceptName ( "shortName1" , java . util . Locale . US ) ) ; "<AssertPlaceHolder>" ; } getShortestName ( java . util . Locale , java . lang . Boolean ) { if ( org . openmrs . Concept . log . isDebugEnabled ( ) ) { org . openmrs . Concept . log . debug ( ( "Getting<sp>shortest<sp>conceptName<sp>for<sp>locale:<sp>" + locale ) ) ; } org . openmrs . ConceptName shortNameInLocale = getShortNameInLocale ( locale ) ; if ( shortNameInLocale != null ) { return shortNameInLocale ; } org . openmrs . ConceptName shortestNameForLocale = null ; org . openmrs . ConceptName shortestNameForConcept = null ; if ( locale != null ) { for ( org . openmrs . ConceptName possibleName : getNames ( ) ) { if ( ( possibleName . getLocale ( ) . equals ( locale ) ) && ( ( shortestNameForLocale == null ) || ( ( possibleName . getName ( ) . length ( ) ) < ( shortestNameForLocale . getName ( ) . length ( ) ) ) ) ) { shortestNameForLocale = possibleName ; } if ( ( shortestNameForConcept == null ) || ( ( possibleName . getName ( ) . length ( ) ) < ( shortestNameForConcept . getName ( ) . length ( ) ) ) ) { shortestNameForConcept = possibleName ; } } } if ( exact ) { if ( shortestNameForLocale == null ) { org . openmrs . Concept . log . warn ( ( ( ( "No<sp>short<sp>concept<sp>name<sp>found<sp>for<sp>concept<sp>id<sp>" + ( conceptId ) ) + "<sp>for<sp>locale<sp>" ) + ( locale . getDisplayName ( ) ) ) ) ; } return shortestNameForLocale ; } return shortestNameForConcept ; }
|
org . junit . Assert . assertEquals ( "shortName1" , concept . getShortestName ( Locale . US , null ) . getName ( ) )
|
extendedCharSet ( ) { org . krysalis . barcode4j . impl . code39 . Code39LogicImpl logic = new org . krysalis . barcode4j . impl . code39 . Code39LogicImpl ( org . krysalis . barcode4j . ChecksumMode . CP_IGNORE , false , false , true ) ; java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; logic . generateBarcodeLogic ( new org . krysalis . barcode4j . impl . MockClassicBarcodeLogicHandler ( sb ) , "a1$A" ) ; java . lang . String expected = "<BC>" + ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "<SBG:start-char:*>" + "<SBG:msg-char:*>B1W2B1W1B2W1B2W1B1</SBG>" ) + "W-1" 1 ) + "W-1" ) + "W-1" 0 ) + "W-1" ) + "<SBG:msg-char:A>B2W1B1W1B1W2B1W1B2</SBG>" ) + "W-1" ) + "<SBG:msg-char:1>B2W1B1W2B1W1B1W1B2</SBG>" ) + "W-1" ) + "<SBG:msg-char:/>B1W2B1W2B1W1B1W2B1</SBG>" ) + "W-1" ) + "<SBG:msg-char:D>B1W1B1W1B2W2B1W1B2</SBG>" ) + "W-1" ) + "<SBG:msg-char:A>B2W1B1W1B1W2B1W1B2</SBG>" ) + "W-1" ) + "<SBG:stop-char:*>" ) + "<SBG:msg-char:*>B1W2B1W1B2W1B2W1B1</SBG>" ) + "W-1" 1 ) + "W-1" 2 ) ; "<AssertPlaceHolder>" ; } toString ( ) { return value ; }
|
org . junit . Assert . assertEquals ( expected , sb . toString ( ) )
|
typedObjectFromLongAndDecimal ( ) { com . pardot . rhombus . cobject . CField field = new com . pardot . rhombus . cobject . CField ( "test" , "decimal" ) ; java . lang . Long jsonValue = 123456789012345L ; java . math . BigDecimal expected = java . math . BigDecimal . valueOf ( jsonValue ) ; java . lang . Object result = com . pardot . rhombus . util . JsonUtil . typedObjectFromValueAndField ( jsonValue , field ) ; "<AssertPlaceHolder>" ; } typedObjectFromValueAndField ( java . lang . Object , com . pardot . rhombus . cobject . CField ) { try { return com . pardot . rhombus . util . JsonUtil . typedObjectFromValueAndFieldType ( jsonValue , field . getType ( ) ) ; } catch ( java . lang . IllegalArgumentException e ) { throw new java . lang . IllegalArgumentException ( ( ( ( ( ( ( ( "Field<sp>" + ( field . getName ( ) ) ) + ":<sp>Unable<sp>to<sp>convert<sp>" ) + jsonValue ) + "<sp>of<sp>type<sp>" ) + ( jsonValue . getClass ( ) ) ) + "<sp>to<sp>C*<sp>type<sp>" ) + ( field . getType ( ) . toString ( ) ) ) ) ; } }
|
org . junit . Assert . assertEquals ( expected , result )
|
houdtRekeningMetActualiteitDienstbundel ( ) { dienst . getDienstbundel ( ) . setActueelEnGeldig ( false ) ; java . util . Collection < nl . bzk . brp . beheer . service . selectie . SelectieTaakDTO > taken = service . filter ( java . util . Collections . singleton ( taak ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return elementen . size ( ) ; }
|
org . junit . Assert . assertThat ( taken . size ( ) , org . hamcrest . CoreMatchers . is ( 0 ) )
|
nullReturnsEmptyString ( ) { "<AssertPlaceHolder>" ; } getDictionary ( ) { return this . dictionary ; }
|
org . junit . Assert . assertEquals ( "" , getDictionary ( ) . get ( null ) )
|
discardOutline ( ) { org . sejda . model . parameter . ExtractPagesParameters parameters = defaultCommandLine ( ) . withFlag ( "--discardOutline" ) . invokeSejdaConsole ( ) ; "<AssertPlaceHolder>" ; } discardOutline ( ) { return discardOutline ; }
|
org . junit . Assert . assertTrue ( parameters . discardOutline ( ) )
|
testCreateBusinessObjectDefinitionDescriptionSuggestion ( ) { org . finra . herd . model . api . xml . BusinessObjectDefinitionKey businessObjectDefinitionKey = new org . finra . herd . model . api . xml . BusinessObjectDefinitionKey ( NAMESPACE , BDEF_NAME ) ; org . finra . herd . model . api . xml . BusinessObjectDefinitionDescriptionSuggestionKey businessObjectDefinitionDescriptionSuggestionKey = new org . finra . herd . model . api . xml . BusinessObjectDefinitionDescriptionSuggestionKey ( NAMESPACE , BDEF_NAME , USER_ID ) ; org . finra . herd . model . api . xml . BusinessObjectDefinitionDescriptionSuggestionCreateRequest businessObjectDefinitionDescriptionSuggestionCreateRequest = new org . finra . herd . model . api . xml . BusinessObjectDefinitionDescriptionSuggestionCreateRequest ( businessObjectDefinitionDescriptionSuggestionKey , DESCRIPTION_SUGGESTION ) ; org . finra . herd . model . jpa . NamespaceEntity namespaceEntity = new org . finra . herd . model . jpa . NamespaceEntity ( ) ; namespaceEntity . setCode ( org . finra . herd . service . NAMESPACE ) ; org . finra . herd . model . jpa . BusinessObjectDefinitionEntity businessObjectDefinitionEntity = new org . finra . herd . model . jpa . BusinessObjectDefinitionEntity ( ) ; businessObjectDefinitionEntity . setNamespace ( namespaceEntity ) ; businessObjectDefinitionEntity . setName ( org . finra . herd . service . BDEF_NAME ) ; org . finra . herd . model . jpa . BusinessObjectDefinitionDescriptionSuggestionStatusEntity businessObjectDefinitionDescriptionSuggestionStatusEntity = new org . finra . herd . model . jpa . BusinessObjectDefinitionDescriptionSuggestionStatusEntity ( ) ; businessObjectDefinitionDescriptionSuggestionStatusEntity . setCode ( BusinessObjectDefinitionDescriptionSuggestionStatusEntity . BusinessObjectDefinitionDescriptionSuggestionStatuses . PENDING . name ( ) ) ; org . finra . herd . model . jpa . BusinessObjectDefinitionDescriptionSuggestionEntity businessObjectDefinitionDescriptionSuggestionEntity = new org . finra . herd . model . jpa . BusinessObjectDefinitionDescriptionSuggestionEntity ( ) ; businessObjectDefinitionDescriptionSuggestionEntity . setId ( org . finra . herd . service . ID ) ; businessObjectDefinitionDescriptionSuggestionEntity . setBusinessObjectDefinition ( businessObjectDefinitionEntity ) ; businessObjectDefinitionDescriptionSuggestionEntity . setUserId ( org . finra . herd . service . USER_ID ) ; businessObjectDefinitionDescriptionSuggestionEntity . setDescriptionSuggestion ( org . finra . herd . service . DESCRIPTION_SUGGESTION ) ; businessObjectDefinitionDescriptionSuggestionEntity . setStatus ( businessObjectDefinitionDescriptionSuggestionStatusEntity ) ; businessObjectDefinitionDescriptionSuggestionEntity . setCreatedBy ( org . finra . herd . service . CREATED_BY ) ; businessObjectDefinitionDescriptionSuggestionEntity . setCreatedOn ( new java . sql . Timestamp ( org . finra . herd . service . CREATED_ON . toGregorianCalendar ( ) . getTimeInMillis ( ) ) ) ; businessObjectDefinitionDescriptionSuggestionEntity . setUpdatedBy ( org . finra . herd . service . UPDATED_BY ) ; businessObjectDefinitionDescriptionSuggestionEntity . setUpdatedOn ( new java . sql . Timestamp ( org . finra . herd . service . UPDATED_ON . toGregorianCalendar ( ) . getTimeInMillis ( ) ) ) ; org . finra . herd . model . api . xml . BusinessObjectDefinitionDescriptionSuggestion businessObjectDefinitionDescriptionSuggestion = new org . finra . herd . model . api . xml . BusinessObjectDefinitionDescriptionSuggestion ( ID , businessObjectDefinitionDescriptionSuggestionKey , DESCRIPTION_SUGGESTION , BusinessObjectDefinitionDescriptionSuggestionStatusEntity . BusinessObjectDefinitionDescriptionSuggestionStatuses . PENDING . name ( ) , CREATED_BY , CREATED_ON ) ; when ( alternateKeyHelper . validateStringParameter ( "namespace" , org . finra . herd . service . NAMESPACE ) ) . thenReturn ( org . finra . herd . service . NAMESPACE ) ; when ( alternateKeyHelper . validateStringParameter ( "business<sp>object<sp>definition<sp>name" , org . finra . herd . service . BDEF_NAME ) ) . thenReturn ( org . finra . herd . service . BDEF_NAME ) ; when ( alternateKeyHelper . validateStringParameter ( "user<sp>id" , org . finra . herd . service . USER_ID ) ) . thenReturn ( org . finra . herd . service . USER_ID ) ; when ( businessObjectDefinitionDaoHelper . getBusinessObjectDefinitionEntity ( businessObjectDefinitionKey ) ) . thenReturn ( businessObjectDefinitionEntity ) ; when ( businessObjectDefinitionDescriptionSuggestionStatusDaoHelper . getBusinessObjectDefinitionDescriptionSuggestionStatusEntity ( BusinessObjectDefinitionDescriptionSuggestionStatusEntity . BusinessObjectDefinitionDescriptionSuggestionStatuses . PENDING . name ( ) ) ) . thenReturn ( businessObjectDefinitionDescriptionSuggestionStatusEntity ) ; when ( businessObjectDefinitionDescriptionSuggestionDao . getBusinessObjectDefinitionDescriptionSuggestionByBusinessObjectDefinitionAndUserId ( businessObjectDefinitionEntity , businessObjectDefinitionDescriptionSuggestionKey . getUserId ( ) ) ) . thenReturn ( null ) ; when ( businessObjectDefinitionDescriptionSuggestionDao . saveAndRefresh ( any ( org . finra . herd . model . jpa . BusinessObjectDefinitionDescriptionSuggestionEntity . class ) ) ) . thenReturn ( businessObjectDefinitionDescriptionSuggestionEntity ) ; org . finra . herd . model . api . xml . BusinessObjectDefinitionDescriptionSuggestion result = businessObjectDefinitionDescriptionSuggestionService . createBusinessObjectDefinitionDescriptionSuggestion ( businessObjectDefinitionDescriptionSuggestionCreateRequest ) ; "<AssertPlaceHolder>" ; verify ( alternateKeyHelper ) . validateStringParameter ( "namespace" , org . finra . herd . service . NAMESPACE ) ; verify ( alternateKeyHelper ) . validateStringParameter ( "business<sp>object<sp>definition<sp>name" , org . finra . herd . service . BDEF_NAME ) ; verify ( alternateKeyHelper ) . validateStringParameter ( "user<sp>id" , org . finra . herd . service . USER_ID ) ; verify ( businessObjectDefinitionDaoHelper ) . getBusinessObjectDefinitionEntity ( businessObjectDefinitionKey ) ; verify ( businessObjectDefinitionDescriptionSuggestionStatusDaoHelper ) . getBusinessObjectDefinitionDescriptionSuggestionStatusEntity ( BusinessObjectDefinitionDescriptionSuggestionStatusEntity . BusinessObjectDefinitionDescriptionSuggestionStatuses . PENDING . name ( ) ) ; verify ( businessObjectDefinitionDescriptionSuggestionDao ) . getBusinessObjectDefinitionDescriptionSuggestionByBusinessObjectDefinitionAndUserId ( businessObjectDefinitionEntity , businessObjectDefinitionDescriptionSuggestionKey . getUserId ( ) ) ; verify ( businessObjectDefinitionDescriptionSuggestionDao ) . saveAndRefresh ( any ( org . finra . herd . model . jpa . BusinessObjectDefinitionDescriptionSuggestionEntity . class ) ) ; verify ( messageNotificationEventService ) . processBusinessObjectDefinitionDescriptionSuggestionChangeNotificationEvent ( businessObjectDefinitionDescriptionSuggestion , org . finra . herd . service . UPDATED_BY , org . finra . herd . service . UPDATED_ON , namespaceEntity ) ; verifyNoMoreInteractionsHelper ( ) ; } createBusinessObjectDefinitionDescriptionSuggestion ( org . finra . herd . model . api . xml . BusinessObjectDefinitionDescriptionSuggestionCreateRequest ) { return businessObjectDefinitionDescriptionSuggestionService . createBusinessObjectDefinitionDescriptionSuggestion ( request ) ; }
|
org . junit . Assert . assertEquals ( businessObjectDefinitionDescriptionSuggestion , result )
|
cutOneChild ( ) { container . children . add ( new jetbrains . jetpad . projectional . cell . ProjectionalListSynchronizerTest . EmptyChild ( ) ) ; selectChild ( 0 ) ; press ( KeyStrokeSpecs . SELECT_AFTER ) ; press ( KeyStrokeSpecs . CUT ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return ( jetbrains . jetpad . cell . text . TextNavigationTrait . getMinPos ( myEditor ) ) == ( jetbrains . jetpad . cell . text . TextNavigationTrait . getMaxPos ( myEditor ) ) ; }
|
org . junit . Assert . assertTrue ( container . children . isEmpty ( ) )
|
test0_1 ( ) { com . examples . with . different . packagename . testcarver . Person person0 = new com . examples . with . different . packagename . testcarver . Person ( "" , "" ) ; java . lang . String string0 = person0 . getFirstName ( ) ; "<AssertPlaceHolder>" ; } getFirstName ( ) { return firstName ; }
|
org . junit . Assert . assertEquals ( "" , string0 )
|
resizerWhereSourceWidthSmallerThanDestination ( ) { net . coobird . thumbnailator . resizers . Resizer resizer = Resizers . BICUBIC ; net . coobird . thumbnailator . resizers . ResizerFactory factory = new net . coobird . thumbnailator . resizers . FixedResizerFactory ( resizer ) ; java . awt . Dimension sourceDimension = new java . awt . Dimension ( 50 , 100 ) ; java . awt . Dimension targetDimension = new java . awt . Dimension ( 100 , 100 ) ; net . coobird . thumbnailator . resizers . Resizer receivedResizer = factory . getResizer ( sourceDimension , targetDimension ) ; "<AssertPlaceHolder>" ; } getResizer ( java . awt . Dimension , java . awt . Dimension ) { return resizer ; }
|
org . junit . Assert . assertEquals ( resizer , receivedResizer )
|
testLoadNull ( ) { initializeExpectedProject ( 1 ) ; expect ( resourceManager . get ( com . google . cloud . resourcemanager . ProjectTest . PROJECT_INFO . getProjectId ( ) ) ) . andReturn ( null ) ; replay ( resourceManager ) ; "<AssertPlaceHolder>" ; } get ( java . lang . String ) { com . google . cloud . datastore . Datastore datastore = transaction . getDatastore ( ) ; com . google . cloud . datastore . Key key = datastore . newKeyFactory ( ) . setKind ( "MyKind" ) . newKey ( keyName ) ; com . google . cloud . datastore . Entity entity = transaction . get ( key ) ; transaction . commit ( ) ; return entity ; }
|
org . junit . Assert . assertNull ( resourceManager . get ( com . google . cloud . resourcemanager . ProjectTest . PROJECT_INFO . getProjectId ( ) ) )
|
testCrc32Checksum ( ) { java . util . zip . CRC32 crc32 = new java . util . zip . CRC32 ( ) ; crc32 . update ( software . amazon . awssdk . core . util . Crc32ChecksumInputStreamTest . TEST_DATA . getBytes ( ) ) ; long expectedCRC32Checksum = crc32 . getValue ( ) ; software . amazon . awssdk . core . internal . util . Crc32ChecksumCalculatingInputStream crc32InputStream = new software . amazon . awssdk . core . internal . util . Crc32ChecksumCalculatingInputStream ( new java . io . ByteArrayInputStream ( software . amazon . awssdk . core . util . Crc32ChecksumInputStreamTest . TEST_DATA . getBytes ( ) ) ) ; while ( ( crc32InputStream . read ( ) ) != ( - 1 ) ) { } "<AssertPlaceHolder>" ; } getCrc32Checksum ( ) { return crc32 . getValue ( ) ; }
|
org . junit . Assert . assertEquals ( expectedCRC32Checksum , crc32InputStream . getCrc32Checksum ( ) )
|
testM4Comments ( ) { java . lang . String text = "dnl<sp>#<sp>comment\n" ; org . eclipse . jface . text . IDocument document = createDocument ( text ) ; java . util . List < org . eclipse . cdt . autotools . ui . editors . parser . Token > tokens = tokenize ( document , true ) ; checkNoErrors ( ) ; "<AssertPlaceHolder>" ; checkToken ( tokens . get ( 0 ) , document , ITokenConstants . WORD , "dnl" ) ; checkToken ( tokens . get ( 1 ) , document , ITokenConstants . M4_COMMENT , "#<sp>comment\n" ) ; } size ( ) { return fSize ; }
|
org . junit . Assert . assertEquals ( 2 , tokens . size ( ) )
|
validationOfUnknownPropertyInlineNamespaceSuccess ( ) { java . lang . String roomWithValidNamespaces = "<?xml<sp>version='1.0'<sp>encoding='UTF-8'?>" + ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "Rooms" 4 http : com . sap . core . odata . api . edm . EdmEntitySet entitySet = com . sap . core . odata . testutil . mock . MockFacade . getMockEdm ( ) . getDefaultEntityContainer ( ) . getEntitySet ( "Rooms" ) ; java . io . InputStream reqContent = createContentAsStream ( roomWithValidNamespaces ) ; com . sap . core . odata . core . ep . consumer . XmlEntityConsumer xec = new com . sap . core . odata . core . ep . consumer . XmlEntityConsumer ( ) ; com . sap . core . odata . api . ep . entry . ODataEntry result = xec . readEntry ( entitySet , reqContent , com . sap . core . odata . api . ep . EntityProviderReadProperties . init ( ) . mergeSemantic ( false ) . build ( ) ) ; "<AssertPlaceHolder>" ; } build ( ) { if ( ( ( method ) == null ) || ( ( uri ) == null ) ) { throw new java . lang . IllegalArgumentException ( ) ; } this . method = method ; this . headers = headers ; this . body = body ; this . uri = uri ; this . contentId = contentId ; return this ; }
|
org . junit . Assert . assertNotNull ( result )
|
SyncHeadBooleanRequest ( ) { final boolean result = createService ( com . azure . common . implementation . RestProxyTests . Service10 . class ) . headBoolean ( ) ; "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertTrue ( result )
|
itGetsNamedQueries ( ) { "<AssertPlaceHolder>" ; verify ( session ) . getNamedQuery ( "query-name" ) ; } getNamedQuery ( java . lang . String ) { return namedQuery ( name ) ; }
|
org . junit . Assert . assertThat ( dao . getNamedQuery ( "query-name" ) , org . hamcrest . CoreMatchers . is ( query ) )
|
getValuesWithString ( ) { final ai . labs . behavior . impl . conditions . HashMap < java . lang . String , java . lang . String > expected = setupValuesWithString ( ) ; ai . labs . behavior . impl . conditions . Map < java . lang . String , java . lang . String > actual = contextMatcher . getValues ( ) ; "<AssertPlaceHolder>" ; } setupValuesWithString ( ) { final ai . labs . behavior . impl . conditions . HashMap < java . lang . String , java . lang . String > expected = new ai . labs . behavior . impl . conditions . HashMap ( ) ; expected . put ( "contextKey" , "someContextKey" ) ; expected . put ( "contextType" , ContextMatcher . ContextType . string . toString ( ) ) ; expected . put ( "string" , "someString" ) ; contextMatcher . setConfigs ( expected ) ; return expected ; }
|
org . junit . Assert . assertEquals ( expected , actual )
|
testB ( ) { net . i2p . crypto . eddsa . math . GroupElement B = net . i2p . crypto . eddsa . math . ConstantsTest . ed25519 . getB ( ) ; "<AssertPlaceHolder>" ; } isOnCurve ( net . i2p . crypto . eddsa . math . Curve ) { switch ( repr ) { case P2 : case P3 : net . i2p . crypto . eddsa . math . FieldElement recip = Z . invert ( ) ; net . i2p . crypto . eddsa . math . FieldElement x = X . multiply ( recip ) ; net . i2p . crypto . eddsa . math . FieldElement y = Y . multiply ( recip ) ; net . i2p . crypto . eddsa . math . FieldElement xx = x . square ( ) ; net . i2p . crypto . eddsa . math . FieldElement yy = y . square ( ) ; net . i2p . crypto . eddsa . math . FieldElement dxxyy = curve . getD ( ) . multiply ( xx ) . multiply ( yy ) ; return curve . getField ( ) . ONE . add ( dxxyy ) . add ( xx ) . equals ( yy ) ; default : return toP2 ( ) . isOnCurve ( curve ) ; } }
|
org . junit . Assert . assertThat ( B . isOnCurve ( net . i2p . crypto . eddsa . math . ConstantsTest . curve ) , org . hamcrest . Matchers . is ( true ) )
|
readData_Exception_readAllLine ( ) { org . mockito . Mockito . when ( filereader . fileExist ( org . mockito . Mockito . anyString ( ) ) ) . thenReturn ( true ) ; org . mockito . Mockito . when ( filereader . readAllLine ( org . mockito . Mockito . anyString ( ) ) ) . thenThrow ( new java . io . IOException ( "Exception_readAllLine" ) ) ; java . util . List < com . att . aro . core . peripheral . pojo . GpsInfo > info = gpsEventReader . readData ( "/" , 0 , 0 ) ; "<AssertPlaceHolder>" ; } size ( ) { return sessionTable . size ( ) ; }
|
org . junit . Assert . assertTrue ( ( ( info . size ( ) ) == 0 ) )
|
testAccept ( ) { com . thoughtworks . qdox . model . expression . ExpressionVisitor visitor = mock ( com . thoughtworks . qdox . model . expression . ExpressionVisitor . class ) ; com . thoughtworks . qdox . model . expression . GreaterThan expr = new com . thoughtworks . qdox . model . expression . GreaterThan ( null , null ) ; java . lang . Object visitResult = new java . lang . Object ( ) ; when ( visitor . visit ( expr ) ) . thenReturn ( visitResult ) ; "<AssertPlaceHolder>" ; } accept ( com . thoughtworks . qdox . model . expression . ExpressionVisitor ) { return visitor . visit ( this ) ; }
|
org . junit . Assert . assertSame ( expr . accept ( visitor ) , visitResult )
|
testUndefinedLiteralExp01 ( ) { testpackage . Class1 class1 ; class1 = new testpackage . Class1 ( ) ; "<AssertPlaceHolder>" ; } testUndefinedLiteralExp01 ( ) { testpackage . Class1 class1 ; class1 = new testpackage . Class1 ( ) ; org . junit . Assert . assertNull ( class1 . testUndefinedLiteralExp01 ( ) ) ; }
|
org . junit . Assert . assertNull ( class1 . testUndefinedLiteralExp01 ( ) )
|
testCreateQuestionGroupFailure ( ) { org . mifos . platform . questionnaire . ui . model . QuestionGroupForm questionGroupForm = getQuestionGroupForm ( org . mifos . platform . questionnaire . ui . controller . QuestionGroupControllerTest . TITLE , "Create.Client" , "S1" , "S2" ) ; when ( requestContext . getMessageContext ( ) ) . thenReturn ( messageContext ) ; doThrow ( new org . mifos . framework . exceptions . SystemException ( "questionnaire.error.duplicate.question.found.in.section" ) ) . when ( questionnaireServiceFacade ) . createActiveQuestionGroup ( org . mockito . Matchers . < org . mifos . platform . questionnaire . service . QuestionGroupDetail > anyObject ( ) ) ; java . lang . String result = questionGroupController . defineQuestionGroup ( questionGroupForm , requestContext , true ) ; "<AssertPlaceHolder>" ; verify ( questionnaireServiceFacade ) . createActiveQuestionGroup ( org . mockito . Matchers . < org . mifos . platform . questionnaire . service . QuestionGroupDetail > anyObject ( ) ) ; verify ( requestContext ) . getMessageContext ( ) ; verify ( messageContext ) . addMessage ( argThat ( new org . mifos . platform . matchers . MessageMatcher ( "questionnaire.error.duplicate.question.found.in.section" ) ) ) ; } defineQuestionGroup ( org . mifos . platform . questionnaire . ui . model . QuestionGroupForm , org . springframework . webflow . execution . RequestContext , boolean ) { java . lang . String result = "success" ; if ( ! ( questionGroupHasErrors ( questionGroupForm , requestContext ) ) ) { org . mifos . platform . questionnaire . service . QuestionGroupDetail questionGroupDetail = null ; try { if ( createMode ) { questionGroupForm . setActive ( true ) ; } if ( questionGroupForm . isActive ( ) ) { questionGroupDetail = questionnaireServiceFacade . createActiveQuestionGroup ( questionGroupForm . getQuestionGroupDetail ( ) ) ; } else { questionGroupDetail = questionnaireServiceFacade . createQuestionGroup ( questionGroupForm . getQuestionGroupDetail ( ) ) ; } if ( ( containsCreateLoanEventSource ( questionGroupForm . getEventSources ( ) ) ) && ( questionGroupForm . getApplyToAllLoanProducts ( ) ) ) { questionnaireServiceFacade . applyToAllLoanProducts ( questionGroupDetail . getId ( ) ) ; } java . util . List < org . mifos . platform . questionnaire . service . QuestionLinkDetail > questionLinkDetails = setFilledQuestionDetailForQuestionLinks ( questionGroupForm . getQuestionLinks ( ) , questionGroupDetail ) ; java . util . List < org . mifos . platform . questionnaire . service . SectionLinkDetail > sectionLinkDetails = setFilledSectionDetailForQuestionLinks ( questionGroupForm . getSectionLinks ( ) , questionGroupDetail ) ; questionnaireServiceFacade . createQuestionLinks ( questionLinkDetails ) ; questionnaireServiceFacade . createSectionLinks ( sectionLinkDetails ) ; } catch ( org . springframework . security . access . AccessDeniedException e ) { constructAndLogSystemError ( requestContext . getMessageContext ( ) , new org . mifos . framework . exceptions . SystemException ( org . mifos . platform . questionnaire . QuestionnaireConstants . MISSING_PERMISSION_TO_ACTIVATE_QG , e ) ) ; result = "failure" ; } catch ( org . mifos . framework . exceptions . SystemException e ) { constructAndLogSystemError ( requestContext . getMessageContext ( ) , e ) ; result = "failure" ; } } else { result = "failure" ; } return result ; }
|
org . junit . Assert . assertThat ( result , org . hamcrest . core . Is . is ( "failure" ) )
|
testGetStreamingInterval ( ) { long result = fFixture . getStreamingInterval ( ) ; "<AssertPlaceHolder>" ; } getStreamingInterval ( ) { long interval = 0 ; for ( final org . eclipse . tracecompass . tmf . core . trace . ITmfTrace trace : getChildren ( org . eclipse . tracecompass . tmf . core . trace . ITmfTrace . class ) ) { interval = java . lang . Math . max ( interval , trace . getStreamingInterval ( ) ) ; } return interval ; }
|
org . junit . Assert . assertEquals ( 0L , result )
|
testSerial ( ) { org . apache . commons . math4 . util . BigReal [ ] Reals = new org . apache . commons . math4 . util . BigReal [ ] { new org . apache . commons . math4 . util . BigReal ( 3.0 ) , org . apache . commons . math4 . util . BigReal . ONE , org . apache . commons . math4 . util . BigReal . ZERO , new org . apache . commons . math4 . util . BigReal ( 17 ) , new org . apache . commons . math4 . util . BigReal ( org . apache . commons . math4 . util . FastMath . PI ) , new org . apache . commons . math4 . util . BigReal ( ( - 2.5 ) ) } ; for ( org . apache . commons . math4 . util . BigReal Real : Reals ) { "<AssertPlaceHolder>" ; } } serializeAndRecover ( java . lang . Object ) { try { java . io . ByteArrayOutputStream bos = new java . io . ByteArrayOutputStream ( ) ; java . io . ObjectOutputStream so = new java . io . ObjectOutputStream ( bos ) ; so . writeObject ( o ) ; java . io . ByteArrayInputStream bis = new java . io . ByteArrayInputStream ( bos . toByteArray ( ) ) ; java . io . ObjectInputStream si = new java . io . ObjectInputStream ( bis ) ; return si . readObject ( ) ; } catch ( java . lang . Exception e ) { throw new java . lang . RuntimeException ( e ) ; } }
|
org . junit . Assert . assertEquals ( Real , org . apache . commons . math4 . TestUtils . serializeAndRecover ( Real ) )
|
testRemoteLoaderDelagatesOnFail ( ) { java . lang . String flowName = "org.neuro4j.workflow.flows.FlowForClasspathLoader-Start1" ; java . lang . String remoteUrl = "http://mydomain.com/" + flowName ; when ( workflowLoader . load ( remoteUrl ) ) . thenReturn ( workflow ) ; org . neuro4j . workflow . loader . RemoteWorkflowLoader subject = new org . neuro4j . workflow . loader . RemoteWorkflowLoader ( converter , workflowLoader , ( c ) -> { throw new java . lang . RuntimeException ( "Connection<sp>error" ) ; } , ( s ) -> s ) { } ; org . neuro4j . workflow . common . Workflow actual = subject . load ( remoteUrl ) ; "<AssertPlaceHolder>" ; verify ( workflowLoader , times ( 1 ) ) . load ( remoteUrl ) ; } load ( java . lang . String ) { org . neuro4j . workflow . common . Workflow workflow = cache . get ( name ) ; if ( workflow == null ) { workflow = delegate . load ( name ) ; } return workflow ; }
|
org . junit . Assert . assertNotNull ( actual )
|
testConvert ( ) { java . lang . String name = "AdminUnitN" ; java . lang . String abbrName = "AN" ; org . lnu . is . domain . admin . unit . type . AdminUnitType source = new org . lnu . is . domain . admin . unit . type . AdminUnitType ( ) ; source . setName ( name ) ; source . setAbbrName ( abbrName ) ; org . lnu . is . resource . adminunit . type . AdminUnitTypeResource expected = new org . lnu . is . resource . adminunit . type . AdminUnitTypeResource ( ) ; expected . setName ( name ) ; expected . setAbbrName ( abbrName ) ; org . lnu . is . resource . adminunit . type . AdminUnitTypeResource actual = unit . convert ( source ) ; "<AssertPlaceHolder>" ; } convert ( org . lnu . is . domain . admin . unit . AdminUnit ) { return convert ( source , new org . lnu . is . resource . adminunit . AdminUnitResource ( ) ) ; }
|
org . junit . Assert . assertEquals ( expected , actual )
|
testEvaluate04 ( ) { java . util . List < org . apache . kylin . metadata . model . TblColRef > groups = buildGroups ( ) ; org . apache . kylin . metadata . filter . TupleFilter filter = buildCompareCaseFilter ( groups , "0" ) ; byte [ ] bytes = org . apache . kylin . metadata . filter . TupleFilterSerializer . serialize ( filter , org . apache . kylin . storage . hbase . common . coprocessor . CS ) ; org . apache . kylin . metadata . filter . TupleFilter newFilter = org . apache . kylin . metadata . filter . TupleFilterSerializer . deserialize ( bytes , org . apache . kylin . storage . hbase . common . coprocessor . CS ) ; int number = 10000 ; int [ ] matcheCounts = new int [ ] { 0 , 0 , 0 } ; java . util . Collection < org . apache . kylin . metadata . tuple . Tuple > tuples = generateTuple ( number , groups , matcheCounts ) ; int match = evaluateTuples ( tuples , newFilter ) ; "<AssertPlaceHolder>" ; } evaluateTuples ( java . util . Collection , org . apache . kylin . metadata . filter . TupleFilter ) { int match = 0 ; for ( org . apache . kylin . metadata . tuple . Tuple t : tuples ) { if ( filter . evaluate ( t , org . apache . kylin . storage . hbase . common . coprocessor . FilterBaseTest . CS ) ) { match ++ ; } } return match ; }
|
org . junit . Assert . assertEquals ( match , matcheCounts [ 2 ] )
|
testTrueGeenSluitingVerzoek ( ) { final java . util . Set < nl . bzk . migratiebrp . synchronisatie . dal . domein . brp . kern . entity . Relatie > relatieSet = java . util . Collections . singleton ( relatie ) ; org . mockito . Mockito . when ( persoon . getRelaties ( ) ) . thenReturn ( relatieSet ) ; org . mockito . Mockito . when ( relatie . getSoortRelatie ( ) ) . thenReturn ( SoortRelatie . HUWELIJK ) ; final nl . bzk . migratiebrp . bericht . model . sync . impl . VerwerkToevalligeGebeurtenisVerzoekBericht verzoek = new nl . bzk . migratiebrp . bericht . model . sync . impl . VerwerkToevalligeGebeurtenisVerzoekBericht ( ) ; final nl . bzk . migratiebrp . bericht . model . sync . generated . RelatieType . Sluiting sluiting = new nl . bzk . migratiebrp . bericht . model . sync . generated . RelatieType . Sluiting ( ) ; final nl . bzk . migratiebrp . bericht . model . sync . generated . RelatieType relatieType = new nl . bzk . migratiebrp . bericht . model . sync . generated . RelatieType ( ) ; relatieType . setSluiting ( sluiting ) ; verzoek . setRelatie ( relatieType ) ; "<AssertPlaceHolder>" ; } controleer ( nl . bzk . migratiebrp . synchronisatie . dal . domein . brp . kern . entity . Persoon , nl . bzk . migratiebrp . bericht . model . sync . impl . VerwerkToevalligeGebeurtenisVerzoekBericht ) { final nl . bzk . migratiebrp . bericht . model . sync . generated . PersoonType persoon = verzoek . getPersoon ( ) ; if ( persoon == null ) { return false ; } return rootPersoon . getPersoonOverlijdenHistorieSet ( ) . isEmpty ( ) ; }
|
org . junit . Assert . assertTrue ( subject . controleer ( persoon , verzoek ) )
|
testExamTypeSets ( ) { java . lang . String code = "" ; try { code = _setupTestExamType ( true ) ; _checkExamTypeIntoDb ( code ) ; } catch ( java . lang . Exception e ) { e . printStackTrace ( ) ; "<AssertPlaceHolder>" ; } return ; } _checkExamTypeIntoDb ( java . lang . String ) { org . isf . exatype . model . ExamType foundExamType ; foundExamType = ( ( org . isf . exatype . model . ExamType ) ( org . isf . exatype . test . Tests . jpa . find ( org . isf . exatype . model . ExamType . class , code ) ) ) ; org . isf . exatype . test . Tests . testExamType . check ( foundExamType ) ; return ; }
|
org . junit . Assert . assertEquals ( true , false )
|
testGetBytes ( ) { "<AssertPlaceHolder>" ; } getBytes ( ) { return bytes ; }
|
org . junit . Assert . assertArrayEquals ( bytes , entry . getBytes ( ) )
|
testFactoryConfiguration ( ) { _startExtension ( "aBundle" , new com . liferay . portal . configuration . extender . internal . test . ConfiguratorExtensionTest . StringFactoryNamedConfigurationContent ( "test.factory.pid" , "default" , "key=value" ) ) ; org . osgi . service . cm . Configuration [ ] configurations = _configurationAdmin . listConfigurations ( null ) ; "<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 ( configurations ) , 1 , configurations . length )
|
providesCorrectLineNumberForError ( ) { java . lang . String threeLineScript = "alert(1)\nalert(2)\nthis<sp>is<sp>not<sp>valid<sp>JavaScript" ; com . eviware . soapui . impl . rest . actions . oauth . JavaScriptValidationError validationError = javaScriptValidator . validate ( threeLineScript ) ; "<AssertPlaceHolder>" ; } getLineNumber ( ) { return ( xmlError ) == null ? - 1 : xmlError . getLine ( ) ; }
|
org . junit . Assert . assertThat ( validationError . getLineNumber ( ) , org . hamcrest . core . Is . is ( 3 ) )
|
testGetIsObject ( ) { com . eclipsesource . v8 . V8Object object = v8 . executeObjectScript ( "foo<sp>=<sp>{key:<sp>{}}" ) ; java . lang . Object result = object . get ( "key" ) ; "<AssertPlaceHolder>" ; object . close ( ) ; ( ( com . eclipsesource . v8 . Releasable ) ( result ) ) . release ( ) ; } get ( byte [ ] ) { v8 . checkThread ( ) ; checkReleased ( ) ; byteBuffer . get ( dst ) ; return this ; }
|
org . junit . Assert . assertTrue ( ( result instanceof com . eclipsesource . v8 . V8Object ) )
|
iCanLogAdministrator ( ) { org . nuxeo . ecm . webengine . test . LoginPage login = home . getLoginPage ( ) ; "<AssertPlaceHolder>" ; login . ensureLogin ( "Administrator" , "Administrator" ) ; } isAuthenticated ( ) { if ( ! ( actual . isAuthenticated ( ) ) ) { failWithMessage ( "is<sp>not<sp>authenticated" ) ; } return this ; }
|
org . junit . Assert . assertFalse ( login . isAuthenticated ( ) )
|
testCarCollectionTooMany ( ) { java . util . List < com . baidu . unbiz . fluentvalidator . dto . Car > cars = getValidCarsTooMany ( ) ; com . baidu . unbiz . fluentvalidator . Result ret = com . baidu . unbiz . fluentvalidator . FluentValidator . checkAll ( ) . configure ( new com . baidu . unbiz . fluentvalidator . registry . impl . SimpleRegistry ( ) ) . onEach ( cars ) . doValidate ( ) . result ( com . baidu . unbiz . fluentvalidator . ResultCollectors . toSimple ( ) ) ; System . out . println ( ret ) ; "<AssertPlaceHolder>" ; } isSuccess ( ) { return isSuccess ; }
|
org . junit . Assert . assertThat ( ret . isSuccess ( ) , org . hamcrest . core . Is . is ( true ) )
|
testJwsJsonPlainTextHmacXML ( ) { java . lang . String address = ( "https://localhost:" + ( org . apache . cxf . systest . jaxrs . security . jose . jwejws . JAXRSJwsJsonTest . PORT ) ) + "/jwsjsonhmac" ; org . apache . cxf . systest . jaxrs . security . jose . BookStore bs = createBookStore ( address , "org/apache/cxf/systest/jaxrs/security/secret.jwk.properties" , null ) ; java . lang . String text = bs . echoText ( "book" ) ; "<AssertPlaceHolder>" ; } echoText ( java . lang . String ) { return text ; }
|
org . junit . Assert . assertEquals ( "book" , text )
|
testSetValue ( ) { root . addChild ( "foo" , org . kaazing . net . impl . auth . NodeTest . NodeType . TEST ) ; DefaultDispatchChallengeHandler . Node < java . lang . String , org . kaazing . net . impl . auth . NodeTest . NodeType > foo = root . getChild ( "foo" ) ; foo . appendValues ( "VALUE" ) ; "<AssertPlaceHolder>" ; } getValues ( ) { return values ; }
|
org . junit . Assert . assertEquals ( java . util . Arrays . asList ( "VALUE" ) , foo . getValues ( ) )
|
testVoerRegelUitZonderVerwantschap ( ) { final nl . bzk . brp . model . bericht . kern . FamilierechtelijkeBetrekkingBericht nieuweSituatie = maakFamilierechtelijkeBetrekkingBericht ( ) ; final java . util . Map < java . lang . String , nl . bzk . brp . model . hisvolledig . momentview . kern . PersoonView > bestaandeBetrokkenen = new java . util . HashMap ( ) ; final nl . bzk . brp . model . hisvolledig . momentview . kern . PersoonView persoonViewMoeder = new nl . bzk . brp . model . hisvolledig . momentview . kern . PersoonView ( maakMoeder ( false , false ) ) ; final nl . bzk . brp . model . hisvolledig . momentview . kern . PersoonView persoonViewVader = new nl . bzk . brp . model . hisvolledig . momentview . kern . PersoonView ( maakVader ( false , false ) ) ; bestaandeBetrokkenen . put ( ( "" + ( nl . bzk . brp . bijhouding . business . regels . impl . bijhouding . afstamming . acties . afstamming . BRBY0134Test . MOEDER_BSN ) ) , persoonViewMoeder ) ; bestaandeBetrokkenen . put ( ( "" + ( nl . bzk . brp . bijhouding . business . regels . impl . bijhouding . afstamming . acties . afstamming . BRBY0134Test . VADER_BSN ) ) , persoonViewVader ) ; org . mockito . Mockito . when ( brby0001 . isErVerwantschap ( org . mockito . Matchers . any ( nl . bzk . brp . model . hisvolledig . momentview . kern . PersoonView . class ) , org . mockito . Matchers . any ( nl . bzk . brp . model . hisvolledig . momentview . kern . PersoonView . class ) ) ) . thenReturn ( false ) ; final java . util . List < nl . bzk . brp . model . basis . BerichtEntiteit > resultaat = brby0134 . voerRegelUit ( null , nieuweSituatie , maakActie ( ) , bestaandeBetrokkenen ) ; "<AssertPlaceHolder>" ; } size ( ) { return elementen . size ( ) ; }
|
org . junit . Assert . assertEquals ( 0 , resultaat . size ( ) )
|
getGetValue ( ) { "<AssertPlaceHolder>" ; } get ( ) { throw new java . lang . IllegalStateException ( "value<sp>is<sp>absent" ) ; }
|
org . junit . Assert . assertEquals ( "foo" , subject . get ( ) )
|
testGetAttributeAsStringStringString ( ) { int val = 13123 ; com . j256 . simplejmx . client . JmxClientTest . client . setAttribute ( com . j256 . simplejmx . client . JmxClientTest . objectName , "x" , val ) ; java . lang . String result = com . j256 . simplejmx . client . JmxClientTest . client . getAttributeString ( com . j256 . simplejmx . client . JmxClientTest . JMX_DOMAIN , com . j256 . simplejmx . client . JmxClientTest . beanName , "x" ) ; "<AssertPlaceHolder>" ; } getAttributeString ( java . lang . String , java . lang . String , java . lang . String ) { return getAttributeString ( com . j256 . simplejmx . common . ObjectNameUtil . makeObjectName ( domain , beanName ) , attributeName ) ; }
|
org . junit . Assert . assertEquals ( java . lang . Integer . toString ( val ) , result )
|
getValueStringByKeyMapNull ( ) { java . util . Map < java . lang . String , java . lang . String > map = null ; java . lang . String keyName = "" ; java . lang . String expResult = "" ; java . lang . String result = com . microsoft . azure . sdk . iot . deps . util . Tools . getValueStringByKey ( map , keyName ) ; "<AssertPlaceHolder>" ; } getValueStringByKey ( java . util . Map , java . lang . String ) { java . lang . String retVal ; if ( ( map == null ) || ( keyName == null ) ) { retVal = "" ; } else { java . lang . Object val = map . get ( keyName ) ; if ( val != null ) retVal = val . toString ( ) . trim ( ) ; else retVal = "" ; } return retVal ; }
|
org . junit . Assert . assertEquals ( expResult , result )
|
testOnChecksumMismatch ( ) { try { policy . onChecksumMismatch ( "SHA-1" , 0 , exception ) ; org . junit . Assert . fail ( "No<sp>exception" ) ; } catch ( org . eclipse . aether . transfer . ChecksumFailureException e ) { "<AssertPlaceHolder>" ; } policy . onChecksumMismatch ( "SHA-1" , ChecksumPolicy . KIND_UNOFFICIAL , exception ) ; } onChecksumMismatch ( java . lang . String , int , org . eclipse . aether . transfer . ChecksumFailureException ) { callbacks . add ( java . lang . String . format ( "mismatch(%s,<sp>%04x)" , algorithm , kind ) ) ; if ( inspectAll ) { conclusion = exception ; return ; } throw exception ; }
|
org . junit . Assert . assertSame ( exception , e )
|
whenNone ( ) { org . estatio . module . numerator . dom . Numerator numerator = estatioNumeratorRepository . findInvoiceNumberNumerator ( propertyOxf , applicationTenancyRepository . findByPath ( "/" ) ) ; "<AssertPlaceHolder>" ; } findInvoiceNumberNumerator ( org . estatio . module . asset . dom . FixedAsset , org . isisaddons . module . security . dom . tenancy . ApplicationTenancy ) { return numeratorRepository . findScopedNumeratorIncludeWildCardMatching ( Constants . NumeratorName . INVOICE_NUMBER , fixedAsset , applicationTenancy ) ; }
|
org . junit . Assert . assertNull ( numerator )
|
nullStringBufferValue ( ) { final org . jboss . msc . value . Value < java . lang . Class < ? extends java . lang . StringBuffer > > value = new org . jboss . msc . value . ClassOfValue < java . lang . StringBuffer > ( new org . jboss . msc . value . ImmediateValue < java . lang . StringBuffer > ( null ) ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return ( count ) ++ ; }
|
org . junit . Assert . assertNull ( value . getValue ( ) )
|
test303WithExplicitCachingHeadersUnderDefaultBehavior ( ) { response . setCode ( HttpStatus . SC_SEE_OTHER ) ; response . setHeader ( "Date" , org . apache . hc . client5 . http . utils . DateUtils . formatDate ( now ) ) ; response . setHeader ( "Cache-Control" , "max-age=300" ) ; "<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 ) )
|
testMolecularFormulaSet ( ) { org . openscience . cdk . interfaces . IMolecularFormulaSet mfS = new org . openscience . cdk . silent . MolecularFormulaSet ( ) ; "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertNotNull ( mfS )
|
testSerialization ( ) { org . jfree . data . time . Second s1 = new org . jfree . data . time . Second ( ) ; org . jfree . data . time . Second s2 = ( ( org . jfree . data . time . Second ) ( org . jfree . chart . TestUtils . serialised ( s1 ) ) ) ; "<AssertPlaceHolder>" ; } serialised ( java . lang . Object ) { java . lang . Object result = null ; java . io . ByteArrayOutputStream buffer = new java . io . ByteArrayOutputStream ( ) ; java . io . ObjectOutput out ; try { out = new java . io . ObjectOutputStream ( buffer ) ; out . writeObject ( original ) ; out . close ( ) ; java . io . ObjectInput in = new java . io . ObjectInputStream ( new java . io . ByteArrayInputStream ( buffer . toByteArray ( ) ) ) ; result = in . readObject ( ) ; in . close ( ) ; } catch ( java . io . IOException e ) { throw new java . lang . RuntimeException ( e ) ; } catch ( java . lang . ClassNotFoundException e ) { throw new java . lang . RuntimeException ( e ) ; } return result ; }
|
org . junit . Assert . assertEquals ( s1 , s2 )
|
deveObterMotivoComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe400 . classes . evento . inutilizacao . NFRetornoEventoInutilizacaoDados dados = new com . fincatto . documentofiscal . nfe400 . classes . evento . inutilizacao . NFRetornoEventoInutilizacaoDados ( ) ; final java . lang . String motivo = "motivo<sp>de<sp>teste" ; dados . setMotivo ( motivo ) ; "<AssertPlaceHolder>" ; } getMotivo ( ) { return this . motivo ; }
|
org . junit . Assert . assertEquals ( motivo , dados . getMotivo ( ) )
|
testConnectRequestWithIncorrectSSLPassword ( ) { final nl . bzk . migratiebrp . voisc . mailbox . client . impl . SslConnectionFactory factory = new nl . bzk . migratiebrp . voisc . mailbox . client . impl . SslConnectionFactory ( ) ; final org . springframework . context . ApplicationContext applicationContext = new org . springframework . context . support . ClassPathXmlApplicationContext ( "test-mailbox.xml" ) ; final org . springframework . beans . factory . config . AutowireCapableBeanFactory beanFactory = org . mockito . Mockito . mock ( org . springframework . beans . factory . config . AutowireCapableBeanFactory . class ) ; org . springframework . test . util . ReflectionTestUtils . setField ( factory , "hostname" , "localhost" ) ; org . springframework . test . util . ReflectionTestUtils . setField ( factory , "portNumber" , 1212 ) ; org . springframework . test . util . ReflectionTestUtils . setField ( factory , "keyPassword" , "" ) ; org . springframework . test . util . ReflectionTestUtils . setField ( factory , "keystorePassword" , "sslConnectionFactory" 0 ) ; org . springframework . test . util . ReflectionTestUtils . setField ( factory , "truststorePassword" , "sslConnectionFactory" 0 ) ; org . springframework . test . util . ReflectionTestUtils . setField ( factory , "sslConnectionFactory" 2 , applicationContext ) ; org . springframework . test . util . ReflectionTestUtils . setField ( mbsProxy , "sslConnectionFactory" , factory ) ; org . mockito . Mockito . when ( beanFactory . getBean ( nl . bzk . migratiebrp . voisc . mailbox . client . Connection . class ) ) . thenReturn ( mbsConnection ) ; try { mbsProxy . connect ( ) ; org . junit . Assert . fail ( "Er<sp>wordt<sp>een<sp>ConnectionException<sp>verwacht" ) ; } catch ( final nl . bzk . migratiebrp . voisc . mailbox . client . exception . ConnectionException se ) { "<AssertPlaceHolder>" ; } catch ( final java . lang . Exception e ) { e . printStackTrace ( ) ; org . junit . Assert . fail ( ( ( nl . bzk . migratiebrp . voisc . mailbox . client . impl . MailboxServerProxyTest . MELDING_GEEN_EXCEPTION_VERWACHT ) + e ) ) ; } } getMessage ( ) { return message ; }
|
org . junit . Assert . assertTrue ( se . getMessage ( ) . startsWith ( "sslConnectionFactory" 1 ) )
|
testURI ( ) { org . eclipse . xtext . generator . JavaIoFileSystemAccess fileSystemAccess = new org . eclipse . xtext . generator . JavaIoFileSystemAccess ( ) ; fileSystemAccess . setOutputPath ( "testOutput" , "/testDir" ) ; org . eclipse . emf . common . util . URI uri = fileSystemAccess . getURI ( "testFile" , "testOutput" ) ; java . lang . String expectedUri = new java . io . File ( new java . io . File ( ( ( java . io . File . separator ) + "testDir" ) ) , "testFile" ) . toURI ( ) . toString ( ) ; "<AssertPlaceHolder>" ; } toString ( ) { if ( eIsProxy ( ) ) return super . toString ( ) ; java . lang . StringBuffer result = new java . lang . StringBuffer ( super . toString ( ) ) ; result . append ( "<sp>(a:<sp>" ) ; result . append ( a ) ; result . append ( ",<sp>b:<sp>" ) ; result . append ( b ) ; result . append ( ",<sp>c:<sp>" ) ; result . append ( c ) ; result . append ( ')' ) ; return result . toString ( ) ; }
|
org . junit . Assert . assertEquals ( expectedUri , uri . toString ( ) )
|
testNormalOperation ( ) { boolean expected = true ; boolean result = org . slieb . throwables . LongPredicateWithThrowable . castLongPredicateWithThrowable ( ( v1 ) -> expected ) . thatReturnsOnCatch ( false ) . test ( 0 ) ; "<AssertPlaceHolder>" ; } test ( long ) { try { return testWithThrowable ( v1 ) ; } catch ( java . lang . RuntimeException | java . lang . Error exception ) { throw exception ; } catch ( final java . lang . Throwable throwable ) { throw new org . slieb . throwables . SuppressedException ( throwable ) ; } }
|
org . junit . Assert . assertEquals ( expected , result )
|
ancestor ( ) { final org . xmldb . api . modules . XQueryService service = storeXMLStringAndGetQueryService ( "numbers.xml" , org . exist . xquery . XPathQueryTest . numbers ) ; final java . lang . String query = "let<sp>$all_items<sp>:=<sp>/test/item<sp>" + ( ( ( ( ( "(:<sp>Note:<sp>variable<sp>non<sp>used<sp>but<sp>computed<sp>anyway<sp>:)" + "let<sp>$unused_variable<sp>:=" ) + "<sp>for<sp>$one_item<sp>in<sp>$all_items<sp>" ) + "<sp>/<sp>ancestor::*<sp>(:<sp><<<<<<sp>if<sp>you<sp>remove<sp>this<sp>line<sp>all<sp>is<sp>normal<sp>:)" ) + "<sp>return<sp>'foo'" ) + "return<sp>$all_items" ) ; final org . exist . xquery . ResourceSet result = service . queryResource ( "numbers.xml" , query ) ; "<AssertPlaceHolder>" ; } getSize ( ) { return model . size ( ) ; }
|
org . junit . Assert . assertEquals ( 4 , result . getSize ( ) )
|
bootShouldBeReturned ( ) { when ( view . boot . getSelectedIndex ( ) ) . thenReturn ( 1 ) ; when ( view . boot . getValue ( 1 ) ) . thenReturn ( Boot . RUNNER_START . toString ( ) ) ; "<AssertPlaceHolder>" ; } getBoot ( ) { java . lang . String value = boot . getValue ( boot . getSelectedIndex ( ) ) ; return org . eclipse . che . ide . ext . runner . client . tabs . properties . panel . common . Boot . detect ( value ) ; }
|
org . junit . Assert . assertThat ( view . getBoot ( ) , org . hamcrest . CoreMatchers . is ( Boot . RUNNER_START ) )
|
testEqualsWithNullFields ( ) { com . vaadin . server . StreamResource resource1 = new com . vaadin . server . StreamResource ( null , null ) ; com . vaadin . server . StreamResource resource2 = new com . vaadin . server . StreamResource ( null , null ) ; "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertEquals ( resource1 , resource2 )
|
testNullMap ( ) { org . apache . hadoop . hive . serde2 . objectinspector . ObjectInspector [ ] inputOIs = new org . apache . hadoop . hive . serde2 . objectinspector . ObjectInspector [ ] { org . apache . hadoop . hive . serde2 . objectinspector . ObjectInspectorFactory . getStandardMapObjectInspector ( PrimitiveObjectInspectorFactory . writableStringObjectInspector , PrimitiveObjectInspectorFactory . writableStringObjectInspector ) } ; java . util . Map < java . lang . String , java . lang . String > input = null ; org . apache . hadoop . hive . ql . udf . generic . GenericUDF . DeferredObject [ ] args = new org . apache . hadoop . hive . ql . udf . generic . GenericUDF . DeferredObject [ ] { new org . apache . hadoop . hive . ql . udf . generic . GenericUDF . DeferredJavaObject ( input ) } ; org . apache . hadoop . hive . ql . udf . generic . GenericUDFMapValues udf = new org . apache . hadoop . hive . ql . udf . generic . GenericUDFMapValues ( ) ; org . apache . hadoop . hive . serde2 . objectinspector . StandardListObjectInspector oi = ( ( org . apache . hadoop . hive . serde2 . objectinspector . StandardListObjectInspector ) ( udf . initialize ( inputOIs ) ) ) ; java . lang . Object res = udf . evaluate ( args ) ; "<AssertPlaceHolder>" ; udf . close ( ) ; } getList ( java . lang . Object ) { if ( data == null ) { return null ; } org . apache . hadoop . hive . serde2 . lazy . LazyArray array = ( ( org . apache . hadoop . hive . serde2 . lazy . LazyArray ) ( data ) ) ; return array . getList ( ) ; }
|
org . junit . Assert . assertTrue ( oi . getList ( res ) . isEmpty ( ) )
|
testSpecSignatureExample ( ) { java . lang . String extra = "" ; long timestampInSeconds = 1336363200 ; java . lang . String nonceString = "dj83hs9s" ; java . net . URI uri = new java . net . URI ( "http://example.com/resource/1?b=1&a=2" ) ; ch . boye . httpclientandroidlib . client . methods . HttpRequestBase req = new ch . boye . httpclientandroidlib . client . methods . HttpGet ( uri ) ; java . lang . String requestString = org . mozilla . gecko . sync . net . test . TestHMACAuthHeaderProvider . LeakyHMACAuthHeaderProvider . getRequestString ( req , timestampInSeconds , nonceString , extra ) ; java . lang . String expected = "1336363200\n" + ( ( ( ( ( "dj83hs9s\n" + "GET\n" ) + "/resource/1?b=1&a=2\n" ) + "example.com\n" ) + "bhCQXTVyfj5cmA9uKkPFx1zeOXM=" 0 ) + "\n" ) ; "<AssertPlaceHolder>" ; } getRequestString ( ch . boye . httpclientandroidlib . client . methods . HttpUriRequest , long , java . lang . String , java . lang . String ) { return org . mozilla . gecko . sync . net . HMACAuthHeaderProvider . getRequestString ( request , timestampInSeconds , nonce , extra ) ; }
|
org . junit . Assert . assertEquals ( expected , requestString )
|
testEOL3 ( ) { org . eclipse . jface . text . IDocument document = createDocument ( "\n\r\n\n" ) ; java . util . List < org . eclipse . cdt . autotools . ui . editors . parser . Token > tokens = tokenize ( document , false ) ; checkNoErrors ( ) ; "<AssertPlaceHolder>" ; checkToken ( tokens . get ( 0 ) , document , ITokenConstants . EOL , "\n" ) ; checkToken ( tokens . get ( 1 ) , document , ITokenConstants . EOL , "\r\n" ) ; checkToken ( tokens . get ( 2 ) , document , ITokenConstants . EOL , "\n" ) ; } size ( ) { return fSize ; }
|
org . junit . Assert . assertEquals ( 3 , tokens . size ( ) )
|
byDefaultNoFilterPresent ( ) { "<AssertPlaceHolder>" ; } getFilters ( ) { weka . gui . ExtensionFileFilter [ ] result ; result = new weka . gui . ExtensionFileFilter [ 1 ] ; result [ 0 ] = new weka . gui . ExtensionFileFilter ( getDefaultExtension ( ) , ( ( "Jython<sp>script<sp>(*" + ( getDefaultExtension ( ) ) ) + ")" ) ) ; return result ; }
|
org . junit . Assert . assertEquals ( 0 , model . getFilters ( ) . size ( ) )
|
nonexistentModuleClass ( ) { final org . nohope . spring . app . AppWithContainer app = org . nohope . spring . app . SpringAsyncModularAppTest . probe ( "app" , "" , "nonexistentClass" ) ; "<AssertPlaceHolder>" ; } getModules ( ) { return modules ; }
|
org . junit . Assert . assertEquals ( 0 , app . getModules ( ) . size ( ) )
|
testParseRoundTrip ( ) { de . nx42 . maps4cim . header . CustomHeader header = new de . nx42 . maps4cim . header . CustomHeader ( ) ; byte [ ] expecteds = header . generateHeader ( ) ; byte [ ] actuals = de . nx42 . maps4cim . header . HeaderParser . parse ( expecteds ) . generateHeader ( ) ; "<AssertPlaceHolder>" ; } generateHeader ( ) { com . google . common . io . ByteArrayDataOutput outP1 = com . google . common . io . ByteStreams . newDataOutput ( 4096 ) ; outP1 . write ( intro ) ; outP1 . write ( de . nx42 . maps4cim . header . CustomHeader . formatHeaderString ( de . nx42 . maps4cim . header . CustomHeader . staticString01 ) ) ; outP1 . write ( new byte [ 4 ] ) ; outP1 . writeLong ( de . nx42 . maps4cim . util . DateUtils . dateToTicks ( unusedDate1 ) ) ; outP1 . writeLong ( de . nx42 . maps4cim . util . DateUtils . dateToTicks ( unusedDate2 ) ) ; outP1 . writeLong ( de . nx42 . maps4cim . util . DateUtils . dateToTicks ( lastSaved ) ) ; outP1 . writeLong ( de . nx42 . maps4cim . util . DateUtils . dateToTicks ( mapCreated ) ) ; outP1 . writeLong ( workTime1 ) ; outP1 . writeLong ( workTime2 ) ; outP1 . write ( de . nx42 . maps4cim . header . CustomHeader . staticBinary01 ) ; outP1 . write ( de . nx42 . maps4cim . header . CustomHeader . formatHeaderString ( de . nx42 . maps4cim . header . CustomHeader . staticString02 ) ) ; outP1 . write ( de . nx42 . maps4cim . header . CustomHeader . formatHeaderString ( mapName ) ) ; if ( ( buildingSet ) == ( de . nx42 . maps4cim . config . header . HeaderDef . BuildingSet . EUROPEAN ) ) { outP1 . write ( de . nx42 . maps4cim . header . CustomHeader . formatHeaderString ( de . nx42 . maps4cim . header . CustomHeader . staticString02eur01 ) ) ; } outP1 . write ( pngLength ) ; outP1 . write ( png ) ; outP1 . write ( de . nx42 . maps4cim . header . CustomHeader . staticBinary02 ) ; if ( ( buildingSet ) == ( de . nx42 . maps4cim . config . header . HeaderDef . BuildingSet . EUROPEAN ) ) { outP1 . write ( de . nx42 . maps4cim . header . CustomHeader . formatHeaderString ( de . nx42 . maps4cim . header . CustomHeader . staticString02eur02 ) ) ; outP1 . write ( de . nx42 . maps4cim . header . CustomHeader . staticBinary02eur ) ; } outP1 . write ( de . nx42 . maps4cim . header . CustomHeader . formatHeaderString ( de . nx42 . maps4cim . header . CustomHeader . staticString03 ) ) ; outP1 . write ( new byte [ 34 ] ) ; outP1 . write ( de . nx42 . maps4cim . header . CustomHeader . staticBinary03 ) ; outP1 . write ( de . nx42 . maps4cim . header . CustomHeader . formatHeaderString ( de . nx42 . maps4cim . header . CustomHeader . staticString04 ) ) ; outP1 . write ( de . nx42 . maps4cim . header . CustomHeader . formatHeaderString ( de . nx42 . maps4cim . header . CustomHeader . staticString05 ) ) ; com . google . common . io . ByteArrayDataOutput outP2 = com . google . common . io . ByteStreams . newDataOutput ( 256 ) ; outP2 . write ( intro ) ; outP2 . write ( de . nx42 . maps4cim . header . CustomHeader . formatHeaderString ( de . nx42 . maps4cim . header . CustomHeader . staticString06 ) ) ; outP2 . write ( de . nx42 . maps4cim . header . CustomHeader . staticBinary04 ) ; for ( java . lang . String s : de . nx42 . maps4cim . header . CustomHeader . staticStrings07 ) { outP2 . write ( de . nx42 . maps4cim . header . CustomHeader . formatHeaderString ( s ) ) ; } outP2 . write ( de . nx42 . maps4cim . header . CustomHeader . staticBinary05 ) ; com . google . common . io . ByteArrayDataOutput out = com . google . common . io . ByteStreams . newDataOutput ( 4352 ) ; byte [ ] p1 = outP1 . toByteArray ( ) ; out . write ( p1 ) ; out . write ( new byte [ ( ( ( ( p1 . length ) / 4096 ) + 1 ) * 4096 ) - ( p1 . length ) ] ) ; byte [ ] p2 = outP2 . toByteArray ( ) ; out . write ( p2 ) ; out . write ( new byte [ 256 - ( p2 . length ) ] ) ; return out . toByteArray ( ) ; }
|
org . junit . Assert . assertArrayEquals ( expecteds , actuals )
|
AccessStaticVariableIndirect_VarVarToString ( ) { java . lang . String fromClass = "Domain.Indirect.ViolatingFrom.AccessStaticVariableIndirect_VarVarToString" ; java . lang . String toClass = "Domain.Indirect.IndirectTo.ServiceOne" ; java . util . ArrayList < java . lang . String > typesToFind = new java . util . ArrayList < java . lang . String > ( ) ; typesToFind . add ( "Access" ) ; "<AssertPlaceHolder>" ; } areDependencyTypesDetected ( java . lang . String , java . lang . String , java . util . ArrayList , boolean ) { return areDependencyTypesDetected ( classFrom , classTo , dependencyTypes , "" , isIndirect ) ; }
|
org . junit . Assert . assertTrue ( areDependencyTypesDetected ( fromClass , toClass , typesToFind , true ) )
|
testDeleteEntryByToken ( ) { final long entryId = 103L ; sut . execute ( "token3" ) ; javax . persistence . Query q = getEntityManager ( ) . createQuery ( "from<sp>OAuthDomainEntry<sp>e<sp>where<sp>e.id<sp>=<sp>:tokenId" ) . setParameter ( "tokenId" , entryId ) ; java . util . List results = q . getResultList ( ) ; "<AssertPlaceHolder>" ; } size ( ) { throw new java . lang . UnsupportedOperationException ( org . eurekastreams . server . service . utility . PropertyExposingServletContextPropertyPlaceholderConfigurer . PropertyAccessor . POOR_CORRESPONDENCE_MSG ) ; }
|
org . junit . Assert . assertEquals ( 0 , results . size ( ) )
|
testHasNext_whenFilter ( ) { iterator . setFilter ( mockFilter ) ; iterator . setNextPath ( fakeResultPath ) ; when ( mockFilter . accept ( fakeResultPath ) ) . thenReturn ( false ) . thenReturn ( true ) ; mockNextDirent . d_ino = 1 ; iterator . setNext ( mockNextDirent ) ; doNothing ( ) . when ( iterator ) . advance ( ) ; "<AssertPlaceHolder>" ; verify ( iterator , times ( 2 ) ) . advance ( ) ; verify ( mockFilter , times ( 2 ) ) . accept ( fakeResultPath ) ; } hasNext ( ) { advance ( ) ; if ( null != ( filter ) ) { try { while ( ( ( next . d_ino ) != 0 ) && ( ! ( filter . accept ( nextPath ) ) ) ) { advance ( ) ; } } catch ( java . io . IOException e ) { current = null ; next = null ; return false ; } } if ( ( ( next ) != null ) && ( ( next . d_ino ) == 0 ) ) { current = null ; next = null ; return false ; } return true ; }
|
org . junit . Assert . assertTrue ( iterator . hasNext ( ) )
|
convertFromProxyPentahoUser_RetunsNull_WhenErrorOccurs ( ) { org . pentaho . di . ui . repository . pur . services . IRoleSupportSecurityManager manager = mock ( org . pentaho . di . ui . repository . pur . services . IRoleSupportSecurityManager . class ) ; when ( manager . constructUser ( ) ) . thenThrow ( new org . pentaho . di . core . exception . KettleException ( ) ) ; org . pentaho . di . repository . IUser user = org . pentaho . di . repository . pur . UserRoleHelper . convertFromProxyPentahoUser ( new org . pentaho . platform . security . userroledao . ws . ProxyPentahoUser ( ) , java . util . Collections . < org . pentaho . platform . security . userroledao . ws . UserToRoleAssignment > emptyList ( ) , manager ) ; "<AssertPlaceHolder>" ; } convertFromProxyPentahoUser ( org . pentaho . platform . security . userroledao . ws . ProxyPentahoUser , java . util . List , org . pentaho . di . ui . repository . pur . services . IRoleSupportSecurityManager ) { org . pentaho . di . repository . IUser userInfo = null ; try { userInfo = rsm . constructUser ( ) ; userInfo . setDescription ( user . getDescription ( ) ) ; userInfo . setPassword ( user . getPassword ( ) ) ; userInfo . setLogin ( user . getName ( ) ) ; userInfo . setName ( user . getName ( ) ) ; if ( userInfo instanceof org . pentaho . di . repository . pur . model . IEEUser ) { ( ( org . pentaho . di . repository . pur . model . IEEUser ) ( userInfo ) ) . setRoles ( org . pentaho . di . repository . pur . UserRoleHelper . getRolesForUser ( user . getName ( ) , assignments , rsm ) ) ; } } catch ( org . pentaho . di . core . exception . KettleException e ) { e . printStackTrace ( ) ; } return userInfo ; }
|
org . junit . Assert . assertNull ( user )
|
testBasic ( ) { org . richfaces . resourcePlugin . ordering . PartialOrderToCompleteOrderTest . order . addPartialOrdering ( asList ( 1 , 2 , 3 ) ) ; "<AssertPlaceHolder>" ; } getCompletelyOrderedItems ( ) { return new CompleteOrdering ( ) . sortedCopy ( allItems ) ; }
|
org . junit . Assert . assertEquals ( asList ( 1 , 2 , 3 ) , org . richfaces . resourcePlugin . ordering . PartialOrderToCompleteOrderTest . order . getCompletelyOrderedItems ( ) )
|
testGeenTekst ( ) { final org . apache . logging . log4j . core . impl . Log4jLogEvent log4jLogEvent = new org . apache . logging . log4j . core . impl . Log4jLogEvent ( "" , null , nl . bzk . brp . logging . log4j . BrpJsonLayoutTest . LOGGER_FQCN , org . apache . logging . log4j . Level . ERROR , null , null , null ) ; final java . lang . String serializable = brpJsonLayout . toSerializable ( log4jLogEvent ) ; nl . bzk . brp . logging . log4j . BrpJsonLayoutTest . LOGGER . info ( ( ( nl . bzk . brp . logging . log4j . BrpJsonLayoutTest . LOG_SERIALIZABLE ) + serializable ) ) ; "<AssertPlaceHolder>" ; } info ( nl . bzk . brp . logging . FunctioneleMelding ) { try ( nl . bzk . brp . logging . MDC . MDCCloser meldingCloser = nl . bzk . brp . logging . MDC . putMelding ( functioneleMelding ) ) { this . delegate . info ( nl . bzk . brp . logging . LoggerImpl . FUNCTIONEEL , functioneleMelding . getOmschrijving ( ) ) ; } }
|
org . junit . Assert . assertNotNull ( serializable )
|
testLoadSaga_AssociationValueRemoved ( ) { java . lang . String identifier = unitOfWork . executeWithResult ( ( ) -> { Saga < org . axonframework . modelling . saga . repository . StubSaga > saga = repository . createInstance ( org . axonframework . common . IdentifierFactory . getInstance ( ) . generateIdentifier ( ) , org . axonframework . modelling . saga . repository . StubSaga :: new ) ; saga . execute ( ( s ) -> s . associate ( "key" , "value" ) ) ; return saga . getSagaIdentifier ( ) ; } ) . getPayload ( ) ; entityManager . clear ( ) ; startUnitOfWork ( ) ; unitOfWork . execute ( ( ) -> { Saga < org . axonframework . modelling . saga . repository . StubSaga > loaded = repository . load ( identifier ) ; loaded . execute ( ( s ) -> s . removeAssociationValue ( "key" , "value" ) ) ; } ) ; entityManager . clear ( ) ; startUnitOfWork ( ) ; java . util . Set < java . lang . String > found = unitOfWork . executeWithResult ( ( ) -> repository . find ( new org . axonframework . modelling . saga . AssociationValue ( "key" , "value" ) ) ) . getPayload ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return values . size ( ) ; }
|
org . junit . Assert . assertEquals ( 0 , found . size ( ) )
|
test_single ( ) { "<AssertPlaceHolder>" ; } getInstance ( ) { if ( ( com . zlikun . jee . Singleton4 . INSTANCE ) == null ) { com . zlikun . jee . Singleton4 . INSTANCE = com . zlikun . jee . Singleton4 . Singleton4Holder . obj ; } return com . zlikun . jee . Singleton4 . INSTANCE ; }
|
org . junit . Assert . assertTrue ( ( ( com . zlikun . jee . Singleton4 . getInstance ( ) ) == ( com . zlikun . jee . Singleton4 . getInstance ( ) ) ) )
|
drop_zeroes ( ) { final java . util . Map < com . groupon . lex . metrics . Histogram . Range , java . lang . Double > expect = new java . util . HashMap < com . groupon . lex . metrics . Histogram . Range , java . lang . Double > ( ) { { put ( new com . groupon . lex . metrics . Histogram . Range ( 0 , 1 ) , 1.0 ) ; put ( new com . groupon . lex . metrics . Histogram . Range ( 1 , 2 ) , 1.0 ) ; put ( new com . groupon . lex . metrics . Histogram . Range ( 2 , 6 ) , 4.0 ) ; put ( new com . groupon . lex . metrics . Histogram . Range ( 6 , 7 ) , 1.0 ) ; put ( new com . groupon . lex . metrics . Histogram . Range ( 7 , 10 ) , 3.0 ) ; } } ; final java . util . stream . Stream < com . groupon . lex . metrics . Histogram . RangeWithCount > init = java . util . stream . Stream . of ( expect , singletonMap ( new com . groupon . lex . metrics . Histogram . Range ( ( - 100 ) , ( - 10 ) ) , 0.0 ) , singletonMap ( new com . groupon . lex . metrics . Histogram . Range ( 1000 , 1100 ) , 7.0 ) , singletonMap ( new com . groupon . lex . metrics . Histogram . Range ( 1000 , 1100 ) , ( - 7.0 ) ) ) . map ( Map :: entrySet ) . flatMap ( Collection :: stream ) . map ( com . groupon . lex . metrics . HistogramTest :: map_ ) ; final com . groupon . lex . metrics . Histogram h = new com . groupon . lex . metrics . Histogram ( init ) ; "<AssertPlaceHolder>" ; } stream ( ) { final java . util . List < com . groupon . lex . metrics . timeseries . TimeSeriesCollection > expected = com . groupon . monsoon . remote . history . ClientServerTest . generateCollection ( ) . collect ( java . util . stream . Collectors . toList ( ) ) ; when ( history . stream ( ) ) . thenAnswer ( ( invocation ) -> generateCollection ( ) ) ; final java . util . List < com . groupon . lex . metrics . timeseries . TimeSeriesCollection > result = client . stream ( ) . collect ( java . util . stream . Collectors . toList ( ) ) ; org . junit . Assert . assertEquals ( expected , result ) ; verify ( history , times ( 1 ) ) . stream ( ) ; verifyNoMoreInteractions ( history ) ; }
|
org . junit . Assert . assertThat ( h . stream ( ) . collect ( java . util . stream . Collectors . toList ( ) ) , org . hamcrest . Matchers . contains ( new com . groupon . lex . metrics . Histogram . RangeWithCount ( new com . groupon . lex . metrics . Histogram . Range ( 0 , 10 ) , 10 ) ) )
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.