input
stringlengths
28
18.7k
output
stringlengths
39
1.69k
whenSubListZeroToOne_thenListContainingFirstElementIsReturned ( ) { java . util . List < java . lang . Object > list = new com . baeldung . java . list . CustomList ( ) ; list . add ( "baeldung" ) ; java . util . List < java . lang . Object > subList = list . subList ( 0 , 1 ) ; "<AssertPlaceHolder>" ; } get ( java . lang . Integer ) { return emf . unwrap ( org . hibernate . SessionFactory . class ) . getCurrentSession ( ) . get ( org . baeldung . demo . model . Foo . class , id ) ; }
org . junit . Assert . assertEquals ( "baeldung" , subList . get ( 0 ) )
testGetView ( ) { System . out . println ( "getView" ) ; edu . oswego . csc480_hci521_2013 . client . presenters . RfParametersPresenter instance = new edu . oswego . csc480_hci521_2013 . client . presenters . RfParametersPresenterTest . RfParametersPresenterImpl ( ) ; edu . oswego . csc480_hci521_2013 . client . presenters . RfParametersPresenter . View expResult = null ; edu . oswego . csc480_hci521_2013 . client . presenters . RfParametersPresenter . View result = instance . getView ( ) ; "<AssertPlaceHolder>" ; } getView ( ) { return view ; }
org . junit . Assert . assertEquals ( expResult , result )
testSetContentEmptyMimeMultipart ( ) { final javax . mail . internet . MimeMultipart part = new javax . mail . internet . MimeMultipart ( ) ; email . setContent ( part ) ; "<AssertPlaceHolder>" ; } getContentMimeMultipart ( ) { return this . emailBody ; }
org . junit . Assert . assertEquals ( part , email . getContentMimeMultipart ( ) )
testGetAttributeAsStringNull ( ) { java . lang . String result = com . j256 . simplejmx . client . JmxClientTest . client . getAttributeString ( com . j256 . simplejmx . client . JmxClientTest . objectName , "null" ) ; "<AssertPlaceHolder>" ; } getAttributeString ( javax . management . ObjectName , java . lang . String ) { java . lang . Object bean = getAttribute ( name , attributeName ) ; if ( bean == null ) { return null ; } else { return com . j256 . simplejmx . client . ClientUtils . valueToString ( bean ) ; } }
org . junit . Assert . assertNull ( result )
operationsAfterPipeAfterProjection ( ) { io . burt . jmespath . Expression < java . lang . Object > expected = Sequence ( Sequence ( Property ( "Records" ) , Selection ( String ( "" ) ) ) , Negate ( Current ( ) ) ) ; io . burt . jmespath . Expression < java . lang . Object > actual = compile ( "Records[?'']<sp>|<sp>!@" ) ; "<AssertPlaceHolder>" ; } compile ( java . lang . String ) { return runtime . compile ( str ) ; }
org . junit . Assert . assertThat ( actual , org . hamcrest . Matchers . is ( expected ) )
shouldNotHaveStyles ( ) { boolean result = entry . hasStyleClass ( ) ; "<AssertPlaceHolder>" ; } hasStyleClass ( ) { return ( ( styleClass ) != null ) && ( ! ( styleClass . isEmpty ( ) ) ) ; }
org . junit . Assert . assertThat ( result , org . hamcrest . Matchers . is ( org . hamcrest . Matchers . equalTo ( false ) ) )
getAliases ( ) { "<AssertPlaceHolder>" ; } getAliases ( ) { org . junit . Assert . assertThat ( net . time4j . tz . threeten . JdkZoneProviderTest . zp . getAliases ( ) . isEmpty ( ) , org . hamcrest . CoreMatchers . is ( true ) ) ; }
org . junit . Assert . assertThat ( net . time4j . tz . threeten . JdkZoneProviderTest . zp . getAliases ( ) . isEmpty ( ) , org . hamcrest . CoreMatchers . is ( true ) )
testSizeBasedEmission ( ) { emitter = sizeBasedEmitter ( 3 ) ; httpClient . setGoHandler ( org . apache . druid . java . util . emitter . core . GoHandlers . failingHandler ( ) ) ; emitter . emit ( new org . apache . druid . java . util . emitter . service . UnitEvent ( "test" , 1 ) ) ; emitter . emit ( new org . apache . druid . java . util . emitter . service . UnitEvent ( "test" , 2 ) ) ; httpClient . setGoHandler ( org . apache . druid . java . util . emitter . core . GoHandlers . passingHandler ( org . apache . druid . java . util . emitter . core . EmitterTest . okResponse ( ) ) . times ( 1 ) ) ; emitter . emit ( new org . apache . druid . java . util . emitter . service . UnitEvent ( "test" , 3 ) ) ; waitForEmission ( emitter , 1 ) ; httpClient . setGoHandler ( org . apache . druid . java . util . emitter . core . GoHandlers . failingHandler ( ) ) ; emitter . emit ( new org . apache . druid . java . util . emitter . service . UnitEvent ( "test" , 4 ) ) ; emitter . emit ( new org . apache . druid . java . util . emitter . service . UnitEvent ( "test" , 5 ) ) ; closeAndExpectFlush ( emitter ) ; "<AssertPlaceHolder>" ; } succeeded ( ) { return goHandler . succeeded ( ) ; }
org . junit . Assert . assertTrue ( httpClient . succeeded ( ) )
testDefaultProdResourceQueryReturnModels ( ) { com . iciql . test . ProductDaoTest . ProductDao dao = db . open ( com . iciql . test . ProductDaoTest . ProductDao . class ) ; com . iciql . test . models . Product [ ] products = dao . getProductsFromResourceQuery ( ) ; "<AssertPlaceHolder>" ; } open ( java . lang . Class ) { return new com . iciql . DaoProxy < X > ( this , daoClass ) . build ( ) ; }
org . junit . Assert . assertEquals ( 10 , products . length )
shouldNotRemoveNonTaskDirectoriesAndFiles ( ) { final java . io . File otherDir = org . apache . kafka . test . TestUtils . tempDirectory ( stateDir . toPath ( ) , "foo" ) ; directory . cleanRemovedTasks ( 0 ) ; "<AssertPlaceHolder>" ; } cleanRemovedTasks ( long ) { try { cleanRemovedTasks ( cleanupDelayMs , false ) ; } catch ( final java . lang . Exception cannotHappen ) { throw new java . lang . IllegalStateException ( "Should<sp>have<sp>swallowed<sp>exception." , cannotHappen ) ; } }
org . junit . Assert . assertTrue ( otherDir . exists ( ) )
equalsBothUninitializedReturnsTrue ( ) { com . rackspacecloud . blueflood . types . Locator locator = new com . rackspacecloud . blueflood . types . Locator ( ) ; com . rackspacecloud . blueflood . types . Locator other = new com . rackspacecloud . blueflood . types . Locator ( ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ! ( other instanceof com . rackspacecloud . blueflood . service . SlotState ) ) { return false ; } com . rackspacecloud . blueflood . service . SlotState that = ( ( com . rackspacecloud . blueflood . service . SlotState ) ( other ) ) ; return this . toString ( ) . equals ( that . toString ( ) ) ; }
org . junit . Assert . assertTrue ( locator . equals ( ( ( java . lang . Object ) ( other ) ) ) )
isParameterUpOrDowngradeValid_Standard_SameValues ( ) { org . oscm . domobjects . Parameter dbParameter = createParameter ( "Parm1" , "23" , ParameterModificationType . STANDARD , false ) ; org . oscm . subscriptionservice . bean . VOParameter targetParam = toVO ( createParameter ( "Parm1" , "23" , ParameterModificationType . STANDARD , true ) ) ; "<AssertPlaceHolder>" ; } isParameterUpOrDowngradeValid ( org . oscm . domobjects . Parameter , org . oscm . internal . vo . VOParameter ) { if ( ! ( dbParameter . getParameterDefinition ( ) . getParameterId ( ) . equals ( targetParameter . getParameterDefinition ( ) . getParameterId ( ) ) ) ) { return false ; } if ( ( dbParameter . getParameterDefinition ( ) . getModificationType ( ) ) != ( targetParameter . getParameterDefinition ( ) . getModificationType ( ) ) ) { return false ; } boolean targetOneTime = targetParameter . getParameterDefinition ( ) . getModificationType ( ) . equals ( ParameterModificationType . ONE_TIME ) ; return ( ! ( ( ! ( dbParameter . isConfigurable ( ) ) ) && ( ! targetOneTime ) ) ) || ( compareParameterValue ( dbParameter , targetParameter ) ) ; }
org . junit . Assert . assertTrue ( bean . isParameterUpOrDowngradeValid ( dbParameter , targetParam ) )
testFilteringAndSorting ( ) { final org . opennms . netmgt . model . OnmsDistPoller poller = m_dbPopulator . getDistPollerDao ( ) . whoami ( ) ; final org . opennms . netmgt . model . OnmsEvent event = new org . opennms . netmgt . model . OnmsEvent ( ) ; event . setEventLog ( "Y" ) ; event . setEventDisplay ( "Y" ) ; event . setEventCreateTime ( new java . util . Date ( ) ) ; event . setDistPoller ( poller ) ; event . setEventTime ( new java . util . Date ( ) ) ; event . setEventSeverity ( OnmsSeverity . CRITICAL . getId ( ) ) ; event . setEventUei ( "uei://org/opennms/test/EventDaoTest" ) ; event . setEventSource ( "test" ) ; m_dbPopulator . getEventDao ( ) . save ( event ) ; m_dbPopulator . getEventDao ( ) . flush ( ) ; final org . opennms . netmgt . model . OnmsNode node = m_dbPopulator . getNodeDao ( ) . findAll ( ) . iterator ( ) . next ( ) ; final org . opennms . netmgt . model . OnmsAlarm alarm1 = new org . opennms . netmgt . model . OnmsAlarm ( ) ; alarm1 . setNode ( node ) ; alarm1 . setUei ( event . getEventUei ( ) ) ; alarm1 . setSeverityId ( event . getEventSeverity ( ) ) ; alarm1 . setFirstEventTime ( event . getEventTime ( ) ) ; alarm1 . setLastEvent ( event ) ; alarm1 . setCounter ( 1 ) ; alarm1 . setDistPoller ( poller ) ; m_dbPopulator . getAlarmDao ( ) . save ( alarm1 ) ; m_dbPopulator . getAlarmDao ( ) . flush ( ) ; final org . opennms . netmgt . model . OnmsAlarm alarm2 = new org . opennms . netmgt . model . OnmsAlarm ( ) ; alarm2 . setNode ( node ) ; alarm2 . setUei ( event . getEventUei ( ) ) ; alarm2 . setSeverityId ( event . getEventSeverity ( ) ) ; alarm2 . setFirstEventTime ( event . getEventTime ( ) ) ; alarm2 . setLastEvent ( event ) ; alarm2 . setCounter ( 1 ) ; alarm2 . setDistPoller ( poller ) ; m_dbPopulator . getAlarmDao ( ) . save ( alarm2 ) ; m_dbPopulator . getAlarmDao ( ) . flush ( ) ; final org . opennms . netmgt . model . OnmsAlarm alarm3 = new org . opennms . netmgt . model . OnmsAlarm ( ) ; alarm3 . setNode ( node ) ; alarm3 . setUei ( event . getEventUei ( ) ) ; alarm3 . setSeverityId ( event . getEventSeverity ( ) ) ; alarm3 . setFirstEventTime ( event . getEventTime ( ) ) ; alarm3 . setLastEvent ( event ) ; alarm3 . setCounter ( 1 ) ; alarm3 . setDistPoller ( poller ) ; alarm2 . setRelatedAlarms ( com . google . common . collect . Sets . newHashSet ( alarm1 , alarm2 ) ) ; m_dbPopulator . getAlarmDao ( ) . save ( alarm3 ) ; m_dbPopulator . getAlarmDao ( ) . flush ( ) ; for ( int i = 0 ; i < 10 ; i ++ ) { final org . opennms . netmgt . model . OnmsAlarm alarm = new org . opennms . netmgt . model . OnmsAlarm ( ) ; alarm . setNode ( node ) ; alarm . setUei ( event . getEventUei ( ) ) ; alarm . setSeverityId ( event . getEventSeverity ( ) ) ; alarm . setFirstEventTime ( event . getEventTime ( ) ) ; alarm . setLastEvent ( event ) ; alarm . setCounter ( 1 ) ; alarm . setDistPoller ( poller ) ; m_dbPopulator . getAlarmDao ( ) . save ( alarm ) ; m_dbPopulator . getAlarmDao ( ) . flush ( ) ; } "<AssertPlaceHolder>" ; checkFilteringAndSorting ( SortStyle . ID , com . google . common . collect . Lists . newArrayList ( new org . opennms . web . alarm . filter . SituationFilter ( true ) ) , 10 , 0 , 1 , 1 ) ; checkFilteringAndSorting ( SortStyle . ID , com . google . common . collect . Lists . newArrayList ( ) , 10 , 0 , 14 , 10 ) ; checkFilteringAndSorting ( SortStyle . ID , com . google . common . collect . Lists . newArrayList ( ) , 10 , 1 , 14 , 4 ) ; for ( org . opennms . web . alarm . SortStyle sortStyle : org . opennms . web . alarm . SortStyle . values ( ) ) { checkFilteringAndSorting ( sortStyle , com . google . common . collect . Lists . newArrayList ( new org . opennms . web . alarm . filter . SituationFilter ( true ) ) , 10 , 0 , 1 , 1 ) ; } } getAlarmDao ( ) { return m_databasePopulator . getAlarmDao ( ) ; }
org . junit . Assert . assertEquals ( 14 , m_dbPopulator . getAlarmDao ( ) . findAll ( ) . size ( ) )
test_plusMajor_zero ( ) { org . joda . money . BigMoney test = org . joda . money . TestBigMoney . GBP_2_34 . plusMajor ( 0 ) ; "<AssertPlaceHolder>" ; } plusMajor ( long ) { return with ( money . plusMajor ( amountToAdd ) ) ; }
org . junit . Assert . assertSame ( org . joda . money . TestBigMoney . GBP_2_34 , test )
deveObterStatusComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe310 . classes . NFProtocoloInfo protocoloInfo = new com . fincatto . documentofiscal . nfe310 . classes . NFProtocoloInfo ( ) ; final java . lang . String status = "100" ; protocoloInfo . setStatus ( status ) ; "<AssertPlaceHolder>" ; } getStatus ( ) { return this . status ; }
org . junit . Assert . assertEquals ( status , protocoloInfo . getStatus ( ) )
intervalAsArray ( ) { "<AssertPlaceHolder>" ; } toArray ( int , int ) { return org . eclipse . collections . impl . list . Interval . fromTo ( from , to ) . toArray ( ) ; }
org . junit . Assert . assertArrayEquals ( new java . lang . Integer [ ] { 1 , 2 , 3 , 4 , 5 } , org . eclipse . collections . impl . list . Interval . toArray ( 1 , 5 ) )
shouldReturnQuery ( ) { final com . github . jloisel . reactive . query . spring . SpringQueryService service = new com . github . jloisel . reactive . query . spring . SpringQueryService ( true , com . couchbase . client . java . view . Stale . TRUE ) ; final com . couchbase . client . java . view . ViewQuery newQuery = service . newQuery ( "designDoc" , "view" ) ; "<AssertPlaceHolder>" ; } newQuery ( java . lang . String , java . lang . String ) { final com . couchbase . client . java . view . ViewQuery query = com . couchbase . client . java . view . ViewQuery . from ( designDoc , view ) ; query . debug ( debug ) ; query . stale ( stale ) ; return query ; }
org . junit . Assert . assertNotNull ( newQuery )
marksPosition ( ) { char [ ] array = new char [ ] { 'T' , 'e' , 'a' , 'V' , 'M' } ; java . nio . CharBuffer buffer = java . nio . CharBuffer . wrap ( array ) ; buffer . position ( 1 ) ; buffer . mark ( ) ; buffer . position ( 2 ) ; buffer . reset ( ) ; "<AssertPlaceHolder>" ; } position ( ) { return position ; }
org . junit . Assert . assertThat ( buffer . position ( ) , org . hamcrest . CoreMatchers . is ( 1 ) )
readPacketError ( ) { reader . setAdapter ( adapter ) ; reader . readPacket ( file . getAbsolutePath ( ) , null ) ; "<AssertPlaceHolder>" ; } readPacket ( java . lang . String , com . att . aro . core . packetreader . IPacketListener ) { if ( ( ( aroJpcapLibName ) == null ) || ( ( aroWebPLibName ) == null ) ) { setVOLibName ( ) ; } currentPacketfile = packetfile ; provisionalPcapConversion ( packetfile ) ; if ( listener == null ) { com . att . aro . core . packetreader . impl . PacketReaderImpl . LOGGER . error ( "PacketListener<sp>cannot<sp>be<sp>null" ) ; throw new java . lang . IllegalArgumentException ( "PacketListener<sp>cannot<sp>be<sp>null" ) ; } this . packetlistener = listener ; if ( ( adapter ) == null ) { adapter = new com . att . aro . pcap . PCapAdapter ( ) ; adapter . loadAroLib ( aroWebPLibFileName , aroWebPLibName ) ; adapter . loadAroLib ( aroJpcapLibFileName , aroJpcapLibName ) ; } adapter . setSubscriber ( this ) ; java . lang . String result = adapter . readData ( packetfile ) ; if ( result != null ) { com . att . aro . core . packetreader . impl . PacketReaderImpl . LOGGER . debug ( ( "Result<sp>from<sp>executing<sp>all<sp>pcap<sp>packets:<sp>" + result ) ) ; throw new java . io . IOException ( result ) ; } com . att . aro . core . packetreader . impl . PacketReaderImpl . LOGGER . debug ( "Created<sp>PCapAdapter" ) ; }
org . junit . Assert . assertTrue ( false )
testInclusiveBetween_withMessage ( ) { org . apache . commons . lang3 . Validate . inclusiveBetween ( "a" , "c" , "b" , "Error" ) ; org . apache . commons . lang3 . Validate . inclusiveBetween ( 0 , 2 , 1 , "Error" ) ; org . apache . commons . lang3 . Validate . inclusiveBetween ( 0 , 2 , 2 , "Error" ) ; try { org . apache . commons . lang3 . Validate . inclusiveBetween ( 0 , 5 , 6 , "Error" ) ; org . junit . Assert . fail ( "Expecting<sp>IllegalArgumentException" ) ; } catch ( final java . lang . IllegalArgumentException e ) { "<AssertPlaceHolder>" ; } } getMessage ( ) { return getMessage ( Locale . US ) ; }
org . junit . Assert . assertEquals ( "Error" , e . getMessage ( ) )
testBeanValidationException_OneValidationError ( ) { com . vaadin . v7 . data . Validator . InvalidValueException [ ] causes = null ; com . vaadin . v7 . data . validator . BeanValidator validator = new com . vaadin . v7 . data . validator . BeanValidator ( com . vaadin . tests . data . bean . BeanToValidate . class , "lastname" ) ; try { validator . validate ( null ) ; } catch ( com . vaadin . v7 . data . Validator . InvalidValueException e ) { causes = e . getCauses ( ) ; } "<AssertPlaceHolder>" ; } getCauses ( ) { return causes ; }
org . junit . Assert . assertEquals ( 1 , causes . length )
testMapTranslation ( ) { io . cdap . cdap . hive . serde . ObjectDeserializer translator = new io . cdap . cdap . hive . serde . ObjectDeserializer ( com . google . common . collect . Lists . newArrayList ( "dummy-name" ) , com . google . common . collect . Lists . newArrayList ( org . apache . hadoop . hive . serde2 . typeinfo . TypeInfoFactory . getMapTypeInfo ( TypeInfoFactory . intTypeInfo , TypeInfoFactory . stringTypeInfo ) ) , io . cdap . cdap . api . data . schema . Schema . mapOf ( io . cdap . cdap . api . data . schema . Schema . of ( Schema . Type . INT ) , io . cdap . cdap . api . data . schema . Schema . of ( Schema . Type . STRING ) ) ) ; java . util . Map < java . lang . Character , java . net . URL > input = com . google . common . collect . Maps . newHashMap ( ) ; input . put ( 'a' , new java . net . URL ( "http://abc.com" ) ) ; input . put ( '1' , new java . net . URL ( "http://123.com" ) ) ; java . util . Map < java . lang . Integer , java . lang . String > expected = com . google . common . collect . Maps . newHashMap ( ) ; expected . put ( ( ( int ) ( 'a' ) ) , "http://abc.com" ) ; expected . put ( ( ( int ) ( '1' ) ) , "http://123.com" ) ; "<AssertPlaceHolder>" ; } deserialize ( java . lang . String ) { return io . cdap . cdap . internal . provision . ProvisionerTable . GSON . fromJson ( provisioningTaskInfo , io . cdap . cdap . internal . provision . ProvisioningTaskInfo . class ) ; }
org . junit . Assert . assertEquals ( expected , translator . deserialize ( input ) )
foreach_A$VoidFunction1_Option ( ) { com . m3 . scalaflavor4j . CollectionLike < java . lang . String > xs = com . m3 . scalaflavor4j . Option . apply ( "foo" ) ; com . m3 . scalaflavor4j . Generator < java . lang . String > gen = com . m3 . scalaflavor4j . Generator . apply ( xs ) ; final com . m3 . scalaflavor4j . GeneratorTest . Called called = new com . m3 . scalaflavor4j . GeneratorTest . Called ( ) ; gen . foreach ( new com . m3 . scalaflavor4j . VoidF1 < java . lang . String > ( ) { public void apply ( java . lang . String s ) throws com . m3 . scalaflavor4j . Exception { ( called . count ) ++ ; } } ) ; "<AssertPlaceHolder>" ; } apply ( java . lang . String ) { System . out . println ( ( v1 + v1 ) ) ; }
org . junit . Assert . assertThat ( called . count , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( 1 ) ) )
updateVmwareDatacenterNoUpdate ( ) { com . cloud . hypervisor . vmware . VmwareDatacenter vmwareDatacenter = vmwareManager . updateVmwareDatacenter ( updateVmwareDcCmd ) ; "<AssertPlaceHolder>" ; } updateVmwareDatacenter ( org . apache . cloudstack . api . command . admin . zone . UpdateVmwareDcCmd ) { final java . lang . Long zoneId = cmd . getZoneId ( ) ; final java . lang . String userName = cmd . getUsername ( ) ; final java . lang . String password = cmd . getPassword ( ) ; final java . lang . String vCenterHost = cmd . getVcenter ( ) ; final java . lang . String vmwareDcName = cmd . getName ( ) ; final java . lang . Boolean isRecursive = cmd . isRecursive ( ) ; final com . cloud . hypervisor . vmware . VmwareDatacenterZoneMap vdcMap = vmwareDatacenterZoneMapDao . findByZoneId ( zoneId ) ; final com . cloud . hypervisor . vmware . VmwareDatacenterVO vmwareDc = vmwareDcDao . findById ( vdcMap . getVmwareDcId ( ) ) ; if ( vmwareDc == null ) { throw new com . cloud . utils . exception . CloudRuntimeException ( "VMWare<sp>datacenter<sp>does<sp>not<sp>exist<sp>by<sp>provided<sp>ID" ) ; } final java . lang . String oldVCenterHost = vmwareDc . getVcenterHost ( ) ; if ( ! ( com . google . common . base . Strings . isNullOrEmpty ( userName ) ) ) { vmwareDc . setUser ( userName ) ; } if ( ! ( com . google . common . base . Strings . isNullOrEmpty ( password ) ) ) { vmwareDc . setPassword ( password ) ; } if ( ! ( com . google . common . base . Strings . isNullOrEmpty ( vCenterHost ) ) ) { vmwareDc . setVcenterHost ( vCenterHost ) ; } if ( ! ( com . google . common . base . Strings . isNullOrEmpty ( vmwareDcName ) ) ) { vmwareDc . setVmwareDatacenterName ( vmwareDcName ) ; } vmwareDc . setGuid ( java . lang . String . format ( "%s@%s" , vmwareDc . getVmwareDatacenterName ( ) , vmwareDc . getVcenterHost ( ) ) ) ; return com . cloud . utils . db . Transaction . execute ( new com . cloud . utils . db . TransactionCallback < com . cloud . hypervisor . vmware . VmwareDatacenter > ( ) { @ com . cloud . hypervisor . vmware . manager . Override public com . cloud . hypervisor . vmware . VmwareDatacenter doInTransaction ( com . cloud . utils . db . TransactionStatus status ) { if ( vmwareDcDao . update ( vmwareDc . getId ( ) , vmwareDc ) ) { if ( isRecursive ) { for ( final com . cloud . org . Cluster cluster : clusterDao . listByDcHyType ( zoneId , Hypervisor . HypervisorType . VMware . toString ( ) ) ) { final java . util . Map < java . lang . String , java . lang . String > clusterDetails = clusterDetailsDao . findDetails ( cluster . getId ( ) ) ; clusterDetails . put ( "username" , vmwareDc . getUser ( ) ) ; clusterDetails . put ( "password" , vmwareDc . getPassword ( ) ) ; final java . lang . String clusterUrl = clusterDetails . get ( "url" ) ; if ( ( ! ( oldVCenterHost . equals ( vmwareDc . getVcenterHost ( ) ) ) ) && ( ! ( com . google . common . base . Strings . isNullOrEmpty ( clusterUrl ) ) ) ) { clusterDetails . put ( "url" , clusterUrl . replace ( oldVCenterHost , vmwareDc . getVcenterHost ( ) ) ) ; } clusterDetailsDao . persist ( cluster . getId ( ) , clusterDetails ) ; } for ( final com . cloud . host . Host host : hostDao . listAllHostsByZoneAndHypervisorType ( zoneId , HypervisorType . VMware ) ) { final java . util . Map < java . lang . String , java . lang . String > hostDetails = hostDetailsDao . findDetails ( host . getId ( ) ) ; hostDetails . put ( "username" , vmwareDc . getUser ( ) ) ; hostDetails . put ( "password" , vmwareDc . getPassword ( ) ) ; final java . lang . String hostGuid = hostDetails . get ( "guid" ) ; if ( ! ( com . google . common . base . Strings . isNullOrEmpty ( hostGuid ) ) ) { hostDetails . put ( "guid" , hostGuid . replace ( oldVCenterHost , vmwareDc . getVcenterHost ( ) ) ) ; } hostDetailsDao . persist ( host . getId ( ) , hostDetails ) ; } } return vmwareDc ; } return null ; } } ) ; }
org . junit . Assert . assertNull ( vmwareDatacenter )
testVStackEdgeCase ( ) { org . nd4j . linalg . api . ndarray . INDArray arr = org . nd4j . linalg . factory . Nd4j . linspace ( 1 , 4 , 4 , DataType . DOUBLE ) ; org . nd4j . linalg . api . ndarray . INDArray vstacked = org . nd4j . linalg . factory . Nd4j . vstack ( arr ) ; "<AssertPlaceHolder>" ; } vstack ( org . nd4j . linalg . factory . INDArray [ ] ) { org . nd4j . base . Preconditions . checkState ( ( ( arrs != null ) && ( ( arrs . length ) > 0 ) ) , "No<sp>input<sp>specified<sp>to<sp>vstack<sp>(null<sp>or<sp>length<sp>0)" ) ; if ( ( arrs [ 0 ] . rank ( ) ) == 1 ) { return org . nd4j . linalg . factory . Nd4j . pile ( arrs ) ; } org . nd4j . linalg . factory . INDArray ret = org . nd4j . linalg . factory . Nd4j . INSTANCE . vstack ( arrs ) ; org . nd4j . linalg . factory . Nd4j . logCreationIfNecessary ( ret ) ; return ret ; }
org . junit . Assert . assertEquals ( arr , vstacked )
addHeader_list ( ) { org . apache . servicecomb . swagger . invocation . response . Headers headers = new org . apache . servicecomb . swagger . invocation . response . Headers ( ) ; headers . addHeader ( "h" , java . util . Arrays . asList ( "v1" , "v2" ) ) ; headers . addHeader ( "h" , java . util . Arrays . asList ( "v3" ) ) ; "<AssertPlaceHolder>" ; } getHeader ( java . lang . String ) { return "ms" ; }
org . junit . Assert . assertThat ( headers . getHeader ( "h" ) , org . hamcrest . Matchers . contains ( "v1" , "v2" , "v3" ) )
testExceptionHandlingOnSystemNamespaceCreation ( ) { org . apache . phoenix . query . ConnectionQueryServicesImpl cqs = mock ( org . apache . phoenix . query . ConnectionQueryServicesImpl . class ) ; when ( cqs . createSchema ( any ( java . util . List . class ) , anyString ( ) ) ) . thenCallRealMethod ( ) ; doCallRealMethod ( ) . when ( cqs ) . ensureSystemTablesMigratedToSystemNamespace ( ) ; doNothing ( ) . when ( cqs ) . createSysMutexTableIfNotExists ( any ( org . apache . hadoop . hbase . client . Admin . class ) ) ; when ( cqs . getSystemTableNamesInDefaultNamespace ( any ( org . apache . hadoop . hbase . client . Admin . class ) ) ) . thenReturn ( java . util . Collections . < org . apache . hadoop . hbase . TableName > emptyList ( ) ) ; doThrow ( org . apache . phoenix . query . ConnectionQueryServicesImplTest . PHOENIX_IO_EXCEPTION ) . when ( cqs ) . ensureNamespaceCreated ( anyString ( ) ) ; java . util . Map < java . lang . String , java . lang . String > props = new java . util . HashMap ( ) ; props . put ( QueryServices . IS_NAMESPACE_MAPPING_ENABLED , "true" ) ; when ( cqs . getProps ( ) ) . thenReturn ( new org . apache . phoenix . util . ReadOnlyProps ( props ) ) ; cqs . ensureSystemTablesMigratedToSystemNamespace ( ) ; verify ( cqs ) . getSystemTableNamesInDefaultNamespace ( any ( org . apache . hadoop . hbase . client . Admin . class ) ) ; try { cqs . createSchema ( java . util . Collections . < org . apache . hadoop . hbase . client . Mutation > emptyList ( ) , "" ) ; } catch ( org . apache . phoenix . exception . PhoenixIOException e ) { "<AssertPlaceHolder>" ; } } createSchema ( java . util . List , java . lang . String ) { return new org . apache . phoenix . coprocessor . MetaDataProtocol . MetaDataMutationResult ( org . apache . phoenix . coprocessor . MetaDataProtocol . MutationCode . SCHEMA_NOT_FOUND , 0L , null ) ; }
org . junit . Assert . assertEquals ( org . apache . phoenix . query . ConnectionQueryServicesImplTest . PHOENIX_IO_EXCEPTION , e )
testNonVoidMethod ( ) { "<AssertPlaceHolder>" ; } simpleInvokeAsync ( ) { return new org . jboss . weld . tests . interceptors . thread . async . AsyncResult < java . lang . Thread > ( java . lang . Thread . currentThread ( ) ) ; }
org . junit . Assert . assertTrue ( ( ( java . lang . Thread . currentThread ( ) ) != ( bean . simpleInvokeAsync ( ) . get ( ) ) ) )
evaluatesDefaultProperty ( ) { org . teavm . flavour . expr . test . IntComputation c = parseExpr ( org . teavm . flavour . expr . test . IntComputation . class , "y" ) ; vars . self ( new org . teavm . flavour . expr . test . Foo ( 23 ) ) ; "<AssertPlaceHolder>" ; } parseExpr ( java . lang . Class , java . lang . String ) { org . teavm . flavour . expr . EvaluatorBuilder builder = new org . teavm . flavour . expr . InterpretingEvaluatorBuilder ( ) . importPackage ( "java.lang" ) . importPackage ( "java.util" ) . importClass ( org . teavm . flavour . expr . test . EvaluatorTest . class . getName ( ) ) . importClass ( java . util . stream . Collectors . class . getName ( ) ) ; org . teavm . flavour . expr . Evaluator < T , org . teavm . flavour . expr . test . TestVars > e ; try { e = builder . build ( cls , org . teavm . flavour . expr . test . TestVars . class , str ) ; } catch ( org . teavm . flavour . expr . InvalidExpressionException ex ) { java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; sb . append ( "Errors<sp>occurred<sp>compiling<sp>expression:\n" ) ; sb . append ( str ) . append ( "\n" ) ; java . util . List < org . teavm . flavour . expr . Diagnostic > diagnostics = ex . getDiagnostics ( ) . stream ( ) . sorted ( java . util . Comparator . comparingInt ( ( d ) -> d . getStart ( ) ) ) . collect ( java . util . stream . Collectors . toList ( ) ) ; for ( org . teavm . flavour . expr . Diagnostic diagnostic : diagnostics ) { for ( int i = 0 ; i < ( diagnostic . getStart ( ) ) ; ++ i ) { sb . append ( '<sp>' ) ; } sb . append ( "^\n" ) ; sb . append ( diagnostic . getMessage ( ) ) . append ( "\n\n" ) ; } throw new java . lang . AssertionError ( sb . toString ( ) ) ; } vars = e . getVariables ( ) ; return e . getFunction ( ) ; }
org . junit . Assert . assertThat ( c . compute ( ) , org . hamcrest . Matchers . is ( 23 ) )
propertiesComments ( ) { java . util . Map < java . lang . String , java . lang . String > actual = io . strimzi . operator . cluster . model . OrderedPropertiesTest . propertiesCompatibility ( "!<sp>ignore\n<sp>#<sp>ignore<sp>#\n<sp>bare_key" ) ; io . strimzi . operator . cluster . model . OrderedProperties expected = new io . strimzi . operator . cluster . model . OrderedProperties ( ) . addPair ( "bare_key" , "" ) ; "<AssertPlaceHolder>" ; } asMap ( ) { return pairs ; }
org . junit . Assert . assertEquals ( expected . asMap ( ) , actual )
readFromPersistedFile ( ) { InstanceUUID . uuid = null ; java . nio . file . Path path = java . nio . file . Paths . get ( org . eclipse . smarthome . config . core . ConfigConstants . getUserDataFolder ( ) , InstanceUUID . UUID_FILE_NAME ) ; java . nio . file . Files . createDirectories ( path . getParent ( ) ) ; java . nio . file . Files . write ( path , "123" . getBytes ( ) ) ; java . lang . String uuid = org . eclipse . smarthome . core . id . InstanceUUID . get ( ) ; "<AssertPlaceHolder>" ; } get ( ) { if ( ( org . eclipse . smarthome . core . id . InstanceUUID . uuid ) == null ) { try { java . io . File file = new java . io . File ( ( ( ( org . eclipse . smarthome . config . core . ConfigConstants . getUserDataFolder ( ) ) + ( java . io . File . separator ) ) + ( org . eclipse . smarthome . core . id . InstanceUUID . UUID_FILE_NAME ) ) ) ; if ( ! ( file . exists ( ) ) ) { org . eclipse . smarthome . core . id . InstanceUUID . uuid = org . eclipse . smarthome . core . id . java . util . UUID . randomUUID ( ) . toString ( ) ; org . eclipse . smarthome . core . id . InstanceUUID . writeFile ( file , org . eclipse . smarthome . core . id . InstanceUUID . uuid ) ; } else { org . eclipse . smarthome . core . id . InstanceUUID . uuid = org . eclipse . smarthome . core . id . InstanceUUID . readFirstLine ( file ) ; if ( org . apache . commons . lang . StringUtils . isNotEmpty ( org . eclipse . smarthome . core . id . InstanceUUID . uuid ) ) { org . eclipse . smarthome . core . id . InstanceUUID . LOGGER . debug ( "UUID<sp>'{}'<sp>has<sp>been<sp>restored<sp>from<sp>file<sp>'{}'" , file . getAbsolutePath ( ) , org . eclipse . smarthome . core . id . InstanceUUID . uuid ) ; } else { org . eclipse . smarthome . core . id . InstanceUUID . uuid = org . eclipse . smarthome . core . id . java . util . UUID . randomUUID ( ) . toString ( ) ; org . eclipse . smarthome . core . id . InstanceUUID . LOGGER . warn ( "UUID<sp>file<sp>'{}'<sp>has<sp>no<sp>content,<sp>rewriting<sp>it<sp>now<sp>with<sp>'{}'" , file . getAbsolutePath ( ) , org . eclipse . smarthome . core . id . InstanceUUID . uuid ) ; org . eclipse . smarthome . core . id . InstanceUUID . writeFile ( file , org . eclipse . smarthome . core . id . InstanceUUID . uuid ) ; } } } catch ( java . io . IOException e ) { org . eclipse . smarthome . core . id . InstanceUUID . LOGGER . error ( "Failed<sp>writing<sp>instance<sp>uuid<sp>file:<sp>{}" , e . getMessage ( ) ) ; return null ; } } return org . eclipse . smarthome . core . id . InstanceUUID . uuid ; }
org . junit . Assert . assertEquals ( "123" , uuid )
checkDependentImportsWithPrimitiveTypes ( ) { final java . util . ArrayList < org . drools . workbench . models . testscenarios . shared . Fixture > fixtures = new java . util . ArrayList ( ) ; final org . kie . soup . project . datamodel . imports . Imports imports = new org . kie . soup . project . datamodel . imports . Imports ( ) { { addImport ( new org . kie . soup . project . datamodel . imports . Import ( "int" ) ) ; } } ; final java . util . Map < java . lang . String , org . kie . soup . project . datamodel . oracle . ModelField [ ] > modelFields = new java . util . HashMap < java . lang . String , org . kie . soup . project . datamodel . oracle . ModelField [ ] > ( ) { { put ( "java.sql.ClientInfoStatus" , new org . kie . soup . project . datamodel . oracle . ModelField [ ] { modelField ( "java.sql.JDBCType" ) } ) ; } } ; when ( scenario . getFixtures ( ) ) . thenReturn ( fixtures ) ; when ( dataModelService . getDataModel ( path ) ) . thenReturn ( modelOracle ) ; when ( modelOracle . getModuleModelFields ( ) ) . thenReturn ( modelFields ) ; when ( scenario . getImports ( ) ) . thenCallRealMethod ( ) ; doCallRealMethod ( ) . when ( scenario ) . setImports ( any ( org . kie . soup . project . datamodel . imports . Imports . class ) ) ; scenario . setImports ( imports ) ; testEditorService . addDependentImportsToScenario ( scenario , path ) ; "<AssertPlaceHolder>" ; } getImports ( ) { return imports ; }
org . junit . Assert . assertEquals ( 1 , scenario . getImports ( ) . getImports ( ) . size ( ) )
testIntronicFivePrimeOma1 ( ) { final java . lang . String outPath = runJannovarOnVCFLine ( "/sv_header.vcf" , "1\t58957157\t.\tN\t<INS>\t.\t.\tSVTYPE=INS;END=58957157" ) ; final java . lang . String expected = "1\t58957157\t.\tN\t<INS>\t.\t.\tEND=58957157;" + ( "SVANN=insertion&structural_variant&intron_variant&coding_transcript_variant|HIGH|OMA1|" + "115209|transcript|NM_145243.3|Coding|;SVTYPE=INS" ) ; final java . lang . String actual = loadVcfBody ( outPath ) ; "<AssertPlaceHolder>" ; } loadVcfBody ( java . lang . String ) { return java . util . Arrays . asList ( com . google . common . io . Files . asCharSource ( new de . charite . compbio . jannovar . cmd . annotate_vcf . File ( outPath ) , Charsets . UTF_8 ) . read ( ) . split ( "\r?\n" ) ) . stream ( ) . filter ( ( line ) -> ! ( line . startsWith ( "#" ) ) ) . collect ( java . util . stream . Collectors . joining ( ) ) ; }
org . junit . Assert . assertEquals ( expected , actual )
testJUHashMap3 ( ) { final int count = 100000 ; final java . util . HashMap map = new java . util . HashMap ( ) ; "<AssertPlaceHolder>" ; for ( int idx = 0 ; idx < count ; idx ++ ) { final java . lang . String key = "key" + idx ; final java . lang . String strval = "value" + idx ; map . put ( key , strval ) ; } final long start = java . lang . System . currentTimeMillis ( ) ; final java . util . Iterator itr = map . values ( ) . iterator ( ) ; while ( itr . hasNext ( ) ) { itr . next ( ) . hashCode ( ) ; } final long end = java . lang . System . currentTimeMillis ( ) ; System . out . println ( ( "java.util.HashMap<sp>iterate<sp>ET<sp>-<sp>" + ( end - start ) ) ) ; }
org . junit . Assert . assertNotNull ( map )
testImpliesDifferentAuthorizable ( ) { org . apache . sentry . provider . db . service . model . MSentryGMPrivilege fieldPrivilege1 = new org . apache . sentry . provider . db . service . model . MSentryGMPrivilege ( "solr" , "service1" , java . util . Arrays . asList ( new org . apache . sentry . core . model . search . Collection ( "c1" ) , new org . apache . sentry . core . model . search . Field ( "f1" ) ) , org . apache . sentry . core . model . search . SearchConstants . QUERY , false ) ; org . apache . sentry . provider . db . service . model . MSentryGMPrivilege fieldPrivilege2 = new org . apache . sentry . provider . db . service . model . MSentryGMPrivilege ( "solr" , "service1" , java . util . Arrays . asList ( new org . apache . sentry . core . model . search . Collection ( "c2" ) , new org . apache . sentry . core . model . search . Field ( "f2" ) ) , org . apache . sentry . core . model . search . SearchConstants . QUERY , false ) ; "<AssertPlaceHolder>" ; } implies ( org . apache . sentry . policy . common . Privilege ) { if ( ! ( p instanceof org . apache . sentry . policy . search . SearchWildcardPrivilege ) ) { return false ; } org . apache . sentry . policy . search . SearchWildcardPrivilege wp = ( ( org . apache . sentry . policy . search . SearchWildcardPrivilege ) ( p ) ) ; java . util . List < org . apache . sentry . policy . common . KeyValue > otherParts = wp . parts ; if ( equals ( wp ) ) { return true ; } int index = 0 ; for ( org . apache . sentry . policy . common . KeyValue otherPart : otherParts ) { if ( ( ( parts . size ( ) ) - 1 ) < index ) { return true ; } else { org . apache . sentry . policy . common . KeyValue part = parts . get ( index ) ; if ( ! ( part . getKey ( ) . equalsIgnoreCase ( otherPart . getKey ( ) ) ) ) { return false ; } if ( ! ( impliesKeyValue ( part , otherPart ) ) ) { return false ; } index ++ ; } } for ( ; index < ( parts . size ( ) ) ; index ++ ) { org . apache . sentry . policy . common . KeyValue part = parts . get ( index ) ; if ( ! ( part . getValue ( ) . equals ( SearchConstants . ALL ) ) ) { return false ; } } return true ; }
org . junit . Assert . assertFalse ( fieldPrivilege1 . implies ( fieldPrivilege2 ) )
test ( ) { verifyProject1PostRequestCount ( 0 ) ; verifyStoredEventCount ( 0 ) ; io . sentry . android . SentryITActivity activity = org . robolectric . Robolectric . setupActivity ( io . sentry . android . SentryITActivity . class ) ; "<AssertPlaceHolder>" ; activity . sendEvent ( ) ; waitUntilTrue ( 1000 , new java . util . concurrent . Callable < java . lang . Boolean > ( ) { @ io . sentry . android . Override public io . sentry . android . Boolean call ( ) throws io . sentry . android . Exception { return ( getStoredEvents ( ) . size ( ) ) == 1 ; } } ) ; verifyProject1PostRequestCount ( 1 ) ; verifyStoredEventCount ( 1 ) ; } getCustomFactoryUsed ( ) { return customFactoryUsed . get ( ) ; }
org . junit . Assert . assertEquals ( activity . getCustomFactoryUsed ( ) , true )
testRunWriteAfterWrite ( ) { final org . eclipse . xtext . xbase . lib . Functions . Function0 < java . lang . Object > _function = ( ) -> { return null ; } ; final org . eclipse . xtext . xbase . lib . Functions . Function2 < org . eclipse . xtext . util . CancelIndicator , java . lang . Object , java . lang . Integer > _function_1 = ( org . eclipse . xtext . util . CancelIndicator $0 , java . lang . Object $1 ) -> { return java . lang . Integer . valueOf ( this . sharedState . incrementAndGet ( ) ) ; } ; this . requestManager . < java . lang . Object , java . lang . Integer > runWrite ( _function , _function_1 ) . join ( ) ; final org . eclipse . xtext . xbase . lib . Functions . Function0 < java . lang . Object > _function_2 = ( ) -> { return null ; } ; final org . eclipse . xtext . xbase . lib . Functions . Function2 < org . eclipse . xtext . util . CancelIndicator , java . lang . Object , java . lang . Integer > _function_3 = ( org . eclipse . xtext . util . CancelIndicator $0 , java . lang . Object $1 ) -> { java . lang . Integer _xifexpression = null ; int _get = this . sharedState . get ( ) ; boolean _notEquals = _get != 0 ; if ( _notEquals ) { int _incrementAndGet = this . sharedState . incrementAndGet ( ) ; _xifexpression = ( ( java . lang . Integer ) ( java . lang . Integer . valueOf ( _incrementAndGet ) ) ) ; } return _xifexpression ; } ; this . requestManager . < java . lang . Object , java . lang . Integer > runWrite ( _function_2 , _function_3 ) . join ( ) ; "<AssertPlaceHolder>" ; } get ( ) { return context ; }
org . junit . Assert . assertEquals ( 2 , this . sharedState . get ( ) )
testGetValue_FallbackIllegalArg ( ) { when ( primary . getValue ( row ) ) . thenReturn ( null ) ; when ( fallback . getValue ( row ) ) . thenThrow ( new java . lang . IllegalArgumentException ( ) ) ; "<AssertPlaceHolder>" ; verify ( fallbackIf , never ( ) ) . matches ( any ( ) ) ; } getValue ( io . lumify . mapping . column . AbstractColumnDocumentMapping . Row ) { java . lang . String value = null ; for ( int length = keyColumns . size ( ) ; ( value == null ) && ( length >= 0 ) ; length -- ) { value = valueMap . get ( buildKey ( row , length ) ) ; } return value ; }
org . junit . Assert . assertNull ( instance . getValue ( row ) )
testPresent ( ) { com . fasterxml . jackson . databind . ObjectMapper mapper = getMapper ( ) ; discord4j . common . json . PossiblePojo expected = new discord4j . common . json . PossiblePojo ( discord4j . common . jackson . Possible . of ( "hello<sp>world" ) ) ; java . lang . String json = "{\"string\":<sp>\"hello<sp>world\"}" ; discord4j . common . json . PossiblePojo result = mapper . readValue ( json , discord4j . common . json . PossiblePojo . class ) ; "<AssertPlaceHolder>" ; } of ( long ) { return new discord4j . common . jackson . PossibleLong ( value ) ; }
org . junit . Assert . assertEquals ( expected , result )
CreateAddress ( ) { net . billforward . model . Profile profile = net . billforward . model . Profile . getByID ( "57456CDB-A868-4F8C-AD6F-957B44DB60EC" ) ; net . billforward . model . Address address = new net . billforward . model . Address ( ) ; address . setProfileID ( profile . getID ( ) ) ; address . setAddressLine1 ( "address<sp>line<sp>1" ) ; address . setAddressLine2 ( "address<sp>line<sp>2" ) ; address . setAddressLine3 ( "address<sp>line<sp>3" ) ; address . setCity ( "London" ) ; address . setProvince ( "London" ) ; address . setCountry ( "United<sp>Kingdom" ) ; address . setPostcode ( "SW1A<sp>2HQ" ) ; address . setLandline ( "02076014444" ) ; address = net . billforward . model . Address . create ( address ) ; System . out . println ( address ) ; "<AssertPlaceHolder>" ; } create ( net . billforward . model . Address ) { return net . billforward . model . Address . create ( address , net . billforward . model . Address . ResourcePath ( ) ) [ 0 ] ; }
org . junit . Assert . assertNotNull ( profile )
testExpression21 ( ) { java . lang . String expr = "-2<sp>*33.34/log(x)^-2<sp>+<sp>14<sp>*6" ; double x = 1.334 ; double expected = ( ( ( - 2 ) * 33.34 ) / ( java . lang . Math . Math . pow ( java . lang . Math . Math . log ( x ) , ( - 2 ) ) ) ) + ( 14 * 6 ) ; net . objecthunter . exp4j . Expression e = new net . objecthunter . exp4j . ExpressionBuilder ( expr ) . variables ( "x" ) . build ( ) . setVariable ( "x" , x ) ; "<AssertPlaceHolder>" ; } evaluate ( ) { final net . objecthunter . exp4j . ArrayStack output = new net . objecthunter . exp4j . ArrayStack ( ) ; for ( int i = 0 ; i < ( tokens . length ) ; i ++ ) { net . objecthunter . exp4j . tokenizer . Token t = tokens [ i ] ; else if ( ( t . getType ( ) ) == ( net . objecthunter . exp4j . tokenizer . Token . TOKEN_VARIABLE ) ) { final java . lang . String name = ( ( net . objecthunter . exp4j . tokenizer . VariableToken ) ( t ) ) . getName ( ) ; final java . lang . Double value = this . variables . get ( name ) ; if ( value == null ) { throw new java . lang . IllegalArgumentException ( ( ( "No<sp>value<sp>has<sp>been<sp>set<sp>for<sp>the<sp>setVariable<sp>'" + name ) + "'." ) ) ; } output . push ( value ) ; } else if ( ( t . getType ( ) ) == ( net . objecthunter . exp4j . tokenizer . Token . TOKEN_OPERATOR ) ) { net . objecthunter . exp4j . tokenizer . OperatorToken op = ( ( net . objecthunter . exp4j . tokenizer . OperatorToken ) ( t ) ) ; if ( ( output . size ( ) ) < ( op . getOperator ( ) . getNumOperands ( ) ) ) { throw new java . lang . IllegalArgumentException ( ( ( "Invalid<sp>number<sp>of<sp>operands<sp>available<sp>for<sp>'" + ( op . getOperator ( ) . getSymbol ( ) ) ) + "'<sp>operator" ) ) ; } if ( ( op . getOperator ( ) . getNumOperands ( ) ) == 2 ) { double rightArg = output . pop ( ) ; double leftArg = output . pop ( ) ; output . push ( op . getOperator ( ) . apply ( leftArg , rightArg ) ) ; } else if ( ( op . getOperator ( ) . getNumOperands ( ) ) == 1 ) { double arg = output . pop ( ) ; output . push ( op . getOperator ( ) . apply ( arg ) ) ; } } else if ( ( t . getType ( ) ) == ( net . objecthunter . exp4j . tokenizer . Token . TOKEN_FUNCTION ) ) { net . objecthunter . exp4j . tokenizer . FunctionToken func = ( ( net . objecthunter . exp4j . tokenizer . FunctionToken ) ( t ) ) ; final int numArguments = func . getFunction ( ) . getNumArguments ( ) ; if ( ( output . size ( ) ) < numArguments ) { throw new java . lang . IllegalArgumentException ( ( ( "Invalid<sp>number<sp>of<sp>arguments<sp>available<sp>for<sp>'" + ( func . getFunction ( ) . getName ( ) ) ) + "'<sp>function" ) ) ; } double [ ] args = new double [ numArguments ] ; for ( int j = numArguments - 1 ; j >= 0 ; j -- ) { args [ j ] = output . pop ( ) ; } output . push ( func . getFunction ( ) . apply ( args ) ) ; } } if ( ( output . size ( ) ) > 1 ) { throw new java . lang . IllegalArgumentException ( "Invalid<sp>number<sp>of<sp>items<sp>on<sp>the<sp>output<sp>queue.<sp>Might<sp>be<sp>caused<sp>by<sp>an<sp>invalid<sp>number<sp>of<sp>arguments<sp>for<sp>a<sp>function." ) ; } return output . pop ( ) ; }
org . junit . Assert . assertEquals ( expected , e . evaluate ( ) , 0.0 )
uploadJpi ( ) { com . gargoylesoftware . htmlunit . html . HtmlPage page = r . createWebClient ( ) . goTo ( "pluginManager/advanced" ) ; com . gargoylesoftware . htmlunit . html . HtmlForm f = page . getFormByName ( "uploadPlugin" ) ; java . io . File dir = tmp . newFolder ( ) ; java . io . File plugin = new java . io . File ( dir , "tasks.jpi" ) ; org . apache . commons . io . FileUtils . copyURLToFile ( getClass ( ) . getClassLoader ( ) . getResource ( "plugins/tasks.jpi" ) , plugin ) ; f . getInputByName ( "name" ) . setValueAttribute ( plugin . getAbsolutePath ( ) ) ; r . submit ( f ) ; "<AssertPlaceHolder>" ; } getRootDir ( ) { return getParent ( ) . getRootDirFor ( this ) ; }
org . junit . Assert . assertTrue ( new java . io . File ( r . jenkins . getRootDir ( ) , "plugins/tasks.jpi" ) . exists ( ) )
getPortSucceeds ( ) { org . apache . beam . model . fnexecution . v1 . BeamFnApi . RemoteGrpcPort port = org . apache . beam . model . fnexecution . v1 . BeamFnApi . RemoteGrpcPort . newBuilder ( ) . setApiServiceDescriptor ( org . apache . beam . model . pipeline . v1 . Endpoints . ApiServiceDescriptor . newBuilder ( ) . setUrl ( "foo" ) . setOauth2ClientCredentialsGrant ( org . apache . beam . model . pipeline . v1 . Endpoints . OAuth2ClientCredentialsGrant . getDefaultInstance ( ) ) . build ( ) ) . build ( ) ; org . apache . beam . sdk . fn . data . RemoteGrpcPortWrite write = org . apache . beam . sdk . fn . data . RemoteGrpcPortWrite . writeToPort ( "myPort" , port ) ; "<AssertPlaceHolder>" ; } getPort ( ) { return server . getPort ( ) ; }
org . junit . Assert . assertThat ( write . getPort ( ) , org . hamcrest . Matchers . equalTo ( port ) )
testDeleteWhenUsersHaveCurrentWorkspaceReference ( ) { io . lumify . sql . model . workspace . SqlWorkspace workspace = ( ( io . lumify . sql . model . workspace . SqlWorkspace ) ( sqlWorkspaceRepository . add ( "test<sp>workspace<sp>1" , testUser ) ) ) ; sqlUserRepository . setCurrentWorkspace ( testUser . getUserId ( ) , workspace . getWorkspaceId ( ) ) ; sqlWorkspaceRepository . delete ( workspace , testUser ) ; sessionManager . getSession ( ) . refresh ( testUser ) ; "<AssertPlaceHolder>" ; } getCurrentWorkspaceId ( ) { return io . lumify . web . clientapi . ApiInvoker . getInstance ( ) . getWorkspaceId ( ) ; }
org . junit . Assert . assertNull ( testUser . getCurrentWorkspaceId ( ) )
testRemoveProviderWhenInTwoServices ( ) { collector . getService ( "service1" ) ; collector . getService ( "service2" ) ; logger . reset ( ) ; collector . removeProvider ( "provider1" ) ; "<AssertPlaceHolder>" ; } records ( ) { return java . util . Collections . unmodifiableList ( records ) ; }
org . junit . Assert . assertEquals ( 3 , logger . records ( ) . size ( ) )
testVersion ( ) { server . request ( net . sourceforge . jwbf . mediawiki . actions . meta . SiteInfoIntegTest . newSiteInfoMatcherBuilder ( ) . build ( ) ) . response ( mwFileOf ( version ( ) , "siteinfo.xml" ) ) ; net . sourceforge . jwbf . mediawiki . MediaWiki . Version responseVersion = bot ( ) . getVersion ( ) ; "<AssertPlaceHolder>" ; } version ( ) { return version ; }
org . junit . Assert . assertEquals ( version ( ) , responseVersion )
test ( ) { java . util . ArrayList < byte [ ] > packets = readPacktsFromFile ( "./src/test/resources/http.cap" ) ; java . lang . String expectedStream = null ; java . lang . String resource = "./src/test/resources/http_cap.txt" ; try { expectedStream = readFile ( resource ) ; } catch ( java . io . IOException e ) { org . junit . Assert . fail ( ( "Could<sp>not<sp>open<sp>resource:<sp>" + resource ) ) ; } org . wayfair . wiff . util . TcpReconstructor recon = new org . wayfair . wiff . util . TcpReconstructor ( ) ; org . wayfair . wiff . util . WiffPacket p = new org . wayfair . wiff . util . WiffPacket ( ) ; boolean complete = false ; java . util . Iterator < byte [ ] > it = packets . iterator ( ) ; while ( ( it . hasNext ( ) ) && ( ! complete ) ) { p . setPacket ( java . nio . ByteBuffer . wrap ( it . next ( ) ) ) ; try { complete = complete || ( recon . ReassemblePacket ( p ) ) ; } catch ( java . io . IOException e ) { org . junit . Assert . fail ( "Could<sp>not<sp>reassemblePacket<sp>due<sp>to<sp>IOException" ) ; } } if ( ! complete ) { org . junit . Assert . fail ( "The<sp>stream<sp>should<sp>be<sp>complete." ) ; } "<AssertPlaceHolder>" ; } toString ( ) { return ( ( ( ( ( ( "\nSource<sp>IP:<sp>" + ( sourceIp ) ) + "\nSource<sp>Port:<sp>" ) + ( sourcePort ) ) + "\nDestination<sp>IP:<sp>" ) + ( destinationIp ) ) + "\nDestination<sp>Port:<sp>" ) + ( destinationPort ) ; }
org . junit . Assert . assertEquals ( expectedStream , recon . toString ( ) )
testisRichText_PlainText ( ) { boolean expResult = false ; boolean result = com . adobe . acs . commons . util . TextUtil . isRichText ( "This<sp>is<sp>is<sp>not<sp>rich<sp>text" ) ; "<AssertPlaceHolder>" ; } isRichText ( java . lang . String ) { java . util . regex . Matcher m = com . adobe . acs . commons . util . TextUtil . RICH_TEXT_PATTERN . matcher ( str ) ; return m . find ( ) ; }
org . junit . Assert . assertEquals ( expResult , result )
testCacheConfigFilter ( ) { java . util . List < java . lang . Class < ? > > classes = new org . apache . ignite . testframework . configvariations . ConfigVariationsTestSuiteBuilder ( org . apache . ignite . testframework . test . ConfigVariationsTestSuiteBuilderTest . NoopTest . class ) . withBasicCacheParams ( ) . classes ( ) ; final java . util . concurrent . atomic . AtomicInteger cnt = new java . util . concurrent . atomic . AtomicInteger ( ) ; java . util . List < java . lang . Class < ? > > filteredClasses = new org . apache . ignite . testframework . configvariations . ConfigVariationsTestSuiteBuilder ( org . apache . ignite . testframework . test . ConfigVariationsTestSuiteBuilderTest . NoopTest . class ) . withBasicCacheParams ( ) . withCacheConfigFilters ( new org . apache . ignite . lang . IgnitePredicate < org . apache . ignite . configuration . CacheConfiguration > ( ) { @ org . apache . ignite . testframework . test . Override public boolean apply ( org . apache . ignite . configuration . CacheConfiguration configuration ) { return ( ( cnt . getAndIncrement ( ) ) % 2 ) == 0 ; } } ) . classes ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return file . length ( ) ; }
org . junit . Assert . assertEquals ( ( ( classes . size ( ) ) / 2 ) , filteredClasses . size ( ) )
shouldActAsResourceProvider ( ) { org . eclipse . egit . ui . internal . synchronize . model . GitModelBlob left = createGitModelBlob ( ) ; org . eclipse . core . resources . IFile file = org . eclipse . core . resources . ResourcesPlugin . getWorkspace ( ) . getRoot ( ) . getProject ( org . eclipse . egit . ui . internal . synchronize . model . PROJ1 ) . getFile ( new org . eclipse . core . runtime . Path ( "folder/test.txt" ) ) ; org . eclipse . core . runtime . IPath leftLocation = left . getResource ( ) . getLocation ( ) ; "<AssertPlaceHolder>" ; } getLocation ( ) { if ( ( location ) == null ) location = new org . eclipse . core . runtime . Path ( gsd . getRepository ( ) . getWorkTree ( ) . toString ( ) ) ; return location ; }
org . junit . Assert . assertEquals ( file . getLocation ( ) , leftLocation )
testMergeMax1 ( ) { lombok . val array0 = org . nd4j . linalg . factory . Nd4j . create ( new double [ ] { 1 , 0 , 0 , 0 , 0 } ) ; lombok . val array1 = org . nd4j . linalg . factory . Nd4j . create ( new double [ ] { 0 , 2 , 0 , 0 , 0 } ) ; lombok . val array2 = org . nd4j . linalg . factory . Nd4j . create ( new double [ ] { 0 , 0 , 3 , 0 , 0 } ) ; lombok . val array3 = org . nd4j . linalg . factory . Nd4j . create ( new double [ ] { 0 , 0 , 0 , 4 , 0 } ) ; lombok . val array4 = org . nd4j . linalg . factory . Nd4j . create ( new double [ ] { 0 , 0 , 0 , 0 , 5 } ) ; lombok . val z = org . nd4j . linalg . factory . Nd4j . create ( 5 ) ; lombok . val exp = org . nd4j . linalg . factory . Nd4j . create ( new double [ ] { 1 , 2 , 3 , 4 , 5 } ) ; org . nd4j . linalg . api . ops . CustomOp op = org . nd4j . linalg . api . ops . DynamicCustomOp . builder ( "mergemax" ) . addInputs ( array0 , array1 , array2 , array3 , array4 ) . addOutputs ( z ) . callInplace ( false ) . build ( ) ; org . nd4j . linalg . factory . Nd4j . getExecutioner ( ) . exec ( op ) ; "<AssertPlaceHolder>" ; } exec ( org . nd4j . linalg . cpu . nativecpu . ops . Op ) { checkForCompression ( op ) ; if ( op instanceof org . nd4j . linalg . cpu . nativecpu . ops . ScalarOp ) { org . nd4j . linalg . cpu . nativecpu . ops . ScalarOp s = ( ( org . nd4j . linalg . cpu . nativecpu . ops . ScalarOp ) ( op ) ) ; exec ( s ) ; } else if ( op instanceof org . nd4j . linalg . cpu . nativecpu . ops . GradientOp ) { op . exec ( ) ; } else if ( op instanceof org . nd4j . linalg . cpu . nativecpu . ops . TransformOp ) { org . nd4j . linalg . cpu . nativecpu . ops . TransformOp t = ( ( org . nd4j . linalg . cpu . nativecpu . ops . TransformOp ) ( op ) ) ; exec ( t ) ; } else if ( op instanceof org . nd4j . linalg . cpu . nativecpu . ops . Accumulation ) { org . nd4j . linalg . cpu . nativecpu . ops . Accumulation ac = ( ( org . nd4j . linalg . cpu . nativecpu . ops . Accumulation ) ( op ) ) ; exec ( ac ) ; } else if ( op instanceof org . nd4j . linalg . cpu . nativecpu . ops . IndexAccumulation ) { org . nd4j . linalg . cpu . nativecpu . ops . IndexAccumulation iac = ( ( org . nd4j . linalg . cpu . nativecpu . ops . IndexAccumulation ) ( op ) ) ; exec ( iac ) ; } else if ( op instanceof org . nd4j . linalg . cpu . nativecpu . ops . BroadcastOp ) { org . nd4j . linalg . cpu . nativecpu . ops . BroadcastOp broadcastOp = ( ( org . nd4j . linalg . cpu . nativecpu . ops . BroadcastOp ) ( op ) ) ; exec ( broadcastOp , broadcastOp . getDimension ( ) ) ; } else if ( op instanceof org . nd4j . linalg . cpu . nativecpu . ops . ShapeOp ) { org . nd4j . linalg . cpu . nativecpu . ops . ShapeOp shapeOp = ( ( org . nd4j . linalg . cpu . nativecpu . ops . ShapeOp ) ( op ) ) ; exec ( shapeOp ) ; } else if ( op instanceof org . nd4j . linalg . cpu . nativecpu . ops . RandomOp ) { org . nd4j . linalg . cpu . nativecpu . ops . RandomOp rngOp = ( ( org . nd4j . linalg . cpu . nativecpu . ops . RandomOp ) ( op ) ) ; exec ( rngOp , org . nd4j . linalg . factory . Nd4j . getRandom ( ) ) ; } return op ; }
org . junit . Assert . assertEquals ( exp , z )
addsSegment ( java . lang . String , java . lang . String [ ] , java . lang . String ) { java . net . URI uri = javax . ws . rs . core . UriBuilder . fromUri ( source ) . segment ( segments ) . build ( ) ; "<AssertPlaceHolder>" ; } create ( javax . servlet . http . HttpServletRequest ) { final java . net . URL forwardedUrl = org . everrest . core . servlet . ServletContainerRequest . getForwardedUrl ( req ) ; java . lang . String host ; int port ; if ( forwardedUrl == null ) { host = req . getServerName ( ) ; port = req . getServerPort ( ) ; } else { host = forwardedUrl . getHost ( ) ; port = forwardedUrl . getPort ( ) ; if ( port < 0 ) { port = forwardedUrl . getDefaultPort ( ) ; } org . everrest . core . servlet . ServletContainerRequest . LOG . debug ( "Assuming<sp>forwarded<sp>URL:<sp>{}" , forwardedUrl ) ; } final java . lang . StringBuilder commonUriBuilder = new java . lang . StringBuilder ( ) ; final java . lang . String scheme = org . everrest . core . servlet . ServletContainerRequest . getScheme ( req ) ; commonUriBuilder . append ( scheme ) ; commonUriBuilder . append ( "://" ) ; commonUriBuilder . append ( host ) ; if ( ! ( ( ( port < 0 ) || ( ( port == 80 ) && ( "http" . equals ( scheme ) ) ) ) || ( ( port == 443 ) && ( "https" . equals ( scheme ) ) ) ) ) { commonUriBuilder . append ( ':' ) ; commonUriBuilder . append ( port ) ; } final java . lang . String commonUriPrefix = commonUriBuilder . toString ( ) ; final java . lang . StringBuilder baseUriBuilder = new java . lang . StringBuilder ( commonUriPrefix ) ; baseUriBuilder . append ( req . getContextPath ( ) ) ; baseUriBuilder . append ( req . getServletPath ( ) ) ; final java . net . URI baseUri = java . net . URI . create ( baseUriBuilder . toString ( ) ) ; final java . lang . StringBuilder requestUriBuilder = new java . lang . StringBuilder ( commonUriPrefix ) ; requestUriBuilder . append ( req . getRequestURI ( ) ) ; final java . lang . String queryString = req . getQueryString ( ) ; if ( queryString != null ) { requestUriBuilder . append ( '?' ) ; requestUriBuilder . append ( queryString ) ; } final java . net . URI requestUri = java . net . URI . create ( requestUriBuilder . toString ( ) ) ; return new org . everrest . core . servlet . ServletContainerRequest ( org . everrest . core . servlet . ServletContainerRequest . getMethod ( req ) , requestUri , baseUri , org . everrest . core . servlet . ServletContainerRequest . getEntityStream ( req ) , org . everrest . core . servlet . ServletContainerRequest . getHeaders ( req ) , org . everrest . core . servlet . ServletContainerRequest . getSecurityContext ( req ) ) ; }
org . junit . Assert . assertEquals ( java . net . URI . create ( expected ) , uri )
testGetDDMDataProviderByInstanceId ( ) { com . liferay . dynamic . data . mapping . data . provider . DDMDataProvider testDataProvider = com . liferay . dynamic . data . mapping . data . provider . test . DDMDataProviderTest . _ddmDataProviderTracker . getDDMDataProviderByInstanceId ( "test" ) ; "<AssertPlaceHolder>" ; } getDDMDataProviderByInstanceId ( java . lang . String ) { return _ddmDataProviderInstanceIdTrackerMap . getService ( instanceId ) ; }
org . junit . Assert . assertNotNull ( testDataProvider )
testPutAllEntriesSetsFullyLoaded ( ) { org . apache . jackrabbit . oak . security . authorization . permission . PrincipalPermissionEntries ppe = new org . apache . jackrabbit . oak . security . authorization . permission . PrincipalPermissionEntries ( 1 ) ; ppe . putAllEntries ( com . google . common . collect . ImmutableMap . of ( "/path" , com . google . common . collect . ImmutableSet . of ( permissionEntry ) ) ) ; "<AssertPlaceHolder>" ; } isFullyLoaded ( ) { return fullyLoaded ; }
org . junit . Assert . assertTrue ( ppe . isFullyLoaded ( ) )
nativeTypesJsonObject ( ) { org . spincast . core . json . JsonObject jsonObj = getJsonManager ( ) . create ( ) ; jsonObj . set ( "titi" , 123 ) ; java . lang . Object result = getJsonManager ( ) . convertToNativeType ( jsonObj ) ; "<AssertPlaceHolder>" ; } convertToNativeType ( java . lang . Object ) { if ( originalObject == null ) { return null ; } if ( ( ( ( ( ( ( ( ( ( ( ( originalObject instanceof java . lang . String ) || ( originalObject instanceof java . lang . Integer ) ) || ( originalObject instanceof java . lang . Long ) ) || ( originalObject instanceof java . lang . Float ) ) || ( originalObject instanceof java . lang . Double ) ) || ( originalObject instanceof java . lang . Boolean ) ) || ( originalObject instanceof java . math . BigDecimal ) ) || ( originalObject instanceof byte [ ] ) ) || ( originalObject instanceof java . util . Date ) ) || ( originalObject instanceof java . time . Instant ) ) || ( originalObject instanceof org . spincast . core . json . JsonObject ) ) || ( originalObject instanceof org . spincast . core . json . JsonArray ) ) { return originalObject ; } if ( originalObject instanceof com . google . gson . JsonElement ) { return getObjectFromGsonJsonElement ( ( ( com . google . gson . JsonElement ) ( originalObject ) ) ) ; } if ( originalObject instanceof java . util . Collection < ? > ) { org . spincast . core . json . JsonArray array = createArray ( ) ; for ( java . lang . Object element : ( ( java . util . Collection < ? > ) ( originalObject ) ) ) { array . add ( element ) ; } return array ; } else if ( originalObject instanceof java . lang . Object [ ] ) { org . spincast . core . json . JsonArray array = createArray ( ) ; for ( java . lang . Object element : ( ( java . lang . Object [ ] ) ( originalObject ) ) ) { array . add ( element ) ; } return array ; } else if ( originalObject instanceof java . util . Map ) { org . spincast . core . json . JsonObject obj = create ( ) ; java . util . Map < ? , ? > map = ( ( java . util . Map < ? , ? > ) ( originalObject ) ) ; for ( java . util . Map . Entry < ? , ? > entry : map . entrySet ( ) ) { if ( ( entry . getKey ( ) ) == null ) { throw new java . lang . RuntimeException ( "Cannot<sp>convert<sp>a<sp>Map<sp>to<sp>a<sp>JsonObject<sp>when<sp>a<sp>key<sp>is<sp>NULL." ) ; } obj . setNoKeyParsing ( java . lang . String . valueOf ( entry . getKey ( ) ) , entry . getValue ( ) ) ; } return obj ; } else if ( originalObject instanceof java . lang . Enum < ? > ) { return ( ( java . lang . Enum < ? > ) ( originalObject ) ) . name ( ) ; } java . lang . String jsonStr = toJsonString ( originalObject ) ; if ( ( ( jsonStr . startsWith ( "\"" ) ) && ( jsonStr . endsWith ( "\"" ) ) ) && ( ( jsonStr . length ( ) ) > 1 ) ) { jsonStr = jsonStr . substring ( 1 , ( ( jsonStr . length ( ) ) - 1 ) ) ; return jsonStr ; } org . spincast . core . json . JsonObject jsonObject = fromString ( jsonStr ) ; return jsonObject ; }
org . junit . Assert . assertEquals ( jsonObj , result )
testGetSatelliteInfo ( ) { java . util . List < net . sf . marineapi . nmea . util . SatelliteInfo > sat = gsv . getSatelliteInfo ( ) ; "<AssertPlaceHolder>" ; testSatelliteInfo ( sat . get ( 0 ) , "15" , 56 , 182 , 51 ) ; testSatelliteInfo ( sat . get ( 1 ) , "17" , 38 , 163 , 47 ) ; testSatelliteInfo ( sat . get ( 2 ) , "18" , 63 , 58 , 50 ) ; testSatelliteInfo ( sat . get ( 3 ) , "21" , 53 , 329 , 47 ) ; } getSatelliteInfo ( ) { return this . info ; }
org . junit . Assert . assertEquals ( 4 , sat . size ( ) )
testRequestFilterEmpty ( ) { request . setPath ( "/test" ) ; service . findMatch ( new au . com . sensis . stubby . model . StubRequest ( request ) ) ; "<AssertPlaceHolder>" ; } findRequests ( au . com . sensis . stubby . model . StubRequest ) { au . com . sensis . stubby . service . model . RequestPattern pattern = new au . com . sensis . stubby . service . model . RequestPattern ( filter ) ; java . util . List < au . com . sensis . stubby . model . StubRequest > result = new java . util . ArrayList < au . com . sensis . stubby . model . StubRequest > ( ) ; for ( au . com . sensis . stubby . model . StubRequest request : requests ) { if ( pattern . match ( request ) . matches ( ) ) { result . add ( request ) ; } } return result ; }
org . junit . Assert . assertEquals ( 1 , service . findRequests ( new au . com . sensis . stubby . model . StubRequest ( ) ) . size ( ) )
basic ( ) { org . ebayopensource . fido . uaf . tlv . Tags t = getTags ( org . ebayopensource . fido . uaf . tlv . TestAssertions . getExampleRegAssertions ( ) ) ; org . ebayopensource . fido . uaf . crypto . CertificateValidatorImpl validator = new org . ebayopensource . fido . uaf . crypto . CertificateValidatorImpl ( ) ; boolean validate = validator . validate ( t . getTags ( ) . get ( TagsEnum . TAG_ATTESTATION_CERT . id ) . value , getSignedData ( t . getTags ( ) . get ( TagsEnum . TAG_UAFV1_KRD . id ) ) , t . getTags ( ) . get ( TagsEnum . TAG_SIGNATURE . id ) . value ) ; "<AssertPlaceHolder>" ; } get ( java . lang . String ) { return org . ebayopensource . fidouafclient . curl . Curl . get ( url , null ) ; }
org . junit . Assert . assertTrue ( validate )
testSelectFromEmptyList ( ) { cn . jimmyshi . beanquery . selectors . KeyValueMapSelector selector = new cn . jimmyshi . beanquery . selectors . KeyValueMapSelector ( ) { @ cn . jimmyshi . beanquery . selectors . Override protected java . util . Map < java . lang . String , java . lang . Object > doSelect ( java . lang . Object item ) { return java . util . Collections . emptyMap ( ) ; } } ; java . util . List < java . util . Map < java . lang . String , java . lang . Object > > result = selector . select ( java . util . Collections . emptyList ( ) ) ; "<AssertPlaceHolder>" ; } select ( java . lang . Object ) { if ( item == null ) { return null ; } if ( itemClass . isInstance ( item ) ) { return itemClass . cast ( item ) ; } logger . debug ( "item<sp>[{}]<sp>is<sp>not<sp>assignable<sp>to<sp>class<sp>[{}],<sp>returning<sp>null" , item , itemClass ) ; return null ; }
org . junit . Assert . assertThat ( result , org . hamcrest . Matchers . empty ( ) )
testColumns ( ) { java . sql . DatabaseMetaData dbmd = con . getMetaData ( ) ; "<AssertPlaceHolder>" ; java . sql . ResultSet rs = dbmd . getColumns ( null , null , "SQL_DATETIME_SUB" 3 , null ) ; checkResultSetColumnLabels ( rs , "NUM_PREC_RADIX" 4 , "NUM_PREC_RADIX" 0 , "TABLE_NAME" , "SQL_DATETIME_SUB" 4 , "NUM_PREC_RADIX" 6 , "TYPE_NAME" , "NUM_PREC_RADIX" 2 , "SQL_DATETIME_SUB" 0 , "NUM_PREC_RADIX" 3 , "NUM_PREC_RADIX" , "NUM_PREC_RADIX" 8 , "REMARKS" , "NUM_PREC_RADIX" 9 , "SQL_DATA_TYPE" , "SQL_DATETIME_SUB" , "SQL_DATETIME_SUB" 1 , "NUM_PREC_RADIX" 5 , "NUM_PREC_RADIX" 1 , "SCOPE_CATALOG" , "SCOPE_SCHEMA" , "SQL_DATETIME_SUB" 2 , "SOURCE_DATA_TYPE" , "NUM_PREC_RADIX" 7 , "IS_GENERATEDCOLUMN" ) ; rs . close ( ) ; } getMetaData ( ) { checkClosed ( ) ; return new com . impossibl . postgres . jdbc . PGResultSetMetaData ( statement . connection , scroller . getResultFields ( ) , context . getCustomTypeMap ( ) ) ; }
org . junit . Assert . assertNotNull ( dbmd )
hashCodeObjects ( ) { org . oscm . vo . Setting s = new org . oscm . vo . Setting ( ) ; s . setKey ( "key1" ) ; org . oscm . vo . Setting o = new org . oscm . vo . Setting ( ) ; o . setKey ( "key2" ) ; "<AssertPlaceHolder>" ; } hashCode ( ) { int hash = 59 ; hash = ( key ) * hash ; return hash ; }
org . junit . Assert . assertTrue ( ( ( s . hashCode ( ) ) != ( o . hashCode ( ) ) ) )
testFilterStack_02 ( ) { java . util . function . Predicate < java . lang . Object > filter = ( x ) -> false ; org . apache . jena . atlas . iterator . FilterStack < java . lang . Object > filterStack = new org . apache . jena . atlas . iterator . TestIter . AlwaysAcceptFilterStack ( filter ) ; "<AssertPlaceHolder>" ; } test ( org . apache . jena . permissions . model . impl . Statement ) { if ( securedItem . canRead ( s ) ) { return selector . test ( s ) ; } return false ; }
org . junit . Assert . assertFalse ( filterStack . test ( new java . lang . Object ( ) ) )
getNSSymbol_returns_zero_when_namespace_is_null ( ) { final org . exist . dom . persistent . SymbolTable symbolTable = createSymbolTable ( org . exist . dom . persistent . SymbolTableTest . createTempDir ( ) ) ; "<AssertPlaceHolder>" ; symbolTable . close ( ) ; } getNSSymbol ( java . lang . String ) { if ( ( ns == null ) || ( ( ns . length ( ) ) == 0 ) ) { return 0 ; } return ( ( short ) ( namespaceSymbols . getId ( ns ) ) ) ; }
org . junit . Assert . assertEquals ( 0 , symbolTable . getNSSymbol ( null ) )
getReportMessage ( ) { org . openhab . binding . zwave . internal . protocol . commandclass . ZWaveMultiLevelSensorCommandClass cls = ( ( org . openhab . binding . zwave . internal . protocol . commandclass . ZWaveMultiLevelSensorCommandClass ) ( getCommandClass ( CommandClass . COMMAND_CLASS_SENSOR_MULTILEVEL ) ) ) ; org . openhab . binding . zwave . internal . protocol . transaction . ZWaveCommandClassTransactionPayload msg ; cls . setVersion ( 5 ) ; msg = cls . getReportMessage ( SensorType . TEMPERATURE , 0 , java . math . BigDecimal . valueOf ( 23.4 ) ) ; byte [ ] expectedResponseV5 = new byte [ ] { 49 , 5 , 1 , 34 , 0 , ( ( byte ) ( 234 ) ) } ; "<AssertPlaceHolder>" ; } getPayloadBuffer ( ) { return payload ; }
org . junit . Assert . assertTrue ( java . util . Arrays . equals ( msg . getPayloadBuffer ( ) , expectedResponseV5 ) )
get ( ) { final org . graylog . plugins . metrics . opentsdb . MetricsOpenTsdbReporterConfiguration configuration = new org . graylog . plugins . metrics . opentsdb . MetricsOpenTsdbReporterConfiguration ( ) ; final com . github . sps . metrics . opentsdb . OpenTsdb openTsdb = com . github . sps . metrics . opentsdb . OpenTsdb . forService ( "http://localhost:4242/" ) . create ( ) ; final org . graylog . plugins . metrics . opentsdb . providers . OpenTsdbReporterProvider provider = new org . graylog . plugins . metrics . opentsdb . providers . OpenTsdbReporterProvider ( configuration , openTsdb , new com . codahale . metrics . MetricRegistry ( ) ) ; final com . github . sps . metrics . OpenTsdbReporter reporter = provider . get ( ) ; "<AssertPlaceHolder>" ; } get ( ) { final org . graylog . plugins . metrics . jmx . providers . JmxReporterProvider provider = new org . graylog . plugins . metrics . jmx . providers . JmxReporterProvider ( new org . graylog . plugins . metrics . jmx . MetricsJmxReporterConfiguration ( ) , new com . codahale . metrics . MetricRegistry ( ) ) ; final com . codahale . metrics . JmxReporter reporter = provider . get ( ) ; org . junit . Assert . assertNotNull ( reporter ) ; }
org . junit . Assert . assertNotNull ( reporter )
emptyLhs ( ) { lhs = new org . objectstyle . wolips . ruleeditor . model . LeftHandSide ( ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { java . lang . String bindingValue = getValue ( ) ; return ( bindingValue == null ) || ( ( bindingValue . length ( ) ) == 0 ) ; }
org . junit . Assert . assertThat ( lhs . isEmpty ( ) , org . hamcrest . CoreMatchers . is ( true ) )
getConfigurationRealms_should_return_a_configurationRealm_with_one_rolePermissionResolver ( ) { java . util . Collection < java . lang . Class < ? > > rolePermissionResolverClasses = new java . util . ArrayList ( ) ; rolePermissionResolverClasses . add ( org . seedstack . seed . security . RolePermissionResolver . class ) ; securityClasses . put ( org . seedstack . seed . security . RolePermissionResolver . class , rolePermissionResolverClasses ) ; when ( configuration . getRealms ( ) ) . thenReturn ( com . google . common . collect . ImmutableList . of ( new org . seedstack . seed . security . SecurityConfig . RealmConfig ( ) . setName ( "Realm" ) . setPermissionResolver ( "RolePermissionResolver" ) ) ) ; underTest = new org . seedstack . seed . security . internal . SecurityConfigurer ( configuration , securityClasses , null ) ; org . seedstack . seed . security . internal . RealmConfiguration realm = underTest . getConfigurationRealms ( ) . iterator ( ) . next ( ) ; "<AssertPlaceHolder>" ; } getRolePermissionResolverClass ( ) { return rolePermissionResolverClass ; }
org . junit . Assert . assertEquals ( org . seedstack . seed . security . RolePermissionResolver . class , realm . getRolePermissionResolverClass ( ) )
lockShouldReturnTrueItTheTableIsNotLocked ( ) { initShouldNotCreateTheSchemaIfItAlreadyExists ( ) ; reset ( connection , metaData , statement , preparedStatement , resultSet ) ; expect ( connection . isClosed ( ) ) . andReturn ( false ) ; expect ( connection . prepareStatement ( ( ( "SELECT<sp>*<sp>FROM<sp>" + ( tableName ) ) + "<sp>FOR<sp>UPDATE" ) ) ) . andReturn ( preparedStatement ) ; preparedStatement . setQueryTimeout ( 0 ) ; expect ( preparedStatement . execute ( ) ) . andReturn ( true ) ; preparedStatement . close ( ) ; expect ( connection . isClosed ( ) ) . andReturn ( false ) ; expect ( connection . prepareStatement ( ( ( "UPDATE<sp>" + ( tableName ) ) + "<sp>SET<sp>MOMENT<sp>=<sp>1" ) ) ) . andReturn ( preparedStatement ) ; preparedStatement . setQueryTimeout ( 0 ) ; expect ( preparedStatement . executeUpdate ( ) ) . andReturn ( 1 ) ; preparedStatement . close ( ) ; replay ( connection , metaData , statement , preparedStatement , resultSet ) ; boolean lockAcquired = lock . lock ( ) ; verify ( connection , metaData , statement , preparedStatement , resultSet ) ; "<AssertPlaceHolder>" ; } lock ( ) { return acquireLock ( ) ; }
org . junit . Assert . assertTrue ( lockAcquired )
loadEvent ( ) { org . pdfsam . test . HitTestListener < org . pdfsam . pdf . PdfLoadRequestEvent > listener = new org . pdfsam . test . HitTestListener ( ) ; eventStudio ( ) . add ( org . pdfsam . pdf . PdfLoadRequestEvent . class , listener ) ; typePathAndValidate ( ) ; "<AssertPlaceHolder>" ; } isHit ( ) { return hit ; }
org . junit . Assert . assertTrue ( listener . isHit ( ) )
testConstructor2 ( ) { kg . apc . charting . DateTimeRenderer instance = new kg . apc . charting . DateTimeRenderer ( kg . apc . charting . DateTimeRendererTest . HHMMSS ) ; instance . setValue ( java . lang . System . currentTimeMillis ( ) ) ; "<AssertPlaceHolder>" ; } setValue ( java . lang . Object ) { if ( ( ( value != null ) && ( value instanceof java . lang . Double ) ) && ( ( ( ( java . lang . Double ) ( value ) ) . doubleValue ( ) ) == 0 ) ) { setText ( zeroLabel ) ; } else { super . setValue ( value ) ; } }
org . junit . Assert . assertNotNull ( instance . getText ( ) )
testIncludes ( ) { final org . apache . ibatis . session . SqlSession sqlSession = org . apache . ibatis . submitted . includes . IncludeTest . sqlSessionFactory . openSession ( ) ; try { final java . lang . Integer result = sqlSession . selectOne ( "org.apache.ibatis.submitted.includes.mapper.selectWithProperty" ) ; "<AssertPlaceHolder>" ; } finally { sqlSession . close ( ) ; } } selectOne ( java . lang . String ) { return sqlSessionProxy . < T > selectOne ( statement ) ; }
org . junit . Assert . assertEquals ( java . lang . Integer . valueOf ( 1 ) , result )
parallel_should_assemble_parallel_of_1 ( ) { net . mostlyoriginal . api . operation . common . OperationFlow operation = parallel ( new net . mostlyoriginal . api . operation . common . TestOperation ( ) ) ; "<AssertPlaceHolder>" ; } parallel ( net . mostlyoriginal . api . operation . common . Operation ) { final net . mostlyoriginal . api . operation . flow . ParallelOperation operation = net . mostlyoriginal . api . operation . common . Operation . prepare ( net . mostlyoriginal . api . operation . flow . ParallelOperation . class ) ; operation . add ( o1 ) ; return operation ; }
org . junit . Assert . assertEquals ( 1 , operation . operations . size )
testGetBytesSameSizeArray ( ) { com . eclipsesource . v8 . V8Array a = v8 . executeArrayScript ( "[0,<sp>1,<sp>2,<sp>3]" ) ; byte [ ] result = new byte [ 4 ] ; int size = a . getBytes ( 0 , 4 , result ) ; "<AssertPlaceHolder>" ; a . close ( ) ; } executeArrayScript ( java . lang . String ) { return executeArrayScript ( script , null , 0 ) ; }
org . junit . Assert . assertEquals ( 4 , size )
defaultMulePollingController ( ) { createMuleContext ( ) ; context . start ( ) ; "<AssertPlaceHolder>" ; } isPrimaryPollingInstance ( ) { return schedulerController . isPrimarySchedulingInstance ( ) ; }
org . junit . Assert . assertThat ( context . isPrimaryPollingInstance ( ) , org . hamcrest . core . Is . is ( true ) )
shouldReturnPrincipalAndInterestDetailsForMatchingNumberOfInstallments ( ) { org . mifos . clientportfolio . newloan . domain . LoanInterestCalculationDetails loanInterestCalculationDetails = new org . mifos . clientportfolio . newloan . domain . LoanInterestCalculationDetailsBuilder ( ) . withLoanAmount ( "100.0" ) . withGraceType ( GraceType . NONE ) . withGraceDurationOf ( 0 ) . withNumberOfInstallments ( 1 ) . withInterestFractionalRatePerInstallmentOf ( "0.16" ) . build ( ) ; java . util . List < org . mifos . accounts . loan . util . helpers . InstallmentPrincipalAndInterest > equalInstallments = principalWithInterestGenerator . generateEqualInstallments ( loanInterestCalculationDetails ) ; "<AssertPlaceHolder>" ; } size ( ) { return fieldErrors . size ( ) ; }
org . junit . Assert . assertThat ( equalInstallments . size ( ) , org . hamcrest . Matchers . is ( 1 ) )
testXpath2Selector ( ) { us . codecraft . webmagic . selector . Xpath2Selector xpath2Selector = new us . codecraft . webmagic . selector . Xpath2Selector ( "//a/@href" ) ; java . lang . String select = xpath2Selector . select ( html ) ; "<AssertPlaceHolder>" ; } select ( java . lang . String ) { try { org . htmlcleaner . HtmlCleaner htmlCleaner = new org . htmlcleaner . HtmlCleaner ( ) ; org . htmlcleaner . TagNode tagNode = htmlCleaner . clean ( text ) ; org . w3c . dom . Document document = new org . htmlcleaner . DomSerializer ( new org . htmlcleaner . CleanerProperties ( ) ) . createDOM ( tagNode ) ; java . lang . Object result ; try { result = xPathExpression . evaluate ( document , XPathConstants . NODESET ) ; } catch ( javax . xml . xpath . XPathExpressionException e ) { result = xPathExpression . evaluate ( document , XPathConstants . STRING ) ; } if ( result instanceof org . w3c . dom . NodeList ) { org . w3c . dom . NodeList nodeList = ( ( org . w3c . dom . NodeList ) ( result ) ) ; if ( ( nodeList . getLength ( ) ) == 0 ) { return null ; } org . w3c . dom . Node item = nodeList . item ( 0 ) ; if ( ( ( item . getNodeType ( ) ) == ( org . w3c . dom . Node . ATTRIBUTE_NODE ) ) || ( ( item . getNodeType ( ) ) == ( org . w3c . dom . Node . TEXT_NODE ) ) ) { return item . getTextContent ( ) ; } else { javax . xml . transform . stream . StreamResult xmlOutput = new javax . xml . transform . stream . StreamResult ( new java . io . StringWriter ( ) ) ; javax . xml . transform . Transformer transformer = javax . xml . transform . TransformerFactory . newInstance ( ) . newTransformer ( ) ; transformer . setOutputProperty ( OutputKeys . OMIT_XML_DECLARATION , "yes" ) ; transformer . transform ( new javax . xml . transform . dom . DOMSource ( item ) , xmlOutput ) ; return xmlOutput . getWriter ( ) . toString ( ) ; } } return result . toString ( ) ; } catch ( java . lang . Exception e ) { logger . error ( ( "select<sp>text<sp>error!<sp>" + ( xpathStr ) ) , e ) ; } return null ; }
org . junit . Assert . assertNotNull ( select )
testEncodedPaths ( ) { org . apache . hadoop . fs . FileSystem fs2 = org . apache . hadoop . fs . test . unit . HcfsFileSystemTest . fs ; org . apache . hadoop . fs . Path encodedFiles = new org . apache . hadoop . fs . Path ( ( "/tmp/encodedTest" + ( java . lang . System . currentTimeMillis ( ) ) ) ) ; fs2 . mkdirs ( encodedFiles ) ; fs2 . create ( new org . apache . hadoop . fs . Path ( encodedFiles , "a" ) ) ; fs2 . create ( new org . apache . hadoop . fs . Path ( encodedFiles , "a%2" ) ) ; fs2 . create ( new org . apache . hadoop . fs . Path ( encodedFiles , "a%2a" ) ) ; fs2 . create ( new org . apache . hadoop . fs . Path ( encodedFiles , "a%3a" ) ) ; fs2 . create ( new org . apache . hadoop . fs . Path ( encodedFiles , "a%4a" ) ) ; "<AssertPlaceHolder>" ; fs2 . delete ( encodedFiles , true ) ; } listStatus ( org . apache . hadoop . fs . Path ) { path = makeAbsolute ( path ) ; if ( isFile ( path ) ) return new org . apache . hadoop . fs . FileStatus [ ] { getFileStatus ( path ) } ; java . lang . String [ ] dirlist = ceph . listdir ( path ) ; if ( dirlist != null ) { org . apache . hadoop . fs . FileStatus [ ] status = new org . apache . hadoop . fs . FileStatus [ dirlist . length ] ; for ( int i = 0 ; i < ( status . length ) ; i ++ ) { status [ i ] = getFileStatus ( new org . apache . hadoop . fs . Path ( path , dirlist [ i ] ) ) ; } return status ; } else { throw new java . io . FileNotFoundException ( ( ( "File<sp>" + path ) + "<sp>does<sp>not<sp>exist." ) ) ; } }
org . junit . Assert . assertEquals ( 5 , fs2 . listStatus ( encodedFiles ) . length )
testNonupperCaseFunctionPrefixThrowsException ( ) { try { new com . liferay . portal . internal . dao . sql . transformer . SQLFunctionTransformer ( "World(" , "" , "" , "Hello<sp>World()" ) ; org . junit . Assert . fail ( ) ; } catch ( java . lang . IllegalArgumentException iae ) { "<AssertPlaceHolder>" ; } } getMessage ( ) { return _message ; }
org . junit . Assert . assertEquals ( "World(" , iae . getMessage ( ) )
testMetaCharsetUpdateCleanup ( ) { final com . itextpdf . styledxmlparser . jsoup . nodes . Document doc = createHtmlDocument ( "dontTouch" ) ; doc . updateMetaCharsetElement ( true ) ; doc . charset ( java . nio . charset . Charset . forName ( com . itextpdf . styledxmlparser . jsoup . nodes . DocumentTest . charsetUtf8 ) ) ; final java . lang . String htmlCharsetUTF8 = ( ( ( ( ( "<html>\n" + ( "<sp><head>\n" + "<sp><meta<sp>charset=\"" ) ) + ( com . itextpdf . styledxmlparser . jsoup . nodes . DocumentTest . charsetUtf8 ) ) + "\">\n" ) + "<sp></head>\n" ) + "<sp><body></body>\n" ) + "</html>" ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( ( ( ( ( ( name ) + "-" ) + ( major ) ) + "." ) + ( minor ) ) + "." ) + ( patch ) ) + ( snapshot ? "-SNAPSHOT" : "" ) ; }
org . junit . Assert . assertEquals ( htmlCharsetUTF8 , doc . toString ( ) )
testMoreFiles ( ) { java . nio . file . Path file1 = java . nio . file . Paths . get ( tempDir . toAbsolutePath ( ) . toString ( ) , "tempFile1" ) ; java . nio . file . Path file2 = java . nio . file . Paths . get ( tempDir . toAbsolutePath ( ) . toString ( ) , "tempFile2" ) ; java . nio . file . Path file3 = java . nio . file . Paths . get ( tempDir . toAbsolutePath ( ) . toString ( ) , "tempFile3" ) ; java . nio . file . Files . createFile ( file1 ) ; java . nio . file . Files . createFile ( file2 ) ; java . nio . file . Files . createFile ( file3 ) ; java . lang . String [ ] files = new java . lang . String [ ] { file1 . toString ( ) , file2 . toString ( ) } ; cache . store ( new org . springframework . ide . vscode . boot . java . utils . SymbolCacheKey ( "somekey" , "1" ) , files , new java . util . ArrayList ( ) ) ; java . lang . String [ ] moreFiles = new java . lang . String [ ] { file1 . toString ( ) , file2 . toString ( ) , file3 . toString ( ) } ; org . springframework . ide . vscode . boot . java . utils . CachedSymbol [ ] cachedSymbols = cache . retrieve ( new org . springframework . ide . vscode . boot . java . utils . SymbolCacheKey ( "somekey" , "1" ) , moreFiles ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( ( "HighlightParams<sp>[doc=" + ( doc ) ) + ",<sp>ranges=" ) + ( codeLenses ) ) + "]" ; }
org . junit . Assert . assertNull ( cachedSymbols )
verifierShouldVerifyCorrectlySignedLtiLaunches ( ) { java . lang . String key = "key" ; java . lang . String secret = "secret" ; org . apache . http . client . methods . HttpPost ltiLaunch = new org . apache . http . client . methods . HttpPost ( new java . net . URI ( "http://example.com/test" ) ) ; signer . sign ( ltiLaunch , key , secret ) ; org . imsglobal . lti . launch . LtiVerificationResult result = verifier . verify ( new org . imsglobal . lti . launch . MockHttpPost ( ltiLaunch ) , secret ) ; "<AssertPlaceHolder>" ; } getSuccess ( ) { return success ; }
org . junit . Assert . assertTrue ( result . getSuccess ( ) )
createAccessFromTicketTest ( ) { com . github . hermannpencole . nifi . swagger . client . model . AboutEntity response = new com . github . hermannpencole . nifi . swagger . client . model . AboutEntity ( ) ; response . setAbout ( new com . github . hermannpencole . nifi . swagger . client . model . AboutDTO ( ) ) ; response . getAbout ( ) . setVersion ( "version" ) ; when ( flowApiMock . getAboutInfo ( ) ) . thenReturn ( response ) ; java . lang . String result = informationService . getVersion ( ) ; verify ( flowApiMock ) . getAboutInfo ( ) ; "<AssertPlaceHolder>" ; } getVersion ( ) { return flowApi . getAboutInfo ( ) . getAbout ( ) . getVersion ( ) ; }
org . junit . Assert . assertEquals ( "version" , result )
whenGetClassHierarchyIsCalledWithNull_anEmptyStackIsReturned ( ) { java . util . Stack < java . lang . Class < ? > > emptyStack = stackForClasses ( ) ; java . util . Stack < java . lang . Class < ? > > classHierarchy = de . bechte . junit . runners . util . ReflectionUtil . getClassHierarchy ( null ) ; "<AssertPlaceHolder>" ; } getClassHierarchy ( java . lang . Class ) { final java . util . Stack < java . lang . Class < ? > > classHierarchy = new java . util . Stack < java . lang . Class < ? > > ( ) ; java . lang . Class < ? > c = clazz ; while ( c != null ) { classHierarchy . push ( c ) ; c = ( java . lang . reflect . Modifier . isStatic ( c . getModifiers ( ) ) ) ? null : c . getEnclosingClass ( ) ; } return classHierarchy ; }
org . junit . Assert . assertThat ( classHierarchy , is ( equalTo ( emptyStack ) ) )
testAllValid ( ) { java . util . Set < javax . validation . ConstraintViolation < org . kie . workbench . common . stunner . cm . definition . AdHocSubprocess > > violations = this . validator . validate ( tested ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return violations . isEmpty ( ) ; }
org . junit . Assert . assertTrue ( violations . isEmpty ( ) )
get_nullPrincipal ( ) { "<AssertPlaceHolder>" ; } get ( org . apache . shiro . subject . Subject ) { if ( subject != null ) { java . lang . Object principal = subject . getPrincipal ( ) ; if ( principal != null ) { return principal . toString ( ) ; } } return org . sonatype . nexus . security . UserIdHelper . UNKNOWN ; }
org . junit . Assert . assertThat ( org . sonatype . nexus . security . UserIdHelper . get ( subject ( null ) ) , org . hamcrest . Matchers . is ( org . sonatype . nexus . security . UserIdHelper . UNKNOWN ) )
testBRBY9901Normaal ( ) { final nl . bzk . brp . model . bijhouding . BijhoudingsBericht simplegGeboorteBericht = maakSimpleInschrijvingBericht2 ( ) ; nl . bzk . brp . bijhouding . business . util . BerichtAdministratieUtil . verrijktBerichtMetIdentificeerbaarObjectIndex ( simplegGeboorteBericht ) ; final java . util . List < nl . bzk . brp . model . basis . BerichtIdentificeerbaar > berichtenDieDeRegelOvertreden = bedrijfsregel . voerRegelUit ( simplegGeboorteBericht ) ; "<AssertPlaceHolder>" ; } size ( ) { return elementen . size ( ) ; }
org . junit . Assert . assertEquals ( 0 , berichtenDieDeRegelOvertreden . size ( ) )
clean ( ) { org . springframework . context . annotation . AnnotationConfigApplicationContext context = new org . springframework . context . annotation . AnnotationConfigApplicationContext ( ) ; context . register ( org . springframework . issues . ReproTests . MainConfiguration . class ) ; context . refresh ( ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertNotNull ( context )
givenCustomDao_whenSave_thenOk ( ) { com . baeldung . ormlite . Library library = new com . baeldung . ormlite . Library ( ) ; library . setName ( "My<sp>Library" ) ; com . baeldung . ormlite . LibraryDao customLibraryDao = com . j256 . ormlite . dao . DaoManager . createDao ( com . baeldung . ormlite . ORMLiteIntegrationTest . connectionSource , com . baeldung . ormlite . Library . class ) ; customLibraryDao . create ( library ) ; "<AssertPlaceHolder>" ; } findByName ( java . lang . String ) { return super . queryForEq ( "name" , name ) ; }
org . junit . Assert . assertEquals ( 1 , customLibraryDao . findByName ( "My<sp>Library" ) . size ( ) )
aclArcReaderTest ( ) { org . apache . uima . collection . CollectionReaderDescription reader = createReaderDescription ( de . tudarmstadt . ukp . dkpro . core . io . aclanthology . AclAnthologyReader . class , ResourceCollectionReaderBase . PARAM_SOURCE_LOCATION , "src/test/resources/acl/" , ResourceCollectionReaderBase . PARAM_PATTERNS , "[+]**/*.txt" ) ; int i = 0 ; for ( org . apache . uima . jcas . JCas jcas : new org . apache . uima . fit . pipeline . JCasIterable ( reader ) ) { de . tudarmstadt . ukp . dkpro . core . api . metadata . type . DocumentMetaData md = de . tudarmstadt . ukp . dkpro . core . api . metadata . type . DocumentMetaData . get ( jcas ) ; System . out . println ( md . getDocumentUri ( ) ) ; if ( i < 2 ) { } i ++ ; } "<AssertPlaceHolder>" ; } getDocumentUri ( ) { return documentUri ; }
org . junit . Assert . assertEquals ( 10 , i )
shouldHaveTypeReturnedFromImplementationClass ( ) { for ( fr . xephi . authme . data . limbo . persistence . LimboPersistenceType persistenceType : fr . xephi . authme . data . limbo . persistence . LimboPersistenceType . values ( ) ) { fr . xephi . authme . data . limbo . persistence . LimboPersistenceHandler implementationMock = mock ( persistenceType . getImplementationClass ( ) ) ; given ( implementationMock . getType ( ) ) . willCallRealMethod ( ) ; fr . xephi . authme . data . limbo . persistence . LimboPersistenceType returnedType = implementationMock . getType ( ) ; "<AssertPlaceHolder>" ; } } getType ( ) { return LimboPersistenceType . DISABLED ; }
org . junit . Assert . assertThat ( returnedType , org . hamcrest . Matchers . equalTo ( persistenceType ) )
shouldEchoServerSendTextFrameWithPayloadFragmentedEvenWhenNotUTF8Aligned ( ) { org . kaazing . netx . URLConnectionHelper helper = org . kaazing . netx . URLConnectionHelper . newInstance ( ) ; java . net . URI location = java . net . URI . create ( "ws://localhost:8080/path" ) ; org . kaazing . netx . ws . WsURLConnection connection = ( ( org . kaazing . netx . ws . WsURLConnection ) ( helper . openConnection ( location ) ) ) ; org . kaazing . netx . ws . MessageReader messageReader = connection . getMessageReader ( ) ; org . kaazing . netx . ws . MessageWriter messageWriter = connection . getMessageWriter ( ) ; org . kaazing . netx . ws . MessageType type = null ; char [ ] charBuf = new char [ 125 ] ; int charsRead = 0 ; int count = 0 ; if ( ( type = messageReader . next ( ) ) != ( org . kaazing . netx . ws . MessageType . EOS ) ) { assert messageReader . streaming ( ) ; switch ( type ) { case org . kaazing . netx . ws . MessageType . TEXT : java . io . Reader reader = messageReader . getReader ( ) ; int offset = 0 ; while ( ( count != ( - 1 ) ) && ( offset < ( charBuf . length ) ) ) { count = reader . read ( charBuf , offset , ( ( charBuf . length ) - offset ) ) ; if ( count != ( - 1 ) ) { charsRead += count ; offset += count ; } } break ; default : "<AssertPlaceHolder>" ; break ; } } char [ ] text = new char [ charsRead ] ; java . lang . System . arraycopy ( charBuf , 0 , text , 0 , charsRead ) ; messageWriter . writeFully ( text ) ; k3po . finish ( ) ; } read ( char [ ] , int , int ) { if ( ( ( offset < 0 ) || ( ( offset + length ) > ( cbuf . length ) ) ) || ( length < 0 ) ) { int len = offset + length ; throw new java . lang . IndexOutOfBoundsException ( java . lang . String . format ( org . kaazing . netx . ws . internal . io . WsReader . MSG_INDEX_OUT_OF_BOUNDS , offset , len , cbuf . length ) ) ; } if ( stateLock . tryLock ( ) ) { try { if ( ( applicationBufferReadOffset ) < ( applicationBufferWriteOffset ) ) { return copyCharsFromApplicationBuffer ( cbuf , offset , length ) ; } if ( ( applicationBufferReadOffset ) == ( applicationBufferWriteOffset ) ) { applicationBufferReadOffset = 0 ; applicationBufferWriteOffset = 0 ; } if ( ( networkBufferWriteOffset ) > ( networkBufferReadOffset ) ) { int leftOverBytes = ( networkBufferWriteOffset ) - ( networkBufferReadOffset ) ; java . lang . System . arraycopy ( networkBuffer , networkBufferReadOffset , networkBuffer , 0 , leftOverBytes ) ; networkBufferReadOffset = 0 ; networkBufferWriteOffset = leftOverBytes ; } while ( true ) { if ( ( networkBufferReadOffset ) == ( networkBufferWriteOffset ) ) { networkBufferReadOffset = 0 ; networkBufferWriteOffset = 0 ; int remainingLength = ( networkBuffer . length ) - ( networkBufferWriteOffset ) ; int bytesRead = 0 ; try { bytesRead = in . read ( networkBuffer , networkBufferWriteOffset , remainingLength ) ; if ( bytesRead == ( - 1 ) ) { return - 1 ; } } catch ( java . net . SocketException ex ) { return - 1 ; } networkBufferReadOffset = 0 ; networkBufferWriteOffset = bytesRead ; } int numBytes = ensureFrameMetadata ( ) ; if ( numBytes == ( - 1 ) ) { return - 1 ; } incomingFrame . wrap ( heapBuffer , networkBufferReadOffset ) ; int payloadLength = incomingFrame . payloadLength ( ) ; if ( ( ( incomingFrame . offset ( ) ) + payloadLength ) > ( networkBufferWriteOffset ) ) { if ( payloadLength > ( networkBuffer . length ) ) { int maxPayloadLength = connection . getMaxFramePayloadLength ( ) ; throw new java . io . IOException ( java . lang . String . format ( org . kaazing . netx . ws . internal . io . WsReader . MSG_MAX_MESSAGE_LENGTH , payloadLength , maxPayloadLength ) ) ; } else { if ( ( ( incomingFrame . offset ( ) ) + payloadLength ) > ( networkBuffer . length ) ) { int len = ( networkBufferWriteOffset ) - ( networkBufferReadOffset ) ; java . lang . System . arraycopy ( networkBuffer , networkBufferReadOffset , networkBuffer , 0 , len ) ; networkBufferReadOffset = 0 ; networkBufferWriteOffset = len ; } } int frameLength = connection . getFrameLength ( false , payloadLength ) ; int remainingBytes = ( ( networkBufferReadOffset ) + frameLength ) - ( networkBufferWriteOffset ) ; while ( remainingBytes > 0 ) { int bytesRead = in . read ( networkBuffer , networkBufferWriteOffset , remainingBytes ) ; if ( bytesRead == ( - 1 ) ) { return - 1 ; } remainingBytes -= bytesRead ; networkBufferWriteOffset += bytesRead ; } incomingFrame . wrap ( heapBuffer , networkBufferReadOffset ) ; } validateOpcode ( ) ; org . kaazing . netx . ws . internal . DefaultWebSocketContext context = connection . getIncomingContext ( ) ; org . kaazing . netx . ws . internal . io . IncomingSentinelExtension sentinel = ( ( org . kaazing . netx . ws . internal . io . IncomingSentinelExtension ) ( context . getSentinelExtension ( ) ) ) ; sentinel . setTerminalConsumer ( terminalFrameConsumer , incomingFrame . opcode ( ) ) ; connection . processIncomingFrame ( incomingFrameRO . wrap ( heapBufferRO , networkBufferReadOffset ) ) ; networkBufferReadOffset += incomingFrame . length ( ) ; if ( ! ( isControlFrame ( ) ) ) { break ; } } assert (
org . junit . Assert . assertSame ( org . kaazing . netx . ws . MessageType . TEXT , type )
whenGetPosts_thenListPostSizeGreaterThanZero ( ) { java . util . List < com . baeldung . cloud . openfeign . model . Post > posts = jsonPlaceHolderService . getPosts ( ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return ( total ) == 0 ; }
org . junit . Assert . assertFalse ( posts . isEmpty ( ) )
testHashCode ( ) { org . apache . olingo . server . core . deserializer . batch . HeaderField header = new org . apache . olingo . server . core . deserializer . batch . HeaderField ( "filed" , 0 ) ; "<AssertPlaceHolder>" ; } hashCode ( ) { final int prime = 31 ; int result = super . hashCode ( ) ; result = ( prime * result ) + ( ( entitySet ) == null ? 0 : entitySet . hashCode ( ) ) ; return result ; }
org . junit . Assert . assertNotNull ( header . hashCode ( ) )
updateClassifierInvalidClassifier ( ) { when ( sffClassifier . getAttachmentPointType ( ) ) . thenReturn ( null ) ; java . util . List < org . opendaylight . sfc . util . openflow . writer . FlowDetails > flowList = theUpdateProcessor . processClassifier ( sffClassifier , acl , newRsp ) ; "<AssertPlaceHolder>" ; } processClassifier ( org . opendaylight . yang . gen . v1 . urn . cisco . params . xml . ns . yang . sfc . scf . rev140701 . service . function . classifiers . service . function . classifier . SclServiceFunctionForwarder , org . opendaylight . yang . gen . v1 . urn . ietf . params . xml . ns . yang . ietf . access . control . list . rev160218 . access . lists . Acl , boolean ) { addClassifier = addClassifierScenario ; java . util . Optional < org . opendaylight . yang . gen . v1 . urn . cisco . params . xml . ns . yang . sfc . sff . rev140701 . service . function . forwarders . ServiceFunctionForwarder > sff = java . util . Optional . of ( new org . opendaylight . yang . gen . v1 . urn . cisco . params . xml . ns . yang . sfc . common . rev151017 . SffName ( theClassifier . getName ( ) ) ) . map ( SfcProviderServiceForwarderAPI :: readServiceFunctionForwarder ) ; java . util . Optional < java . lang . String > itfName = classifierHandler . getInterfaceNameFromClassifier ( theClassifier ) ; if ( ( ! ( sff . isPresent ( ) ) ) || ( ! ( itfName . isPresent ( ) ) ) ) { org . opendaylight . sfc . scfofrenderer . processors . OpenflowClassifierProcessor . LOG . error ( ( "createdServiceFunctionClassifier:<sp>" + "Cannot<sp>install<sp>ACL<sp>rules<sp>in<sp>classifier.<sp>SFF<sp>exists?<sp>{};<sp>Interface<sp>exists?<sp>{}" ) , sff . isPresent ( ) , itfName . isPresent ( ) ) ; return java . util . Collections . emptyList ( ) ; } if ( classifierHandler . usesLogicalInterfaces ( sff . get ( ) ) ) { if ( addClassifierScenario ) { org . opendaylight . sfc . scfofrenderer . logicalclassifier . ClassifierGeniusIntegration . performGeniusServiceBinding ( tx , itfName . get ( ) ) ; org . opendaylight . sfc . scfofrenderer . processors . OpenflowClassifierProcessor . LOG . info ( "processClassifier<sp>-<sp>Bound<sp>interface<sp>{}" , itfName . get ( ) ) ; } else { org . opendaylight . sfc . scfofrenderer . logicalclassifier . ClassifierGeniusIntegration . performGeniusServiceUnbinding ( tx , itfName . get ( ) ) ; org . opendaylight . sfc . scfofrenderer . processors . OpenflowClassifierProcessor . LOG . info ( "processClassifier<sp>-<sp>Unbound<sp>interface<sp>{}" , itfName . get ( ) ) ; } } return theAcl . getAccessListEntries ( ) . getAce ( ) . stream ( ) . map ( ( theAce ) -> processAce ( itfName , sff . get ( ) , theClassifier . getName ( ) , theAcl . getAclName ( ) , theAce ) ) . reduce ( new java . util . ArrayList ( ) , ( dstList , theList ) -> java . util . stream . Stream . concat ( dstList . stream ( ) , theList . stream ( ) ) . collect ( java . util . stream . Collectors . toList ( ) ) ) ; }
org . junit . Assert . assertTrue ( flowList . isEmpty ( ) )
testValidateTicketWithBadAudience ( ) { org . nuxeo . ecm . jwt . JWTAuthenticator auth = new org . nuxeo . ecm . jwt . JWTAuthenticator ( ) ; javax . servlet . http . HttpServletRequest request = mock ( javax . servlet . http . HttpServletRequest . class ) ; javax . servlet . http . HttpServletResponse response = mock ( javax . servlet . http . HttpServletResponse . class ) ; java . lang . String ticket = service . newBuilder ( ) . withClaim ( JWTClaims . CLAIM_AUDIENCE , "nxfile" ) . build ( ) ; when ( request . getHeader ( eq ( javax . ws . rs . core . HttpHeaders . AUTHORIZATION ) ) ) . thenReturn ( ( ( org . nuxeo . ecm . jwt . TestJWTAuthenticator . BEARER_SP ) + ticket ) ) ; when ( request . getServletPath ( ) ) . thenReturn ( "/api/v1" ) ; when ( request . getPathInfo ( ) ) . thenReturn ( "/foo/bar" ) ; org . nuxeo . ecm . platform . api . login . UserIdentificationInfo uii = auth . handleRetrieveIdentity ( request , response ) ; "<AssertPlaceHolder>" ; } handleRetrieveIdentity ( javax . servlet . http . HttpServletRequest , javax . servlet . http . HttpServletResponse ) { java . lang . String accessToken = getAccessToken ( request ) ; if ( accessToken == null ) { org . nuxeo . ecm . platform . oauth2 . NuxeoOAuth2Authenticator . log . trace ( "OAuth2<sp>token<sp>not<sp>found" ) ; return null ; } org . nuxeo . ecm . platform . oauth2 . tokens . NuxeoOAuth2Token token = org . nuxeo . runtime . transaction . TransactionHelper . runInTransaction ( ( ) -> tokenStore . getToken ( accessToken ) ) ; org . nuxeo . ecm . platform . oauth2 . clients . OAuth2ClientService clientService = org . nuxeo . runtime . api . Framework . getService ( org . nuxeo . ecm . platform . oauth2 . clients . OAuth2ClientService . class ) ; if ( token == null ) { org . nuxeo . ecm . platform . oauth2 . NuxeoOAuth2Authenticator . log . trace ( "OAuth2<sp>token<sp>unknown" ) ; return null ; } if ( token . isExpired ( ) ) { org . nuxeo . ecm . platform . oauth2 . NuxeoOAuth2Authenticator . log . trace ( "OAuth2<sp>token<sp>expired" ) ; return null ; } if ( ! ( clientService . hasClient ( token . getClientId ( ) ) ) ) { if ( org . nuxeo . ecm . platform . oauth2 . NuxeoOAuth2Authenticator . log . isTraceEnabled ( ) ) { org . nuxeo . ecm . platform . oauth2 . NuxeoOAuth2Authenticator . log . trace ( ( "OAuth2<sp>token<sp>for<sp>unknown<sp>client:<sp>" + ( token . getClientId ( ) ) ) ) ; } return null ; } java . lang . String username = token . getNuxeoLogin ( ) ; org . nuxeo . ecm . platform . oauth2 . NuxeoOAuth2Authenticator . log . trace ( ( "OAuth2<sp>token<sp>found<sp>for<sp>user:<sp>" + username ) ) ; return new org . nuxeo . ecm . platform . api . login . UserIdentificationInfo ( username , username ) ; }
org . junit . Assert . assertNull ( uii )
createBeginOutboundProcessing ( ) { gov . hhs . fha . nhinc . event . Event event = eventFactory . createBeginOutboundProcessing ( ) ; "<AssertPlaceHolder>" ; } createBeginOutboundProcessing ( ) { return new gov . hhs . fha . nhinc . event . initiator . BeginOutboundProcessingEvent ( ) ; }
org . junit . Assert . assertTrue ( ( event instanceof gov . hhs . fha . nhinc . event . initiator . BeginOutboundProcessingEvent ) )
testClearClientListenerOperations ( ) { org . eclipse . rap . rwt . internal . scripting . ClientListenerUtil . clientListenerAdded ( widget , SWT . Move , mock ( org . eclipse . rap . rwt . scripting . ClientListener . class ) ) ; org . eclipse . rap . rwt . internal . scripting . ClientListenerUtil . clearClientListenerOperations ( widget ) ; "<AssertPlaceHolder>" ; } getClientListenerOperations ( org . eclipse . swt . widgets . Widget ) { return ( ( java . util . List < org . eclipse . rap . rwt . internal . scripting . ClientListenerOperation > ) ( widget . getData ( org . eclipse . rap . rwt . internal . scripting . ClientListenerUtil . OPERATIONS ) ) ) ; }
org . junit . Assert . assertNull ( org . eclipse . rap . rwt . internal . scripting . ClientListenerUtil . getClientListenerOperations ( widget ) )
shouldGenerateCorrectDataUriForPng ( ) { final java . lang . String expected = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJIAAAAcCAMAAAC9HxYUAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAwBQTFRFyyst8fLy1CAg13t6sTM16nCI+Nvb/rFV2DY3/7TD9cvL09PT1BwcpKSk6ImI7aKipTY53FZX+uTk/zhfNjY2//z57Z6e/8eF88HBhIuR/+TF9OTyQUxUF7Od9v//4mtr/O7u8LGx3pGVu7u7sLCw3UtLzTI0vInBdXV15HJy/fHxcNDF1ikpZWVl+f79L8Wv7u3uyi4x/vXrlNHMenp6T865+Pj40ojI9PT14WVlmZmZzMzMrERI+f77PUhR8c/rt7e3mkZLiYmJkjk8u0JFQklR/pQW//rz/qc/sTw/VU1V7qioykVIx8rNlJOTkFhcra2t/vr5rS+eW0VMhISExC0u9tPT5Xt8iE1S4uLiukmq//DcfENIob26JSUl3qXW/sN9/fr+8K6u20JCgl1i65aW2tramk5SxMTE8Lm702Jh/IOa//PjXV1dQ0ND6erqakNJ4V5eExMT/rxs/9iqBwcH//7+//z8HBwcvb29S0xM/fb2SVFYjUhN++np6bq3/5Cma0tR/vz//+rS/962/v/7TE1Vqamp+enlo5W93d3dxZ6opmBkRk5W/+3Zb3d6ycnJf4CAVFRUzVlayktSUVRc/fb72HNtn5+fgz1Ce1NY+/7/bG1txjM25ubm/8yR/9Oc1TAx/P77QEtU/p8t0hMTskpN++HfaFBXuzAxdD1Dyzw/T0ZN+/v8xDc8goqPQk1VgExS++zs4JycyjY4yCgr/9HbdX2D/f3+19fX0Cor1iwtVmBov0VHPklRPkpSP0tTQk1WPklSP0pSP0pT4uPli5GXdbG75OXj2tvcz9LU/sLOvkhJg5O0zGtu0mdw88zF31Vhr1NWuFRV4YKEyMbG6rGu/1V2vcHE/6O2kJec6u7s3+Dh9mOA4qClve7l5Kin6KOozkFF0E5PDg4OLy8w07LD9vb/4+Xm/+Tpf4aLsL7Qs7O0t7OxtEdJqmBk78m/s7i76Y+PwZ3LybfMvTk8qa6yRkxTZG1urq2pQU1VQk5WPUhQQ09XAAAA////r0OctQAAB/9JREFUeNrMlntcU+cZx08iIiMBgXGTUi4NREhPWA5SBgQoF2+EhoIIiDoqUG5VAqQCAcEqilg6WkFp0YAIaBEFuSgtlzZAYd26+4Xd7S5d3KVj62bH2KA7z973nFxOIP6xv9bvH0k+7y9vzjfP+5z3PcR/PncQ/28BxZX2Ryq1lCfaDAwMOB0+x81f++bXNvDBLzhfaP/RRSM/rOOM/5MH6xlSvrNRqX7n6HqlNZaWywRJBjo7O/eQpNO5uTUjfwRBKkNTIefHTfFa+7vJEj8Wif+bdabxt8EaS2vruXlPfEdhOWRQSh8gA/P88Kwqz2By6rApjxBo9GoMnWJNqf1df0lWMEuWxNPstI1r8qcvnDp69NS3JKBcb9SSJBb3xFtTKp/qSTb/QonddKIx5wXoNQikFGVFqf3b/icChUI+X4hehIGSEpMTR+mtUx9+uHnz5p9+8dRGpVHqXuDtrtOWSnNzc2vpRL4t91/5+ZKX51h4S2os9ECaElZaGtTRzH7BEOIaBQpJko/WnOTz+fl+nm+2sJFZ6edHv/LUU19C7JCBcs4Sxc7xi57fJZLOcQeJkZGRlYweW8s1r44ky1dHMFhJ75rKu9+UkLC/1FVTW4xzJhpBNZIEIh3SjnSsdq7wJYWByKnOG2dIaU/3Hgg99NYrT3795e3bP/3zk48/vkO5NmJBPEX9Fl66Ix7lDhKrq6uXSf/1fSjJH1hlQEr6zqHmUg2zcEOiNqalmAjV6ASuEWl3smAr+Nr7oXLlj3n+tQ6HuEq7u49d63/lO58+h/jywYPbd/xauWrBza7xyDRo2EQtKzijSGmFcE4DaBbJ8Ivc4JSMysQqVUqhRqPX6Lm9xETRyWPIiO9oWwH+7kjJhcROJ0ueNSid6fbYcuz3Lz89wUypem7fvqctlVqiqdslDv9asr9ExbdwlLy9y5kiqWgRSGmadpWxS2fn5I1BVbrKe4D6yUIJJ31Jfr64j/zBF/KwUj9SIoWRaZ/gdBuEbjm09+wf/vG6adJjB/cpvbmMiscfplTS+r9spcSnzcNIyWlaAs0qmhZF0a4iKS0FQHYQTKwwSk0qqEFGG5W8k1wiUSMJ8yAY8vDC2WIlfoXfV1mlV3df737xGFS5mbfKx5SrHCPF8vjv+mvpSvq1sYvjSS1cpQFnkNO0mhYl0AkgolXoXRoFeWQ6q1QLxVaVZjlK/laU3Dy84Phej2t7OPO4VZotoqi70IkW5n34jZga5SoRwSDKEaGFa2aq1BSlol2DwJ4sZ5RScyLCVXpW6UJKSlRUVMfVjVVyh0h7W76FEnhtefHa2eOh8Agl1NsvnAcHmq78MUjemFpWmJT6+pCSjO2lBKTcBuzCIaU+BGrvBGh21auxUqc6R63Xo1rixFylxSrbTMiUZBqrhNNtcGa3h9eRLV4WN7Kyz8hCXTRx+yWAQjXuXu3fPqLivQ0RUsrwBba9RUyVggDwzedJls8wSnqNA4QnuFYipaHiVo1ao15ilPpMSn5VzPUy0WbJUTpyHXCljrhZVeq7Ih5/Y48WIlS0dKjBJ22RunfaqDQ7a5NvUGqjm0BGq9nZBeTgLAIrqYOyAQT7S0tVmsoHbeqcMsCJuUoG7IUP8xglHA67Xe/Gg43HPc5wlGaNKJaJZ+zBRwtBaMNL8/GxvTQVvcJGSCmRtGWVVIwSzc6uyJhllfAGkFPqMBmmyXGVOsiC6Fp4hJIjuJiUtoXufZUdPuThZUWpiMq42zAR0gsdlcXQGOIDv+oSj86zSgsL6WQBq5TALFwbM9llOnEBYzh29Xp9Ci8CL1CAKgAAJ302Y3hfMitVQVUFXxh54hOcDleb7rTqs2eMi6dcYJm5eY+4eF6b69YL8tL7ENKQqx37HnVHwYTE/Py8jZ2Ebe8g1N4qdqvMmhqcx/Amc6w8nDBRUYFLPp8Umh8h0nzRyeuS/LwOhcPcrj52qMqgNM+yEk10/QR8ctPcgHchfGKooWECSm5T8UxIzMzMpJO+hrmmA8WTTJxh4EG2aEkUJ4pbyuZcg82Kkv3y+fxg81ktROdJXr0OZ8NWH+GU7MR53Nuh4OMTA7+U5rSGN8bExGhzNxFdp3GKlWYSyYeWU23tBnYZlSYvQATaJYZkzUvhZWVXa8qKJw1KM0XuElSnZJPSjXy/vANsNAzZUCgHAbovwuW8bJ5MIOcJjEqKncRH3298PVcbA0s0rS+EXuQEmZemo1fmkdJ7iFgncjGNY+RplzH4HgtPnpL6wf6AlNSOsNIgh7CwKFWpqwMYQl3RVnTy8h0NyyLxdfE/YIiGQQ7FgrKaQiiWN8nl2dkgL6wJVzLZrnqKekIbkpvboIXCB3StDKomtCE+2rtd4sMoJnSY+UQy0NMo5JJFDgzqDPDiUqPCOsMcWvcHSSc7VKogTasqFYyprsj9ROCNG879xueHA8ZgGFIFNXECuRzkcnlNjaAmG70LlEyGetu5vzGmsaqxtxEm//2NRkxvTOP5F3qWFTodq6Sbv5VB5j/0z8z0dI+cnkrcZbpmhAydIM3FqXFLF1KkCSlRYa1NnQFmJeQ0lhUcWVC9zkj3sdVe+hmOZg5QYudNRhYdF40fs35gJ643Kel0uy7bkAwZiYOx5kv+3dov39dxnApOurj022IK6mdMM9vLrMybeJvJrlBi8bg1KDGF/hQRa2Yw/dat9MHY/5FnTTzPHa77+P0NvMMknynidz6KeEVsLPHZ547/CjAAc0REMRZ4hdUAAAAASUVORK5CYII=" ; final java . lang . String actual = dataUriGenerator . generateDataURI ( getInputStream ( "dataUri.png" ) , "dataUri.png" ) ; "<AssertPlaceHolder>" ; } getInputStream ( java . lang . String ) { return this . getClass ( ) . getClassLoader ( ) . getResourceAsStream ( ( ( ( packagePath ) + "/" ) + filename ) ) ; }
org . junit . Assert . assertEquals ( expected , actual )
testOpenRegionReplica ( ) { org . apache . hadoop . hbase . regionserver . TestRegionServerNoMaster . openRegion ( org . apache . hadoop . hbase . regionserver . TestRegionReplicas . HTU , getRS ( ) , org . apache . hadoop . hbase . regionserver . TestRegionReplicas . hriSecondary ) ; try { org . apache . hadoop . hbase . regionserver . TestRegionReplicas . HTU . loadNumericRows ( org . apache . hadoop . hbase . regionserver . TestRegionReplicas . table , org . apache . hadoop . hbase . regionserver . TestRegionReplicas . f , 0 , 1000 ) ; "<AssertPlaceHolder>" ; } finally { org . apache . hadoop . hbase . regionserver . TestRegionReplicas . HTU . deleteNumericRows ( org . apache . hadoop . hbase . regionserver . TestRegionReplicas . table , org . apache . hadoop . hbase . regionserver . TestRegionReplicas . f , 0 , 1000 ) ; org . apache . hadoop . hbase . regionserver . TestRegionServerNoMaster . closeRegion ( org . apache . hadoop . hbase . regionserver . TestRegionReplicas . HTU , getRS ( ) , org . apache . hadoop . hbase . regionserver . TestRegionReplicas . hriSecondary ) ; } } countRows ( org . apache . hadoop . hbase . client . Table ) { return org . apache . hadoop . hbase . snapshot . MobSnapshotTestingUtils . countMobRows ( table ) ; }
org . junit . Assert . assertEquals ( 1000 , org . apache . hadoop . hbase . regionserver . TestRegionReplicas . HTU . countRows ( org . apache . hadoop . hbase . regionserver . TestRegionReplicas . table ) )
testTruncDateColumn_Default ( ) { java . lang . String sqlText = java . lang . String . format ( "select<sp>trunc(d)<sp>as<sp>\"truncd\",<sp>d,<sp>t,<sp>n<sp>from<sp>%s" , com . splicemachine . derby . impl . sql . execute . operations . TruncateFunctionIT . QUALIFIED_TABLE_NAME ) ; java . sql . ResultSet rs = com . splicemachine . derby . impl . sql . execute . operations . TruncateFunctionIT . spliceClassWatcher . executeQuery ( sqlText ) ; java . lang . String expected = "truncd<sp>|<sp>D<sp>|<sp>T<sp>|<sp>N<sp>|\n" + ( "--------------------------------------------------------------\n" + "1988-12-26<sp>|1988-12-26<sp>|2000-06-07<sp>17:12:30.0<sp>|12345.6789000<sp>|" ) ; "<AssertPlaceHolder>" ; rs . close ( ) ; } toStringUnsorted ( com . splicemachine . homeless . ResultSet ) { return com . splicemachine . homeless . TestUtils . FormattedResult . ResultFactory . convert ( "" , rs , false ) . toString ( ) . trim ( ) ; }
org . junit . Assert . assertEquals ( ( ( "\n" + sqlText ) + "\n" ) , expected , TestUtils . FormattedResult . ResultFactory . toStringUnsorted ( rs ) )