input
stringlengths
28
18.7k
output
stringlengths
39
1.69k
testClassFinderCanFindClassesInJars ( ) { long counter = org . apache . hadoop . hbase . TestClassFinder . testCounter . incrementAndGet ( ) ; org . apache . hadoop . hbase . TestClassFinder . FileAndPath c1 = org . apache . hadoop . hbase . TestClassFinder . compileTestClass ( counter , "" , "c1" ) ; org . apache . hadoop . hbase . TestClassFinder . FileAndPath c2 = org . apache . hadoop . hbase . TestClassFinder . compileTestClass ( counter , ".nested" , "c2" ) ; org . apache . hadoop . hbase . TestClassFinder . FileAndPath c3 = org . apache . hadoop . hbase . TestClassFinder . compileTestClass ( counter , "" , "c3" ) ; org . apache . hadoop . hbase . TestClassFinder . packageAndLoadJar ( c1 , c3 ) ; org . apache . hadoop . hbase . TestClassFinder . packageAndLoadJar ( c2 ) ; org . apache . hadoop . hbase . ClassFinder allClassesFinder = new org . apache . hadoop . hbase . ClassFinder ( ) ; java . util . Set < java . lang . Class < ? > > allClasses = allClassesFinder . findClasses ( org . apache . hadoop . hbase . TestClassFinder . makePackageName ( "" , counter ) , false ) ; "<AssertPlaceHolder>" ; } size ( ) { return 0 ; }
org . junit . Assert . assertEquals ( 3 , allClasses . size ( ) )
testCraftingCount ( ) { com . comphenix . xp . listeners . ExperienceItemListener listener = new com . comphenix . xp . listeners . ExperienceItemListener ( new com . comphenix . xp . MockDebugger ( ) , null , null , null ) ; org . bukkit . inventory . ItemStack store = null ; org . bukkit . inventory . ItemStack crafted = new org . bukkit . inventory . ItemStack ( org . bukkit . Material . IRON_INGOT , 2 ) ; int count = listener . getStorageCount ( store , crafted , true ) ; "<AssertPlaceHolder>" ; } getStorageCount ( org . bukkit . inventory . ItemStack , org . bukkit . inventory . ItemStack , boolean ) { boolean isAir = ( storage == null ) || ( ( storage . getType ( ) ) == ( org . bukkit . Material . AIR ) ) ; if ( addition == null ) return 0 ; else if ( storage == null ) return addition . getAmount ( ) ; else if ( ( ! isAir ) && ( ! ( hasSameItem ( storage , addition ) ) ) ) return 0 ; int sum = ( storage . getAmount ( ) ) + ( addition . getAmount ( ) ) ; int max = ( isAir ) ? addition . getMaxStackSize ( ) : storage . getMaxStackSize ( ) ; if ( sum > max ) { return allowPartial ? max - ( storage . getAmount ( ) ) : 0 ; } else { return addition . getAmount ( ) ; } }
org . junit . Assert . assertEquals ( 2 , count )
build_shouldNotInitVersionField ( ) { com . kiroule . example . springjpaunitils . domain . Book b = builder . build ( ) ; "<AssertPlaceHolder>" ; } getVersion ( ) { return version ; }
org . junit . Assert . assertNull ( b . getVersion ( ) )
stripTEHeadersExcludingTrailers ( ) { io . netty . handler . codec . http . HttpHeaders inHeaders = new io . netty . handler . codec . http . DefaultHttpHeaders ( ) ; inHeaders . add ( io . netty . handler . codec . http2 . TE , io . netty . handler . codec . http2 . GZIP ) ; inHeaders . add ( io . netty . handler . codec . http2 . TE , io . netty . handler . codec . http2 . TRAILERS ) ; io . netty . handler . codec . http2 . Http2Headers out = new io . netty . handler . codec . http2 . DefaultHttp2Headers ( ) ; io . netty . handler . codec . http2 . HttpConversionUtil . toHttp2Headers ( inHeaders , out ) ; "<AssertPlaceHolder>" ; } get ( java . lang . CharSequence ) { return get0 ( name ) ; }
org . junit . Assert . assertSame ( io . netty . handler . codec . http2 . TRAILERS , out . get ( io . netty . handler . codec . http2 . TE ) )
testHasValueThatOnNullValue ( ) { "<AssertPlaceHolder>" ; } hasValueThat ( org . hamcrest . Matcher ) { return new com . annimon . stream . test . hamcrest . OptionalLongMatcher . HasValueMatcher ( matcher ) ; }
org . junit . Assert . assertThat ( null , com . annimon . stream . test . hamcrest . OptionalLongMatcher . hasValueThat ( org . hamcrest . CoreMatchers . is ( 0L ) ) )
loadCatchesExceptionWhenPatientDoesNotHavePatientClass ( ) { doReturn ( null ) . when ( this . doc ) . getXObject ( Patient . CLASS_REFERENCE ) ; org . phenotips . data . PatientData < org . phenotips . data . PhenoTipsDate > result = this . component . load ( this . patient ) ; "<AssertPlaceHolder>" ; } load ( org . xwiki . bridge . DocumentModelBridge ) { try { return getEntityConstructor ( ) . newInstance ( document ) ; } catch ( java . lang . IllegalArgumentException | java . lang . reflect . InvocationTargetException ex ) { this . logger . info ( "Tried<sp>to<sp>load<sp>invalid<sp>entity<sp>of<sp>type<sp>[{}]<sp>from<sp>document<sp>[{}]" , getEntityXClassReference ( ) , ( document == null ? null : document . getDocumentReference ( ) ) ) ; } catch ( java . lang . InstantiationException | java . lang . IllegalAccessException ex ) { this . logger . error ( "Failed<sp>to<sp>instantiate<sp>primary<sp>entity<sp>of<sp>type<sp>[{}]<sp>from<sp>document<sp>[{}]:<sp>{}" , getEntityXClassReference ( ) , ( document == null ? null : document . getDocumentReference ( ) ) , ex . getMessage ( ) ) ; } return null ; }
org . junit . Assert . assertNull ( result )
whenCreateOfNullableOptional_thenOk ( ) { java . lang . String name = "John" ; java . util . Optional < java . lang . String > opt = java . util . Optional . ofNullable ( name ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( "John" , opt . get ( ) )
testJoinTableCNoAsm ( ) { final org . simpleflatmapper . jdbc . JdbcMapper < org . simpleflatmapper . test . beans . ProfessorC > mapper = noAsmJdbcMapperFactory . newMapper ( org . simpleflatmapper . test . beans . ProfessorC . class ) ; validateMapper ( mapper ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( ( ( ( "TestClass{" + "name='" ) + ( name ) ) + '\'' ) + ",<sp>id=" ) + ( id ) ) + '}' ; }
org . junit . Assert . assertNotNull ( mapper . toString ( ) )
testGetStaticLabel ( ) { System . out . println ( "getStaticLabel" ) ; kg . apc . jmeter . threads . UltimateThreadGroupGui instance = new kg . apc . jmeter . threads . UltimateThreadGroupGui ( ) ; java . lang . String result = instance . getStaticLabel ( ) ; "<AssertPlaceHolder>" ; } getStaticLabel ( ) { return kg . apc . jmeter . JMeterPluginsUtils . prefixLabel ( "Response<sp>Codes<sp>per<sp>Second" ) ; }
org . junit . Assert . assertTrue ( ( ( result . length ( ) ) > 0 ) )
testCollectionId ( ) { org . apache . sis . feature . builder . FeatureTypeBuilder sftb = new org . apache . sis . feature . builder . FeatureTypeBuilder ( ) ; sftb . setName ( "temp" ) ; sftb . addAttribute ( java . lang . String . class ) . setName ( "att1" ) ; org . opengis . feature . FeatureType ft = sftb . build ( ) ; org . geotoolkit . data . FeatureCollection col = org . geotoolkit . data . FeatureStoreUtilities . collection ( "myId" , ft ) ; "<AssertPlaceHolder>" ; } getIdentifier ( ) { return null ; }
org . junit . Assert . assertEquals ( "myId" , col . getIdentifier ( ) . toString ( ) )
floatSortedSet ( ) { java . util . SortedSet < java . lang . Float > value = new java . util . TreeSet < java . lang . Float > ( java . util . Arrays . asList ( 1.0F ) ) ; model . setMyFloatSortedSet ( value ) ; com . google . appengine . api . datastore . Entity entity = meta . modelToEntity ( model ) ; com . google . appengine . api . datastore . Key key = ds . put ( entity ) ; com . google . appengine . api . datastore . Entity entity2 = ds . get ( key ) ; org . slim3 . datastore . model . Hoge model2 = meta . entityToModel ( entity2 ) ; "<AssertPlaceHolder>" ; } getMyFloatSortedSet ( ) { return myFloatSortedSet ; }
org . junit . Assert . assertThat ( model2 . getMyFloatSortedSet ( ) , org . hamcrest . CoreMatchers . is ( value ) )
equals_shouldReturnFalseIfThisSupportedResourceIsNotEqualToGivenSearchConfigsSupportedResource ( ) { org . openmrs . module . webservices . rest . web . resource . api . SearchQuery searchQuery1 = new org . openmrs . module . webservices . rest . web . resource . api . SearchQuery . Builder ( "Enables<sp>to<sp>search<sp>by<sp>patient" ) . withRequiredParameters ( "patient" ) . build ( ) ; org . openmrs . module . webservices . rest . web . resource . api . SearchConfig searchConfig1 = new org . openmrs . module . webservices . rest . web . resource . api . SearchConfig ( "default" , "v1/order" , "1.8.*" , searchQuery1 ) ; org . openmrs . module . webservices . rest . web . resource . api . SearchQuery searchQuery2 = new org . openmrs . module . webservices . rest . web . resource . api . SearchQuery . Builder ( "Enables<sp>to<sp>search<sp>by<sp>patient" ) . withRequiredParameters ( "patient" ) . build ( ) ; org . openmrs . module . webservices . rest . web . resource . api . SearchConfig searchConfig2 = new org . openmrs . module . webservices . rest . web . resource . api . SearchConfig ( "default" , "v2/order" , "1.8.*" , searchQuery2 ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == obj ) { return true ; } if ( ! ( obj instanceof org . openmrs . module . webservices . rest . web . resource . api . SearchQuery ) ) { return false ; } org . openmrs . module . webservices . rest . web . resource . api . SearchQuery other = ( ( org . openmrs . module . webservices . rest . web . resource . api . SearchQuery ) ( obj ) ) ; if ( ( optionalParameters ) == null ) { if ( ( other . optionalParameters ) != null ) return false ; } else if ( ! ( optionalParameters . equals ( other . optionalParameters ) ) ) return false ; if ( ( requiredParameters ) == null ) { if ( ( other . requiredParameters ) != null ) return false ; } else if ( ! ( requiredParameters . equals ( other . requiredParameters ) ) ) return false ; return true ; }
org . junit . Assert . assertFalse ( searchConfig1 . equals ( searchConfig2 ) )
retainOrderIfSupportedByMap ( ) { java . util . Map < java . lang . String , java . lang . String > params = com . google . common . collect . ImmutableMap . of ( "a" , "1" , "b" , "2" ) ; org . urllib . Query query = org . urllib . internal . Queries . create ( params ) ; "<AssertPlaceHolder>" ; } create ( java . lang . String , java . lang . String ) { return new org . urllib . internal . AutoValue_Queries_ImmutableKeyValue ( key , org . urllib . internal . Strings . nullToEmpty ( value ) ) ; }
org . junit . Assert . assertEquals ( com . google . common . collect . ImmutableList . of ( org . urllib . internal . Queries . create ( "a" , "1" ) , org . urllib . internal . Queries . create ( "b" , "2" ) ) , query . params ( ) )
testDetermineScriptWithResourceBundleUnavailable ( ) { org . asteriskjava . fastagi . AgiRequest request ; request = new org . asteriskjava . fastagi . SimpleAgiRequest ( ) ; mappingStrategy . setResourceBundleName ( "net.sf.asterisk.fastagi.unavailable" ) ; "<AssertPlaceHolder>" ; } determineScript ( org . asteriskjava . fastagi . AgiRequest ) { org . asteriskjava . fastagi . AgiScript script ; if ( shareInstances ) { script = instances . get ( request . getScript ( ) ) ; if ( script != null ) { return script ; } } script = createAgiScriptInstance ( request . getScript ( ) ) ; if ( script == null ) { return null ; } if ( shareInstances ) { instances . put ( request . getScript ( ) , script ) ; } return script ; }
org . junit . Assert . assertNull ( mappingStrategy . determineScript ( request ) )
testGetStoreStorage ( ) { com . github . tobato . fastdfs . service . TrackerClientTest . LOGGER . debug ( "testGetStoreStorage.." ) ; com . github . tobato . fastdfs . domain . fdfs . StorageNode client = trackerClient . getStoreStorage ( ) ; "<AssertPlaceHolder>" ; com . github . tobato . fastdfs . service . TrackerClientTest . LOGGER . debug ( "result={}" , client ) ; } getInetSocketAddress ( ) { return new java . net . InetSocketAddress ( ip , port ) ; }
org . junit . Assert . assertNotNull ( client . getInetSocketAddress ( ) )
intersects ( ) { org . roaringbitmap . buffer . MappeableContainer ac1 = new org . roaringbitmap . buffer . MappeableArrayContainer ( ) ; ac1 = ac1 . add ( 10 , 20 ) ; org . roaringbitmap . buffer . MappeableContainer ac2 = new org . roaringbitmap . buffer . MappeableArrayContainer ( ) ; ac2 = ac2 . add ( 15 , 25 ) ; "<AssertPlaceHolder>" ; } intersects ( org . roaringbitmap . buffer . MappeableRunContainer ) { return x . intersects ( this ) ; }
org . junit . Assert . assertTrue ( ac1 . intersects ( ac2 ) )
testCacheManager ( ) { org . infinispan . configuration . global . GlobalConfigurationBuilder gcb = new org . infinispan . configuration . global . GlobalConfigurationBuilder ( ) ; org . infinispan . configuration . cache . ConfigurationBuilder builder = new org . infinispan . configuration . cache . ConfigurationBuilder ( ) ; builder . persistence ( ) . addStore ( org . infinispan . persistence . jpa . configuration . JpaStoreConfigurationBuilder . class ) . persistenceUnitName ( "org.infinispan.persistence.jpa" ) . entityClass ( org . infinispan . test . integration . as . KeyValueEntity . class ) ; cm = new org . infinispan . manager . DefaultCacheManager ( gcb . build ( ) , builder . build ( ) ) ; org . infinispan . Cache < java . lang . String , org . infinispan . test . integration . as . KeyValueEntity > cache = cm . getCache ( ) ; org . infinispan . test . integration . as . KeyValueEntity entity = new org . infinispan . test . integration . as . KeyValueEntity ( "a" , "a" ) ; cache . put ( entity . getK ( ) , entity ) ; "<AssertPlaceHolder>" ; } get ( java . lang . Object ) { boolean statisticsEnabled = statsCollector . getStatisticsEnabled ( ) ; long start = 0 ; if ( statisticsEnabled ) { start = timeService . time ( ) ; } V value = super . get ( key ) ; if ( statisticsEnabled ) { long end = timeService . time ( ) ; if ( value == null ) { statsCollector . recordMisses ( 1 , ( end - start ) ) ; } else { statsCollector . recordHits ( 1 , ( end - start ) ) ; } } return value ; }
org . junit . Assert . assertEquals ( "a" , cache . get ( entity . getK ( ) ) . getValue ( ) )
testSerializeNullValue ( ) { org . axonframework . serialization . SerializedObject < byte [ ] > serialized = testSubject . serialize ( null , byte [ ] . class ) ; java . lang . String deserialized = testSubject . deserialize ( serialized ) ; "<AssertPlaceHolder>" ; } deserialize ( org . axonframework . serialization . SerializedObject ) { try { if ( org . axonframework . serialization . SerializedType . emptyType ( ) . equals ( serializedObject . getType ( ) ) ) { return null ; } java . lang . Class < ? > type = classForType ( serializedObject . getType ( ) ) ; if ( org . axonframework . serialization . UnknownSerializedType . class . isAssignableFrom ( type ) ) { return ( ( T ) ( new org . axonframework . serialization . UnknownSerializedType ( this , serializedObject ) ) ) ; } if ( com . fasterxml . jackson . databind . JsonNode . class . equals ( serializedObject . getContentType ( ) ) ) { return getReader ( type ) . readValue ( ( ( com . fasterxml . jackson . databind . JsonNode ) ( serializedObject . getData ( ) ) ) ) ; } org . axonframework . serialization . SerializedObject < byte [ ] > byteSerialized = converter . convert ( serializedObject , byte [ ] . class ) ; return getReader ( type ) . readValue ( byteSerialized . getData ( ) ) ; } catch ( java . io . IOException e ) { throw new org . axonframework . serialization . SerializationException ( "Error<sp>while<sp>deserializing<sp>object" , e ) ; } }
org . junit . Assert . assertNull ( deserialized )
testOneValueIndexInTxLookup ( ) { com . orientechnologies . orient . core . db . document . ODatabaseDocumentTx db = new com . orientechnologies . orient . core . db . document . ODatabaseDocumentTx ( "remote:localhost/test" ) ; db . open ( "admin" , "admin" ) ; com . orientechnologies . orient . core . metadata . schema . OClass clazz = db . getMetadata ( ) . getSchema ( ) . createClass ( "TestIndex" ) ; clazz . createProperty ( "test" , OType . STRING ) . createIndex ( OClass . INDEX_TYPE . NOTUNIQUE ) ; db . begin ( ) ; com . orientechnologies . orient . core . record . impl . ODocument doc = new com . orientechnologies . orient . core . record . impl . ODocument ( "TestIndex" ) ; doc . field ( "test" , "testKey" ) ; db . save ( doc ) ; com . orientechnologies . orient . core . index . OIndex < java . util . Collection < com . orientechnologies . orient . core . db . record . OIdentifiable > > idx = ( ( com . orientechnologies . orient . core . index . OIndex < java . util . Collection < com . orientechnologies . orient . core . db . record . OIdentifiable > > ) ( db . getMetadata ( ) . getIndexManager ( ) . getIndex ( "TestIndex.test" ) ) ) ; java . util . Collection < com . orientechnologies . orient . core . db . record . OIdentifiable > res = idx . get ( "testKey" ) ; "<AssertPlaceHolder>" ; db . close ( ) ; } size ( ) { throw new java . lang . UnsupportedOperationException ( "Not<sp>implemented<sp>yet" ) ; }
org . junit . Assert . assertEquals ( 1 , res . size ( ) )
testFromStringMulti ( ) { net . neoremind . fountain . eventposition . GtIdSet gtIdSet = net . neoremind . fountain . eventposition . GtIdSet . buildFromString ( ( ( "31a25a80-eee5-11e4-9dfd-90a380967173:1-655" + ( StringPool . Symbol . COMMA ) ) + "3f149314-9cad-11e5-8b30-00259089db03:777-888" ) ) ; System . out . println ( gtIdSet ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ",<sp>age=" 2 + "id=" ) + ( id ) ) + ",<sp>studentId=" ) + ( studentId ) ) + ",<sp>age=" 1 ) + ( schoolId ) ) + ",<sp>classId=" ) + ( classId ) ) + ",<sp>studentName='" ) + ( studentName ) ) + '\'' ) + ",<sp>age=" ) + ( age ) ) + ",<sp>gender=" ) + ( gender ) ) + ",<sp>age=" 0 ) + ( description ) ) + '\'' ) + ",<sp>birthDay=" ) + ( birthDay ) ) + ",<sp>onboardTime=" ) + ( onboardTime ) ) + ",<sp>updateTime=" ) + ( updateTime ) ) + ",<sp>ratio=" ) + ( ratio ) ) + '}' ; }
org . junit . Assert . assertThat ( gtIdSet . toString ( ) , org . hamcrest . core . Is . is ( ( ( "31a25a80-eee5-11e4-9dfd-90a380967173:1-655" + ( StringPool . Symbol . COMMA ) ) + "3f149314-9cad-11e5-8b30-00259089db03:777-888" ) ) )
testClearCacheAfterRowWrite ( ) { org . esa . beam . framework . gpf . main . CommandLineArgs lineArgs ; lineArgs = org . esa . beam . framework . gpf . main . CommandLineArgs . parseArgs ( "Reproject" , "-x" ) ; "<AssertPlaceHolder>" ; } isClearCacheAfterRowWrite ( ) { return clearCacheAfterRowWrite ; }
org . junit . Assert . assertEquals ( true , lineArgs . isClearCacheAfterRowWrite ( ) )
testExceptionCause ( ) { java . lang . Exception e1 = new java . lang . Exception ( "root" ) ; java . lang . Exception e2 = new java . lang . Exception ( "child1" , e1 ) ; java . lang . Exception e3 = new java . lang . Exception ( "child2" , e2 ) ; "<AssertPlaceHolder>" ; } getRootCause ( java . lang . Throwable ) { final java . util . List < java . lang . Throwable > list = org . nuxeo . common . utils . ExceptionUtils . getThrowableList ( throwable ) ; return ( list . size ( ) ) < 2 ? null : list . get ( ( ( list . size ( ) ) - 1 ) ) ; }
org . junit . Assert . assertEquals ( "root" , org . nuxeo . common . utils . ExceptionUtils . getRootCause ( e3 ) . getMessage ( ) )
testUnitFollowedByOutside ( ) { java . lang . String outcome = opennlp . tools . namefind . BilouNameFinderSequenceValidatorTest . OTHER ; java . lang . String [ ] inputSequence = new java . lang . String [ ] { "TypeA" , "something" , "something" } ; java . lang . String [ ] outcomesSequence = new java . lang . String [ ] { opennlp . tools . namefind . BilouNameFinderSequenceValidatorTest . UNIT_A } ; "<AssertPlaceHolder>" ; } validSequence ( int , java . lang . String [ ] , java . lang . String [ ] , java . lang . String ) { if ( outcome . endsWith ( BioCodec . CONTINUE ) ) { int li = ( outcomesSequence . length ) - 1 ; if ( li == ( - 1 ) ) { return false ; } else if ( outcomesSequence [ li ] . endsWith ( BioCodec . OTHER ) ) { return false ; } else if ( ( outcomesSequence [ li ] . endsWith ( BioCodec . CONTINUE ) ) || ( outcomesSequence [ li ] . endsWith ( BioCodec . START ) ) ) { java . lang . String previousNameType = opennlp . tools . namefind . NameFinderME . extractNameType ( outcomesSequence [ li ] ) ; java . lang . String nameType = opennlp . tools . namefind . NameFinderME . extractNameType ( outcome ) ; if ( ( previousNameType != null ) || ( nameType != null ) ) { if ( nameType != null ) { if ( nameType . equals ( previousNameType ) ) { return true ; } } return false ; } } } return true ; }
org . junit . Assert . assertTrue ( opennlp . tools . namefind . BilouNameFinderSequenceValidatorTest . validator . validSequence ( 1 , inputSequence , outcomesSequence , outcome ) )
test_remote_uncheckedApplicationException ( ) { try { remote . uncheckedApplicationException ( ) ; org . junit . Assert . fail ( "No<sp>exception<sp>thrown." ) ; } catch ( com . martinandersson . javaee . ejb . exceptions . CustomApplicationException e ) { "<AssertPlaceHolder>" ; } } uncheckedApplicationException ( ) { throw new com . martinandersson . javaee . ejb . exceptions . CustomApplicationException ( "123456" ) ; }
org . junit . Assert . assertEquals ( "123456" , e . getMessage ( ) )
testGetPolicyGroups_exceptionInQuery_assertException ( ) { final javax . persistence . EntityManager manager = mock ( javax . persistence . EntityManager . class ) ; doThrow ( new java . lang . RuntimeException ( "Just<sp>Passing<sp>Through" ) ) . when ( manager ) . createQuery ( ( ( java . lang . String ) ( any ( ) ) ) ) ; final org . nhindirect . config . store . dao . impl . CertPolicyDaoImpl dao = new org . nhindirect . config . store . dao . impl . CertPolicyDaoImpl ( ) ; dao . setEntityManager ( manager ) ; boolean exceptionOccured = false ; try { dao . getPolicyGroupDomainReltns ( ) ; } catch ( org . nhindirect . config . store . ConfigurationStoreException ex ) { exceptionOccured = true ; } "<AssertPlaceHolder>" ; }
org . junit . Assert . assertTrue ( exceptionOccured )
shouldAddPropertyToMapWhenAddingProperty ( ) { final uk . gov . gchq . gaffer . data . element . ElementValueLoader elementLoader = mock ( uk . gov . gchq . gaffer . data . element . ElementValueLoader . class ) ; final uk . gov . gchq . gaffer . data . element . Properties properties = new uk . gov . gchq . gaffer . data . element . Properties ( ) ; final java . lang . String propertyName = "property<sp>name" ; final java . lang . String propertyValue = "property<sp>value" ; final uk . gov . gchq . gaffer . data . element . LazyProperties lazyProperties = new uk . gov . gchq . gaffer . data . element . LazyProperties ( properties , elementLoader ) ; given ( elementLoader . getProperty ( propertyName , lazyProperties ) ) . willReturn ( propertyValue ) ; lazyProperties . put ( propertyName , propertyValue ) ; verify ( elementLoader , never ( ) ) . getProperty ( propertyName , lazyProperties ) ; "<AssertPlaceHolder>" ; } get ( K ) { return multiMap . get ( key ) ; }
org . junit . Assert . assertEquals ( propertyValue , properties . get ( propertyName ) )
testFloat64Array ( ) { com . eclipsesource . v8 . V8Value result = ( ( com . eclipsesource . v8 . V8Value ) ( v8 . executeScript ( "var<sp>floats<sp>=<sp>new<sp>Float64Array();<sp>floats" ) ) ) ; "<AssertPlaceHolder>" ; result . close ( ) ; } executeScript ( java . lang . String ) { return executeScript ( script , null , 0 ) ; }
org . junit . Assert . assertNotNull ( result )
testGetTotalNumberOfRecords_whereClause ( ) { org . apache . hadoop . conf . Configuration conf = buildConfiguration ( ) ; conf . set ( JdbcStorageConfig . QUERY . getPropertyName ( ) , "select<sp>*<sp>from<sp>test_strategy<sp>where<sp>strategy_id<sp>=<sp>'5'" ) ; org . apache . hive . storage . jdbc . dao . DatabaseAccessor accessor = org . apache . hive . storage . jdbc . dao . DatabaseAccessorFactory . getAccessor ( conf ) ; int numRecords = accessor . getTotalNumberOfRecords ( conf ) ; "<AssertPlaceHolder>" ; } getTotalNumberOfRecords ( org . apache . hadoop . conf . Configuration ) { java . sql . Connection conn = null ; java . sql . PreparedStatement ps = null ; java . sql . ResultSet rs = null ; try { initializeDatabaseConnection ( conf ) ; java . lang . String sql = org . apache . hive . storage . jdbc . conf . JdbcStorageConfigManager . getQueryToExecute ( conf ) ; java . lang . String countQuery = ( "SELECT<sp>COUNT(*)<sp>FROM<sp>(" + sql ) + ")<sp>tmptable" ; org . apache . hive . storage . jdbc . dao . GenericJdbcDatabaseAccessor . LOGGER . info ( "Query<sp>to<sp>execute<sp>is<sp>[{}]" , countQuery ) ; conn = dbcpDataSource . getConnection ( ) ; ps = conn . prepareStatement ( countQuery ) ; rs = ps . executeQuery ( ) ; if ( rs . next ( ) ) { return rs . getInt ( 1 ) ; } else { org . apache . hive . storage . jdbc . dao . GenericJdbcDatabaseAccessor . LOGGER . warn ( "The<sp>count<sp>query<sp>did<sp>not<sp>return<sp>any<sp>results." , countQuery ) ; throw new org . apache . hive . storage . jdbc . exception . HiveJdbcDatabaseAccessException ( "Count<sp>query<sp>did<sp>not<sp>return<sp>any<sp>results." ) ; } } catch ( org . apache . hive . storage . jdbc . exception . HiveJdbcDatabaseAccessException he ) { throw he ; } catch ( java . lang . Exception e ) { org . apache . hive . storage . jdbc . dao . GenericJdbcDatabaseAccessor . LOGGER . error ( "Caught<sp>exception<sp>while<sp>trying<sp>to<sp>get<sp>the<sp>number<sp>of<sp>records" , e ) ; throw new org . apache . hive . storage . jdbc . exception . HiveJdbcDatabaseAccessException ( e ) ; } finally { cleanupResources ( conn , ps , rs ) ; } }
org . junit . Assert . assertThat ( numRecords , org . hamcrest . Matchers . is ( org . hamcrest . Matchers . equalTo ( 1 ) ) )
testDefaultRepositories ( ) { try { java . net . URL settingsXmlUrl = org . jboss . modules . maven . MavenSettingsTest . class . getResource ( "jboss-settings.xml" ) ; java . lang . System . setProperty ( "jboss.modules.settings.xml.url" , settingsXmlUrl . toExternalForm ( ) ) ; java . lang . Module module = moduleLoader . loadModule ( org . jboss . modules . MavenResourceTest . MODULE_ID2 ) ; java . net . URL url = module . getResource ( "org/jboss/resteasy/plugins/providers/jackson/ResteasyJacksonProvider.class" ) ; System . out . println ( url ) ; "<AssertPlaceHolder>" ; } finally { java . lang . System . clearProperty ( "jboss.modules.settings.xml.url" ) ; } } getResource ( java . lang . String ) { return null ; }
org . junit . Assert . assertNotNull ( url )
shouldMatchAGivenMetadata ( ) { final uk . gov . justice . services . messaging . Metadata testMetadata = defaultMetadataWithName ( uk . gov . justice . services . test . utils . core . matchers . JsonEnvelopeMetadataMatcherTest . EVENT_NAME ) . build ( ) ; final uk . gov . justice . services . messaging . Metadata expectedMetadata = defaultMetadataWithName ( uk . gov . justice . services . test . utils . core . matchers . JsonEnvelopeMetadataMatcherTest . EVENT_NAME ) . build ( ) ; "<AssertPlaceHolder>" ; } metadata ( ) { return new uk . gov . justice . services . test . utils . core . matchers . JsonEnvelopeMetadataMatcher ( ) ; }
org . junit . Assert . assertThat ( testMetadata , uk . gov . justice . services . test . utils . core . matchers . JsonEnvelopeMetadataMatcher . metadata ( ) . of ( expectedMetadata ) )
shouldReadSpecificLikeSlow ( ) { org . apache . avro . Schema . Parser parser = new org . apache . avro . Schema . Parser ( ) ; org . apache . avro . Schema oldRecordSchema = parser . parse ( this . getClass ( ) . getResourceAsStream ( "/schema/defaultsTestOld.avsc" ) ) ; org . apache . avro . generic . GenericData . Record oldRecord = new org . apache . avro . generic . GenericData . Record ( oldRecordSchema ) ; org . apache . avro . generic . GenericData . Record oldSubRecord = new org . apache . avro . generic . GenericData . Record ( oldRecordSchema . getField ( "oldSubRecord" ) . schema ( ) ) ; oldSubRecord . put ( "oldSubField" , "testValueOfSubField" ) ; oldSubRecord . put ( "fieldToBeRemoved" , 33 ) ; oldRecord . put ( "oldSubRecord" , oldSubRecord ) ; com . rtbhouse . utils . generated . avro . DefaultsTestRecord testRecordSlow = deserializeSpecificSlow ( com . rtbhouse . utils . generated . avro . DefaultsTestRecord . getClassSchema ( ) , oldRecordSchema , com . rtbhouse . utils . avro . FastSerdeTestsSupport . serializeGeneric ( oldRecord ) ) ; com . rtbhouse . utils . generated . avro . DefaultsTestRecord testRecordFast = deserializeSpecificFast ( com . rtbhouse . utils . generated . avro . DefaultsTestRecord . getClassSchema ( ) , oldRecordSchema , com . rtbhouse . utils . avro . FastSerdeTestsSupport . serializeGeneric ( oldRecord ) ) ; "<AssertPlaceHolder>" ; } serializeGeneric ( T extends org . apache . avro . generic . GenericContainer ) { return com . rtbhouse . utils . avro . FastSerdeTestsSupport . serializeGeneric ( data , data . getSchema ( ) ) ; }
org . junit . Assert . assertEquals ( testRecordSlow , testRecordFast )
testCARDINALITY_COMPARATOR ( ) { org . sagebionetworks . table . cluster . DatabaseColumnInfo one = new org . sagebionetworks . table . cluster . DatabaseColumnInfo ( ) ; one . setCardinality ( 1L ) ; org . sagebionetworks . table . cluster . DatabaseColumnInfo two = new org . sagebionetworks . table . cluster . DatabaseColumnInfo ( ) ; two . setCardinality ( 2L ) ; int compare = DatabaseColumnInfo . CARDINALITY_COMPARATOR . compare ( one , two ) ; "<AssertPlaceHolder>" ; } compare ( org . sagebionetworks . table . cluster . DatabaseColumnInfo , org . sagebionetworks . table . cluster . DatabaseColumnInfo ) { org . sagebionetworks . util . ValidateArgument . required ( one , "DatabaseColumnInfo" ) ; org . sagebionetworks . util . ValidateArgument . required ( one . getCardinality ( ) , "DatabaseColumnInfo.getCardinality()" ) ; org . sagebionetworks . util . ValidateArgument . required ( two , "DatabaseColumnInfo" ) ; org . sagebionetworks . util . ValidateArgument . required ( two . getCardinality ( ) , "DatabaseColumnInfo.getCardinality()" ) ; return java . lang . Long . compare ( one . cardinality , two . cardinality ) ; }
org . junit . Assert . assertEquals ( ( - 1 ) , compare )
fetchMethodStatistics ( ) { javax . json . JsonObject methodStatistics = this . cut . fetchMethodStatistics ( "lightfish" , "Configurator" , "getString-javax.enterprise.inject.spi.InjectionPoint" ) ; "<AssertPlaceHolder>" ; System . out . println ( ( "----<sp>" + methodStatistics ) ) ; } fetchMethodStatistics ( java . lang . String , java . lang . String , java . lang . String ) { javax . ws . rs . client . WebTarget target = client . target ( ( ( getUri ( ) ) + "{application}/{bean}/bean-methods/{method}" ) ) ; javax . ws . rs . core . Response response = target . resolveTemplate ( "application" , applicationName ) . resolveTemplate ( "bean" , ejbName ) . resolveTemplate ( "method" , methodName ) . request ( MediaType . APPLICATION_JSON ) . get ( javax . ws . rs . core . Response . class ) ; if ( ( response . getStatus ( ) ) == 404 ) { return null ; } javax . json . JsonObject rawStatistics = response . readEntity ( javax . json . JsonObject . class ) ; return preprocessEntity ( rawStatistics ) ; }
org . junit . Assert . assertNotNull ( methodStatistics )
testQuestionnaireResponse ( ) { org . hl7 . fhir . instance . model . QuestionnaireResponse qr = new org . hl7 . fhir . instance . model . QuestionnaireResponse ( ) ; qr . setStatus ( QuestionnaireResponseStatus . COMPLETED ) ; qr . getGroup ( ) . addGroup ( ) . addQuestion ( ) . setLinkId ( "foo" ) ; qr . getGroup ( ) . addQuestion ( ) . setLinkId ( "bar" ) ; ca . uhn . fhir . validation . FhirValidator val = org . hl7 . fhir . instance . hapi . validation . FhirInstanceValidatorDstu2Test . ourCtxHl7OrgDstu2 . newValidator ( ) ; val . registerValidatorModule ( org . hl7 . fhir . instance . hapi . validation . FhirInstanceValidatorDstu2Test . ourValidator ) ; ca . uhn . fhir . validation . ValidationResult result = val . validateWithResult ( qr ) ; java . lang . String encoded = org . hl7 . fhir . instance . hapi . validation . FhirInstanceValidatorDstu2Test . ourCtxHl7OrgDstu2 . newJsonParser ( ) . setPrettyPrint ( true ) . encodeResourceToString ( result . toOperationOutcome ( ) ) ; org . hl7 . fhir . instance . hapi . validation . FhirInstanceValidatorDstu2Test . ourLog . info ( encoded ) ; "<AssertPlaceHolder>" ; } isSuccessful ( ) { return myIsSuccessful ; }
org . junit . Assert . assertTrue ( result . isSuccessful ( ) )
testSerialization ( ) { org . jfree . chart . renderer . category . StandardBarPainter p1 = new org . jfree . chart . renderer . category . StandardBarPainter ( ) ; org . jfree . chart . renderer . category . StandardBarPainter p2 = ( ( org . jfree . chart . renderer . category . StandardBarPainter ) ( org . jfree . chart . TestUtils . serialised ( p1 ) ) ) ; "<AssertPlaceHolder>" ; } serialised ( java . lang . Object ) { java . lang . Object result = null ; java . io . ByteArrayOutputStream buffer = new java . io . ByteArrayOutputStream ( ) ; java . io . ObjectOutput out ; try { out = new java . io . ObjectOutputStream ( buffer ) ; out . writeObject ( original ) ; out . close ( ) ; java . io . ObjectInput in = new java . io . ObjectInputStream ( new java . io . ByteArrayInputStream ( buffer . toByteArray ( ) ) ) ; result = in . readObject ( ) ; in . close ( ) ; } catch ( java . io . IOException e ) { throw new java . lang . RuntimeException ( e ) ; } catch ( java . lang . ClassNotFoundException e ) { throw new java . lang . RuntimeException ( e ) ; } return result ; }
org . junit . Assert . assertEquals ( p1 , p2 )
return_false_if_answer_was_last_touched_today ( ) { final org . mamute . model . Question myQuestion = question . withTitle ( "question<sp>title" ) . withDescription ( "description" ) . build ( ) ; "<AssertPlaceHolder>" ; } isInactiveForOneMonth ( ) { return lastUpdatedAt . isBefore ( new org . joda . time . DateTime ( ) . minusMonths ( 1 ) ) ; }
org . junit . Assert . assertFalse ( myQuestion . isInactiveForOneMonth ( ) )
testNewInstance ( ) { be . e_contract . mycarenet . jaxws . sync . MyCarenetCareProviderSyncService service = be . e_contract . mycarenet . sync . MyCareNetSyncServiceFactory . newInstance ( ) ; "<AssertPlaceHolder>" ; } newInstance ( ) { java . net . URL wsdlLocation = be . e_contract . mycarenet . sync . MyCareNetSyncServiceFactory . class . getResource ( "/care-provider-sync.wsdl" ) ; javax . xml . namespace . QName serviceName = new javax . xml . namespace . QName ( "urn:be:cin:mycarenet:1.0:sync" , "MyCarenetCareProviderSyncService" ) ; be . e_contract . mycarenet . jaxws . sync . MyCarenetCareProviderSyncService service = new be . e_contract . mycarenet . jaxws . sync . MyCarenetCareProviderSyncService ( wsdlLocation , serviceName ) ; return service ; }
org . junit . Assert . assertNotNull ( service )
testTransformByScaleUndef ( ) { java . lang . String existingscale = "scale/humidex_fr.scale" ; java . lang . String source = "-" ; java . lang . String transformedResponse = processor . transform ( existingscale , source ) ; "<AssertPlaceHolder>" ; } transform ( java . lang . String , java . lang . String ) { if ( ( jsonPathExpression == null ) || ( source == null ) ) { throw new org . eclipse . smarthome . core . transform . TransformationException ( "the<sp>given<sp>parameters<sp>'JSonPath'<sp>and<sp>'source'<sp>must<sp>not<sp>be<sp>null" ) ; } logger . debug ( "about<sp>to<sp>transform<sp>'{}'<sp>by<sp>the<sp>function<sp>'{}'" , source , jsonPathExpression ) ; try { java . lang . Object transformationResult = com . jayway . jsonpath . JsonPath . read ( source , jsonPathExpression ) ; logger . debug ( "transformation<sp>resulted<sp>in<sp>'{}'" , transformationResult ) ; if ( transformationResult == null ) { return null ; } else if ( transformationResult instanceof java . util . List ) { return flattenList ( ( ( java . util . List < ? > ) ( transformationResult ) ) ) ; } else { return transformationResult . toString ( ) ; } } catch ( com . jayway . jsonpath . PathNotFoundException e ) { throw new org . eclipse . smarthome . core . transform . TransformationException ( ( ( ( ( "Invalid<sp>path<sp>'" + jsonPathExpression ) + "'<sp>in<sp>'" ) + source ) + "'" ) ) ; } catch ( com . jayway . jsonpath . InvalidPathException | com . jayway . jsonpath . InvalidJsonException e ) { throw new org . eclipse . smarthome . core . transform . TransformationException ( "An<sp>error<sp>occurred<sp>while<sp>transforming<sp>JSON<sp>expression." , e ) ; } }
org . junit . Assert . assertEquals ( "" , transformedResponse )
shouldNotGetDisabledGraphForAuthUserWhenNoIdsProvided ( ) { graphStorage . put ( a , disabledByDefaultAccess ) ; final java . util . Collection < uk . gov . gchq . gaffer . graph . Graph > allGraphs = graphStorage . get ( authUser , null ) ; "<AssertPlaceHolder>" ; } size ( ) { return map . size ( ) ; }
org . junit . Assert . assertEquals ( 0 , allGraphs . size ( ) )
givenPositiveValue_whenSetCacheExpiresHours_thenValueIsStored ( ) { final long validCacheExpiresHours = 1 ; config . setCacheExpiresHours ( validCacheExpiresHours ) ; "<AssertPlaceHolder>" ; } getCacheExpiresHours ( ) { return cacheExpiresHours ; }
org . junit . Assert . assertThat ( config . getCacheExpiresHours ( ) , org . hamcrest . CoreMatchers . equalTo ( validCacheExpiresHours ) )
test2502355_zoomOutRange ( ) { org . jfree . data . xy . DefaultXYDataset dataset = new org . jfree . data . xy . DefaultXYDataset ( ) ; org . jfree . chart . JFreeChart chart = org . jfree . chart . ChartFactory . createXYLineChart ( "TestChart" , "X" , "Y" , dataset , PlotOrientation . VERTICAL , false , false , false ) ; org . jfree . chart . plot . XYPlot plot = ( ( org . jfree . chart . plot . XYPlot ) ( chart . getPlot ( ) ) ) ; plot . setRangeAxis ( 1 , new org . jfree . chart . axis . NumberAxis ( "X2" ) ) ; org . jfree . chart . ChartPanel panel = new org . jfree . chart . ChartPanel ( chart ) ; chart . addChangeListener ( this ) ; this . chartChangeEvents . clear ( ) ; panel . zoomOutRange ( 1.0 , 2.0 ) ; "<AssertPlaceHolder>" ; } size ( ) { return this . tickUnits . size ( ) ; }
org . junit . Assert . assertEquals ( 1 , this . chartChangeEvents . size ( ) )
createLServer ( ) { java . util . HashMap < java . lang . String , java . lang . String > request = givenRequest ( org . oscm . app . ror . LPlatformClientTest . INSTANCENAME , org . oscm . app . ror . LPlatformClientTest . SERVERTYPE , org . oscm . app . ror . LPlatformClientTest . DISKIMAGEID , org . oscm . app . ror . LPlatformClientTest . CONTROLNETWORKID , org . oscm . app . ror . LPlatformClientTest . VMPOOL , org . oscm . app . ror . LPlatformClientTest . STORAGEPOOL , org . oscm . app . ror . LPlatformClientTest . COUNTCPU , org . oscm . app . ror . LPlatformClientTest . LPLATFORMID ) ; PrepareXMLConfiguration ( request , org . oscm . app . ror . LPlatformClientTest . LSERVERID ) ; java . lang . String result = lPlatformClient . createLServer ( org . oscm . app . ror . LPlatformClientTest . INSTANCENAME , org . oscm . app . ror . LPlatformClientTest . SERVERTYPE , org . oscm . app . ror . LPlatformClientTest . DISKIMAGEID , org . oscm . app . ror . LPlatformClientTest . CONTROLNETWORKID , org . oscm . app . ror . LPlatformClientTest . VMPOOL , org . oscm . app . ror . LPlatformClientTest . STORAGEPOOL , org . oscm . app . ror . LPlatformClientTest . COUNTCPU ) ; "<AssertPlaceHolder>" ; } createLServer ( java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String ) { java . util . List < java . lang . String > emptyParams = new java . util . ArrayList < java . lang . String > ( ) ; if ( isEmpty ( lplatformId ) ) { emptyParams . add ( LParameter . LPLATFORM_ID ) ; } if ( isEmpty ( instanceName ) ) { emptyParams . add ( LParameter . LSERVER_NAME ) ; } if ( ! ( emptyParams . isEmpty ( ) ) ) { throw new org . oscm . app . iaas . exceptions . MissingParameterException ( org . oscm . app . ror . data . LOperation . CREATE_LSERVER , emptyParams ) ; } java . util . HashMap < java . lang . String , java . lang . String > request = this . getRequestParameters ( ) ; request . put ( LParameter . ACTION , LOperation . CREATE_LSERVER ) ; request . put ( LParameter . LSERVER_NAME , instanceName ) ; request . put ( LParameter . LSERVER_TYPE , serverType ) ; request . put ( LParameter . DISKIMAGE_ID , diskImageId ) ; request . put ( LParameter . CONTROL_NETWORK_ID , controlNetworkId ) ; if ( vmPool != null ) { request . put ( LParameter . POOL , vmPool ) ; } else { request . put ( LParameter . POOL , "VMHostPool" ) ; } if ( ( storagePool != null ) && ( ( storagePool . trim ( ) . length ( ) ) > 0 ) ) { request . put ( LParameter . STORAGE_POOL , storagePool ) ; } else { request . put ( LParameter . STORAGE_POOL , "StoragePool" ) ; } if ( countCPU != null ) { request . put ( LParameter . CPU_NUMBER , countCPU ) ; } org . apache . commons . configuration . XMLConfiguration result = vdcClient . execute ( request ) ; return result . getString ( LParameter . LSERVER_ID ) ; }
org . junit . Assert . assertEquals ( result , org . oscm . app . ror . LPlatformClientTest . LSERVERID )
testCleansedRowResultsValidationCountsV2 ( ) { com . thinkbiganalytics . spark . datavalidator . CleansedRowResult cleansedRowResult1 = new com . thinkbiganalytics . spark . datavalidator . CleansedRowResult ( org . mockito . Mockito . mock ( org . apache . spark . sql . Row . class ) , new boolean [ ] { true , true , true , true , true } , true ) ; com . thinkbiganalytics . spark . datavalidator . CleansedRowResult cleansedRowResult2 = new com . thinkbiganalytics . spark . datavalidator . CleansedRowResult ( org . mockito . Mockito . mock ( org . apache . spark . sql . Row . class ) , new boolean [ ] { true , false , true , true , false } , false ) ; com . thinkbiganalytics . spark . datavalidator . CleansedRowResult cleansedRowResult3 = new com . thinkbiganalytics . spark . datavalidator . CleansedRowResult ( org . mockito . Mockito . mock ( org . apache . spark . sql . Row . class ) , new boolean [ ] { false , false , true , true , false } , false ) ; java . util . List < com . thinkbiganalytics . spark . datavalidator . CleansedRowResult > cleansedRowResultsList = java . util . Arrays . asList ( cleansedRowResult1 , cleansedRowResult1 , cleansedRowResult1 , cleansedRowResult1 , cleansedRowResult1 , cleansedRowResult1 , cleansedRowResult1 , cleansedRowResult2 , cleansedRowResult3 ) ; org . apache . spark . SparkConf conf = new org . apache . spark . SparkConf ( ) ; conf . setMaster ( "local[*]" ) ; conf . setAppName ( "Validator<sp>Test<sp>-<sp>Spark<sp>2" ) ; org . apache . spark . api . java . JavaSparkContext sc = new org . apache . spark . api . java . JavaSparkContext ( conf ) ; org . apache . spark . api . java . JavaRDD < com . thinkbiganalytics . spark . datavalidator . CleansedRowResult > inputRDD = sc . parallelize ( cleansedRowResultsList , 4 ) ; com . thinkbiganalytics . spark . datavalidator . StandardDataValidator validator = new com . thinkbiganalytics . spark . datavalidator . StandardDataValidator ( new com . thinkbiganalytics . spark . datavalidator . ValidatorStrategyV2 ( ) , org . mockito . Mockito . mock ( com . thinkbiganalytics . spark . SparkContextService . class ) ) ; long [ ] output = validator . cleansedRowResultsValidationCounts ( inputRDD , 5 ) ; long [ ] expectedOutput = new long [ ] { 1L , 2L , 0L , 0L , 2L , 7L , 2L } ; "<AssertPlaceHolder>" ; } cleansedRowResultsValidationCounts ( org . apache . spark . api . java . JavaRDD , int ) { org . apache . spark . api . java . JavaRDD < long [ ] > partitionCounts = validatorStrategy . getCleansedRowResultPartitionCounts ( cleansedRowResultJavaRDD , schemaLength ) ; if ( cleansedRowResultJavaRDD . isEmpty ( ) ) { long [ ] counts = new long [ schemaLength + 2 ] ; java . util . Arrays . fill ( counts , 0 ) ; return counts ; } return partitionCounts . reduce ( new com . thinkbiganalytics . spark . datavalidator . functions . SumPartitionLevelCounts ( ) ) ; }
org . junit . Assert . assertArrayEquals ( expectedOutput , output )
testGetPrompt ( ) { java . lang . String prompt = promptProvider . getPrompt ( ) ; "<AssertPlaceHolder>" ; } getPrompt ( ) { return "stratio-decision><sp>" ; }
org . junit . Assert . assertEquals ( "stratio-decision><sp>" , prompt )
testConstructor ( ) { new org . openhealthtools . mdht . uml . cda . operations . Informant12Operations ( ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertTrue ( true )
testSchedulingDelay ( ) { java . lang . String host = "127.0.0.1" ; org . apache . hadoop . yarn . server . resourcemanager . rmnode . RMNode node1 = org . apache . hadoop . yarn . server . resourcemanager . MockNodes . newNodeInfo ( 1 , org . apache . hadoop . yarn . util . resource . Resources . createResource ( 4096 , 4 ) , 1 , host ) ; org . apache . hadoop . yarn . server . resourcemanager . scheduler . event . NodeAddedSchedulerEvent nodeEvent1 = new org . apache . hadoop . yarn . server . resourcemanager . scheduler . event . NodeAddedSchedulerEvent ( node1 ) ; scheduler . handle ( nodeEvent1 ) ; org . apache . hadoop . yarn . server . resourcemanager . scheduler . event . NodeUpdateSchedulerEvent nodeUpdateEvent = new org . apache . hadoop . yarn . server . resourcemanager . scheduler . event . NodeUpdateSchedulerEvent ( node1 ) ; scheduler . handle ( nodeUpdateEvent ) ; org . apache . hadoop . yarn . api . records . ApplicationAttemptId appAttemptId = createAppAttemptId ( ( ( this . APP_ID ) ++ ) , ( ( this . ATTEMPT_ID ) ++ ) ) ; createMockRMApp ( appAttemptId ) ; scheduler . addApplication ( appAttemptId . getApplicationId ( ) , "queue11" , "user11" , false ) ; scheduler . addApplicationAttempt ( appAttemptId , false , false ) ; java . util . List < org . apache . hadoop . yarn . api . records . ResourceRequest > ask = new java . util . ArrayList ( ) ; ask . add ( createResourceRequest ( 1024 , 1 , ResourceRequest . ANY , 1 , 1 , true ) ) ; scheduler . allocate ( appAttemptId , ask , new java . util . ArrayList < org . apache . hadoop . yarn . api . records . ContainerId > ( ) , null , null , null , null ) ; org . apache . hadoop . yarn . server . resourcemanager . scheduler . fair . FSAppAttempt app = scheduler . getSchedulerApp ( appAttemptId ) ; mockClock . tickSec ( 1 ) ; while ( 1024 != ( app . getCurrentConsumption ( ) . getMemorySize ( ) ) ) { java . lang . Thread . sleep ( 100 ) ; } "<AssertPlaceHolder>" ; } getCurrentConsumption ( ) { return attemptResourceUsage . getUsed ( ) ; }
org . junit . Assert . assertEquals ( 1024 , app . getCurrentConsumption ( ) . getMemorySize ( ) )
convertPoint_NegativeCoordinates_ShouldConvert ( ) { java . lang . String wkt = "POINT(-12.2<sp>13)" ; java . lang . String geoJson = org . nlpcn . es4sql . spatial . WktToGeoJsonConverter . toGeoJson ( wkt ) ; java . lang . String expectedGeoJson = "{\"type\":\"Point\",<sp>\"coordinates\":<sp>[-12.2,13]}" ; "<AssertPlaceHolder>" ; } toGeoJson ( java . lang . String ) { wkt = wkt . toLowerCase ( ) ; int startOfCoordinates = wkt . indexOf ( "multilinestring" 2 ) ; if ( startOfCoordinates == ( - 1 ) ) throw new java . lang . IllegalArgumentException ( "multilinestring" 4 ) ; java . lang . String wktType = wkt . substring ( 0 , startOfCoordinates ) . trim ( ) ; wkt = wkt . substring ( startOfCoordinates ) ; java . lang . String type = "" ; java . lang . String coordinates = "" ; switch ( wktType ) { case "point" : type = "multilinestring" 3 ; coordinates = org . nlpcn . es4sql . spatial . WktToGeoJsonConverter . pointCoordinatesFromWkt ( wkt ) ; break ; case "polygon" : type = "multilinestring" 1 ; coordinates = org . nlpcn . es4sql . spatial . WktToGeoJsonConverter . polygonCoordinatesFromWkt ( wkt ) ; break ; case "linestring" : type = "LineString" ; coordinates = org . nlpcn . es4sql . spatial . WktToGeoJsonConverter . lineStringCoordinatesFromWkt ( wkt ) ; break ; case "multipolygon" : type = "MultiPolygon" ; coordinates = org . nlpcn . es4sql . spatial . WktToGeoJsonConverter . multiPolygonCoordinatesFromWkt ( wkt ) ; break ; case "multipoint" : type = "multilinestring" 0 ; coordinates = org . nlpcn . es4sql . spatial . WktToGeoJsonConverter . multiPointCoordinatesFromWkt ( wkt ) ; break ; case "multilinestring" : type = "MultiLineString" ; coordinates = org . nlpcn . es4sql . spatial . WktToGeoJsonConverter . multiLineStringCoordinatesFromWkt ( wkt ) ; break ; default : throw new java . lang . IllegalArgumentException ( "multilinestring" 5 ) ; } return org . nlpcn . es4sql . spatial . WktToGeoJsonConverter . buildGeoJson ( type , coordinates ) ; }
org . junit . Assert . assertEquals ( expectedGeoJson , geoJson )
testSameRequests ( ) { java . net . URI targetUri = new java . net . URI ( "coap" , null , "localhost" , 5683 , "/path/to/service" , null , null ) ; de . uzl . itm . ncoap . message . CoapRequest coapRequest1 = new de . uzl . itm . ncoap . message . CoapRequest ( MessageType . NON , MessageCode . GET , targetUri ) ; coapRequest1 . setToken ( new de . uzl . itm . ncoap . communication . dispatching . Token ( new byte [ 0 ] ) ) ; coapRequest1 . setMessageID ( 12345 ) ; de . uzl . itm . ncoap . message . CoapRequest coapRequest2 = new de . uzl . itm . ncoap . message . CoapRequest ( MessageType . NON , MessageCode . GET , targetUri ) ; coapRequest2 . setToken ( new de . uzl . itm . ncoap . communication . dispatching . Token ( new byte [ 0 ] ) ) ; coapRequest2 . setMessageID ( 12345 ) ; "<AssertPlaceHolder>" ; } setMessageID ( int ) { this . messageID = messageID ; }
org . junit . Assert . assertEquals ( coapRequest1 , coapRequest2 )
sharedAccessTokenSetterWorks ( ) { java . lang . String expectedToken = "new<sp>token" ; final java . lang . String connString = ( ( ( ( ( ( "HostName=" + ( tests . unit . com . microsoft . azure . sdk . iot . device . IotHubConnectionStringTest . VALID_HOSTNAME ) ) + ";CredentialType=SharedAccessKey;CredentialScope=Device;" ) + "DeviceId=" ) + ( tests . unit . com . microsoft . azure . sdk . iot . device . IotHubConnectionStringTest . VALID_DEVICEID ) ) + ";SharedAccessSignature=" ) + ( tests . unit . com . microsoft . azure . sdk . iot . device . IotHubConnectionStringTest . VALID_SHARED_ACCESS_TOKEN ) ) + ";" ; java . lang . Object iotHubConnectionString = mockit . Deencapsulation . newInstance ( java . lang . Class . forName ( tests . unit . com . microsoft . azure . sdk . iot . device . IotHubConnectionStringTest . IOTHUB_CONNECTION_STRING_CLASS ) , new java . lang . Class [ ] { java . lang . String . class } , connString ) ; mockit . Deencapsulation . invoke ( iotHubConnectionString , "setSharedAccessToken" , expectedToken ) ; java . lang . String actualToken = mockit . Deencapsulation . getField ( iotHubConnectionString , "sharedAccessToken" ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( expectedToken , actualToken )
itRetainsTheHostActivityOnFirstLaunch ( ) { when ( fragmentManagerMock . findFragmentByTag ( com . github . mttkay . memento . MementoSupportV4Test . EXPECTED_FRAGMENT_TAG ) ) . thenReturn ( null ) ; com . github . mttkay . memento . Memento . retain ( activityMock ) ; org . mockito . ArgumentCaptor < com . github . mttkay . memento . MementoSupportV4Test . RetainedActivity$Memento > memento = org . mockito . ArgumentCaptor . forClass ( com . github . mttkay . memento . MementoSupportV4Test . RetainedActivity$Memento . class ) ; verify ( fragmentTransactionMock ) . add ( memento . capture ( ) , eq ( com . github . mttkay . memento . MementoSupportV4Test . EXPECTED_FRAGMENT_TAG ) ) ; "<AssertPlaceHolder>" ; } retain ( android . app . Activity ) { retainWasCalled = true ; }
org . junit . Assert . assertTrue ( memento . getValue ( ) . retainWasCalled )
testLinearModule2 ( ) { org . nd4j . linalg . api . ops . impl . layers . Linear linear = org . nd4j . linalg . api . ops . impl . layers . Linear . execBuilder ( ) . nIn ( 3 ) . nOut ( 2 ) . weightInitScheme ( new org . nd4j . weightinit . impl . OneInitScheme ( 'f' ) ) . biasWeightInitScheme ( new org . nd4j . weightinit . impl . ZeroInitScheme ( 'f' ) ) . build ( ) ; linear . exec ( org . nd4j . linalg . factory . Nd4j . linspace ( 1 , 6 , 6 ) . reshape ( 2 , 3 ) ) ; org . nd4j . linalg . api . ndarray . INDArray assertion = org . nd4j . linalg . factory . Nd4j . create ( new double [ ] [ ] { new double [ ] { 6 , 6 } , new double [ ] { 15 , 15 } } ) ; "<AssertPlaceHolder>" ; } outputArguments ( ) { if ( ! ( outputArguments . isEmpty ( ) ) ) { return outputArguments . toArray ( new org . nd4j . linalg . api . ndarray . INDArray [ outputArguments . size ( ) ] ) ; } return new org . nd4j . linalg . api . ndarray . INDArray [ 0 ] ; }
org . junit . Assert . assertEquals ( assertion , linear . outputArguments ( ) [ 0 ] )
tesDuplicateDocnos ( ) { ivory . core . data . index . TermPositions tp = new ivory . core . data . index . TermPositions ( ) ; int [ ] pos = new int [ ] { 1 , 4 , 5 , 5 , 23 } ; tp . set ( pos , ( ( short ) ( 5 ) ) ) ; "<AssertPlaceHolder>" ; tp . serialize ( ) ; } getTf ( ) { return innerPrevTf ; }
org . junit . Assert . assertEquals ( 5 , tp . getTf ( ) )
givenPrivateMethodWithReturn_whenUsingPowerMockito_thenCorrect ( ) { com . baeldung . powermockito . introduction . LuckyNumberGenerator mock = spy ( new com . baeldung . powermockito . introduction . LuckyNumberGenerator ( ) ) ; when ( mock , "getDefaultLuckyNumber" ) . thenReturn ( 300 ) ; int result = mock . getLuckyNumber ( null ) ; "<AssertPlaceHolder>" ; } getLuckyNumber ( java . lang . String ) { saveIntoDatabase ( name ) ; if ( name == null ) { return getDefaultLuckyNumber ( ) ; } return getComputedLuckyNumber ( name . length ( ) ) ; }
org . junit . Assert . assertEquals ( 300 , result )
testFetchByPrimaryKeysWithNoPrimaryKeys ( ) { java . util . Set < java . io . Serializable > primaryKeys = new java . util . HashSet < java . io . Serializable > ( ) ; java . util . Map < java . io . Serializable , com . liferay . portal . kernel . model . Layout > layouts = _persistence . fetchByPrimaryKeys ( primaryKeys ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return _portalCacheListeners . isEmpty ( ) ; }
org . junit . Assert . assertTrue ( layouts . isEmpty ( ) )
testCharOptionalInLexer ( ) { org . antlr . tool . Grammar g = new org . antlr . tool . Grammar ( ( "lexer<sp>grammar<sp>P;\n" + "B<sp>:<sp>'b'?;" ) ) ; java . lang . String expecting = "(rule<sp>B<sp>ARG<sp>RET<sp>scope<sp>(BLOCK<sp>(ALT<sp>(?<sp>(BLOCK<sp>(ALT<sp>'b'<sp><end-of-alt>)<sp><end-of-block>))<sp><end-of-alt>)<sp><end-of-block>)<sp><end-of-rule>)" ; java . lang . String found = g . getRule ( "B" ) . tree . toStringTree ( ) ; "<AssertPlaceHolder>" ; } toStringTree ( ) { if ( ( ( children ) == null ) || ( children . isEmpty ( ) ) ) { return this . toString ( ) ; } java . lang . StringBuilder buf = new java . lang . StringBuilder ( ) ; if ( ! ( isNil ( ) ) ) { buf . append ( "(" ) ; buf . append ( this . toString ( ) ) ; buf . append ( '<sp>' ) ; } for ( int i = 0 ; ( ( children ) != null ) && ( i < ( children . size ( ) ) ) ; i ++ ) { org . antlr . runtime . tree . Tree t = ( ( org . antlr . runtime . tree . Tree ) ( children . get ( i ) ) ) ; if ( i > 0 ) { buf . append ( '<sp>' ) ; } buf . append ( t . toStringTree ( ) ) ; } if ( ! ( isNil ( ) ) ) { buf . append ( ")" ) ; } return buf . toString ( ) ; }
org . junit . Assert . assertEquals ( expecting , found )
testJavadocFailure ( ) { java . lang . String javadoc = org . walkmod . javalang . util . FileUtils . fileToString ( "src/test/resources/javadocFailure.txt" ) ; javadoc = javadoc . replaceAll ( "\\*" , "" ) ; java . util . List < org . walkmod . javalang . ast . body . JavadocTag > tags = org . walkmod . javalang . JavadocManager . parse ( javadoc ) ; "<AssertPlaceHolder>" ; } parse ( java . lang . String ) { java . util . List < org . walkmod . javalang . ast . body . JavadocTag > javadocTags = null ; if ( content != null ) { java . io . InputStream is = new java . io . ByteArrayInputStream ( content . getBytes ( ) ) ; try { javadocTags = org . walkmod . javalang . tags . TagsParser . parse ( is ) ; } finally { is . close ( ) ; } } return javadocTags ; }
org . junit . Assert . assertTrue ( ( ( tags . size ( ) ) > 1 ) )
nullCategoryObjectsDontCauseErrors ( ) { com . xpn . xwiki . doc . XWikiDocument doc = mock ( com . xpn . xwiki . doc . XWikiDocument . class ) ; com . xpn . xwiki . objects . ListProperty prop = mock ( com . xpn . xwiki . objects . ListProperty . class ) ; when ( prop . getName ( ) ) . thenReturn ( org . phenotips . data . internal . PhenoTipsFeatureTest . TYPE_PHENOTYPE ) ; java . util . List < com . xpn . xwiki . objects . BaseObject > categories = new java . util . ArrayList ( ) ; categories . add ( null ) ; com . xpn . xwiki . objects . BaseObject category = mock ( com . xpn . xwiki . objects . BaseObject . class ) ; com . xpn . xwiki . objects . StringProperty temp = new com . xpn . xwiki . objects . StringProperty ( ) ; temp . setValue ( org . phenotips . data . internal . PhenoTipsFeatureTest . TYPE_PHENOTYPE ) ; when ( category . get ( "target_property_name" ) ) . thenReturn ( temp ) ; temp = new com . xpn . xwiki . objects . StringProperty ( ) ; temp . setValue ( org . phenotips . data . internal . PhenoTipsFeatureTest . HP0000100 ) ; when ( category . get ( "target_property_value" ) ) . thenReturn ( temp ) ; java . util . List < java . lang . String > specifiedCategories = new java . util . ArrayList ( ) ; specifiedCategories . add ( org . phenotips . data . internal . PhenoTipsFeatureTest . HP0012211 ) ; specifiedCategories . add ( org . phenotips . data . internal . PhenoTipsFeatureTest . HP0000082 ) ; when ( category . getListValue ( "target_property_category" ) ) . thenReturn ( specifiedCategories ) ; categories . add ( category ) ; when ( doc . getXObjects ( new org . xwiki . model . reference . EntityReference ( "PhenotypeCategoryClass" , org . xwiki . model . EntityType . DOCUMENT , org . phenotips . Constants . CODE_SPACE_REFERENCE ) ) ) . thenReturn ( categories ) ; org . json . JSONObject json = new org . phenotips . data . internal . PhenoTipsFeature ( doc , prop , org . phenotips . data . internal . PhenoTipsFeatureTest . HP0000100 ) . toJSON ( ) ; org . json . JSONArray jsonCategories = json . getJSONArray ( "categories" ) ; "<AssertPlaceHolder>" ; } toJSON ( ) { org . json . JSONObject json = new org . json . JSONObject ( ) ; json . put ( "id" , this . getId ( ) ) ; return json ; }
org . junit . Assert . assertEquals ( 2 , jsonCategories . length ( ) )
findRoles_shouldReturnNoResultsIfThereAreNoMatchingRoles ( ) { org . springframework . mock . web . MockHttpServletRequest req = request ( RequestMethod . GET , getURI ( ) ) ; req . addParameter ( "q" , "Missing<sp>Name" ) ; org . openmrs . module . webservices . rest . SimpleObject result = deserialize ( handle ( req ) ) ; java . util . List < java . lang . Object > hits = ( ( java . util . List < java . lang . Object > ) ( result . get ( "results" ) ) ) ; "<AssertPlaceHolder>" ; } get ( org . springframework . web . context . request . WebRequest ) { boolean authenticated = org . openmrs . api . context . Context . isAuthenticated ( ) ; org . openmrs . module . webservices . rest . SimpleObject session = new org . openmrs . module . webservices . rest . SimpleObject ( ) ; session . add ( "sessionId" , request . getSessionId ( ) ) . add ( "authenticated" , authenticated ) ; if ( authenticated ) { java . lang . String repParam = request . getParameter ( RestConstants . REQUEST_PROPERTY_FOR_REPRESENTATION ) ; org . openmrs . module . webservices . rest . web . representation . Representation rep = ( repParam != null ) ? restService . getRepresentation ( repParam ) : org . openmrs . module . webservices . rest . web . representation . Representation . DEFAULT ; session . add ( "user" , org . openmrs . module . webservices . rest . web . ConversionUtil . convertToRepresentation ( org . openmrs . api . context . Context . getAuthenticatedUser ( ) , rep ) ) ; session . add ( "locale" , org . openmrs . api . context . Context . getLocale ( ) ) ; session . add ( "allowedLocales" , org . openmrs . api . context . Context . getAdministrationService ( ) . getAllowedLocales ( ) ) ; } return session ; }
org . junit . Assert . assertEquals ( 0 , hits . size ( ) )
parseApiVersion_ctmg_1_8 ( ) { javax . xml . soap . SOAPPart part = mock ( javax . xml . soap . SOAPPart . class ) ; javax . xml . soap . SOAPEnvelope envelope = mock ( javax . xml . soap . SOAPEnvelope . class ) ; javax . xml . soap . SOAPHeader soapHeader = mock ( javax . xml . soap . SOAPHeader . class ) ; java . util . List < javax . xml . soap . Node > version = new java . util . ArrayList < javax . xml . soap . Node > ( ) ; javax . xml . soap . Node node = mock ( javax . xml . soap . Node . class ) ; doReturn ( "testVersion" ) . when ( node ) . getValue ( ) ; version . add ( node ) ; java . util . Iterator < ? > it = version . iterator ( ) ; doReturn ( it ) . when ( soapHeader ) . extractHeaderElements ( eq ( "ctmg.service.version" ) ) ; doReturn ( soapHeader ) . when ( envelope ) . getHeader ( ) ; doReturn ( envelope ) . when ( part ) . getEnvelope ( ) ; doReturn ( part ) . when ( message ) . getSOAPPart ( ) ; java . lang . String result = org . oscm . apiversioning . soapmgmt . parser . SoapRequestParser . parseApiVersion ( context ) ; "<AssertPlaceHolder>" ; } parseApiVersion ( javax . xml . ws . handler . soap . SOAPMessageContext ) { javax . xml . soap . SOAPMessage soapMessage = context . getMessage ( ) ; javax . xml . soap . SOAPEnvelope soapEnvelope = soapMessage . getSOAPPart ( ) . getEnvelope ( ) ; javax . xml . soap . SOAPHeader soapHeader = soapEnvelope . getHeader ( ) ; if ( soapHeader == null ) { return "" ; } java . util . Iterator < ? > it = null ; java . util . Iterator < ? > itCm = soapHeader . extractHeaderElements ( org . oscm . apiversioning . soapmgmt . parser . SoapRequestParser . VERSION_CM ) ; if ( ( itCm == null ) || ( ! ( itCm . hasNext ( ) ) ) ) { java . util . Iterator < ? > itCtmg = soapHeader . extractHeaderElements ( org . oscm . apiversioning . soapmgmt . parser . SoapRequestParser . VERSION_CTMG ) ; if ( ( itCtmg == null ) || ( ! ( itCtmg . hasNext ( ) ) ) ) { return "" ; } else { it = itCtmg ; } } else { it = itCm ; } javax . xml . soap . Node node = ( ( javax . xml . soap . Node ) ( it . next ( ) ) ) ; java . lang . String value = ( node == null ) ? null : node . getValue ( ) ; return value ; }
org . junit . Assert . assertEquals ( "testVersion" , result )
shouldVisitMapValueProperties ( ) { final org . openspotlight . persist . util . SimplePersistVisitorSupportTest . SimpleObject1 root = createSampleData ( ) ; final java . util . concurrent . atomic . AtomicInteger count = new java . util . concurrent . atomic . AtomicInteger ( 0 ) ; org . openspotlight . persist . util . SimpleNodeTypeVisitorSupport . acceptVisitorOn ( org . openspotlight . persist . util . SimplePersistVisitorSupportTest . SimpleObject3 . class , root , new org . openspotlight . persist . util . SimpleNodeTypeVisitor < org . openspotlight . persist . util . SimplePersistVisitorSupportTest . SimpleObject3 > ( ) { @ org . openspotlight . persist . util . Override public void visitBean ( final org . openspotlight . persist . util . SimplePersistVisitorSupportTest . SimpleObject3 bean ) { count . incrementAndGet ( ) ; } } ) ; "<AssertPlaceHolder>" ; } visitBean ( org . openspotlight . persist . util . SimplePersistVisitorSupportTest$NodeObject ) { bean . getName ( ) . toString ( ) ; names . add ( bean . getName ( ) ) ; }
org . junit . Assert . assertThat ( count . get ( ) , org . hamcrest . core . Is . is ( 3 ) )
getPrincipal_Everyone ( ) { java . security . Principal principal = provider . getPrincipal ( org . apache . jackrabbit . core . security . principal . EveryonePrincipal . getInstance ( ) . getName ( ) ) ; "<AssertPlaceHolder>" ; } getInstance ( ) { return org . pentaho . platform . repository2 . unified . jcr . jackrabbit . security . messages . Messages . instance ; }
org . junit . Assert . assertEquals ( principal , org . apache . jackrabbit . core . security . principal . EveryonePrincipal . getInstance ( ) )
testQueueForwardReified ( ) { org . jacop . core . Store store = new org . jacop . core . Store ( ) ; org . jacop . floats . core . FloatVar x = new org . jacop . floats . core . FloatVar ( store , "x" , 0.1 , 0.4 ) ; org . jacop . floats . core . FloatVar y = new org . jacop . floats . core . FloatVar ( store , "y" , 0.5 , 1.0 ) ; org . jacop . floats . core . FloatVar [ ] v = new org . jacop . floats . core . FloatVar [ ] { x , y } ; org . jacop . core . IntVar one = new org . jacop . core . IntVar ( store , "one" , 1 , 1 ) ; store . impose ( new org . jacop . constraints . Reified ( new org . jacop . floats . constraints . LinearFloat ( v , new double [ ] { 1 , - 1 } , "==" , 0 ) , one ) ) ; System . out . println ( ( "Precision<sp>=<sp>" + ( org . jacop . floats . core . FloatDomain . precision ( ) ) ) ) ; org . jacop . search . Search < org . jacop . floats . core . FloatVar > label = new org . jacop . search . DepthFirstSearch < org . jacop . floats . core . FloatVar > ( ) ; org . jacop . floats . search . SplitSelectFloat < org . jacop . floats . core . FloatVar > select = new org . jacop . floats . search . SplitSelectFloat < org . jacop . floats . core . FloatVar > ( store , v , null ) ; label . setSolutionListener ( new org . jacop . search . PrintOutListener < org . jacop . floats . core . FloatVar > ( ) ) ; boolean result = label . labeling ( store , select ) ; if ( result ) { System . out . println ( "Solutions:<sp>" ) ; label . printAllSolutions ( ) ; } else System . out . println ( "***<sp>No" ) ; "<AssertPlaceHolder>" ; } printAllSolutions ( ) { if ( recordSolutions ) { System . out . println ( "\nAll<sp>solutions:<sp>\n" ) ; System . out . println ( ( "Number<sp>of<sp>Solutions:<sp>" + ( noSolutions ) ) ) ; for ( int i = 0 ; i < ( solutions [ 0 ] . length ) ; i ++ ) { System . out . print ( ( ( vars [ i ] . id ( ) ) + "<sp>" ) ) ; } System . out . println ( ) ; for ( int s = 0 ; s < ( noSolutions ) ; s ++ ) { for ( int i = 0 ; i < ( solutions [ 0 ] . length ) ; i ++ ) { System . out . print ( ( ( solutions [ s ] [ i ] ) + "<sp>" ) ) ; } System . out . println ( ) ; } } else { if ( ( noSolutions ) > 0 ) { System . out . println ( "\nLast<sp>recorded<sp>solution:<sp>\n" ) ; System . out . println ( ( "Number<sp>of<sp>Solutions:<sp>" + ( noSolutions ) ) ) ; for ( int i = 0 ; i < ( solutions [ 0 ] . length ) ; i ++ ) { System . out . print ( ( ( vars [ i ] . id ( ) ) + "<sp>" ) ) ; } System . out . println ( ) ; for ( int i = 0 ; i < ( solutions [ 0 ] . length ) ; i ++ ) { System . out . print ( ( ( solutions [ 0 ] [ i ] ) + "<sp>" ) ) ; } System . out . println ( ) ; } else { System . out . println ( "\nNo<sp>solution<sp>found.<sp>\n" ) ; } } }
org . junit . Assert . assertEquals ( false , result )
deveObterNumeroPedidoClienteComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe310 . classes . nota . NFNotaInfoItemProduto produto = new com . fincatto . documentofiscal . nfe310 . classes . nota . NFNotaInfoItemProduto ( ) ; final java . lang . String numeroPedidoCliente = "NNxQ9nrQ3HCe5Mc" ; produto . setNumeroPedidoCliente ( numeroPedidoCliente ) ; "<AssertPlaceHolder>" ; } getNumeroPedidoCliente ( ) { return this . numeroPedidoCliente ; }
org . junit . Assert . assertEquals ( numeroPedidoCliente , produto . getNumeroPedidoCliente ( ) )
testFastLocalAsyncIdBo_empty ( ) { com . navercorp . pinpoint . thrift . dto . TSpanEvent tSpanEvent = new com . navercorp . pinpoint . thrift . dto . TSpanEvent ( ) ; com . navercorp . pinpoint . common . server . bo . LocalAsyncIdBo localAsyncIdBo = spanFactory . fastLocalAsyncIdBo ( java . util . Collections . singletonList ( tSpanEvent ) ) ; "<AssertPlaceHolder>" ; } fastLocalAsyncIdBo ( java . util . List ) { final com . navercorp . pinpoint . thrift . dto . TSpanEvent first = tSpanEventList . get ( 0 ) ; if ( isSetAsyncId ( first ) ) { final int asyncId = first . getAsyncId ( ) ; final short asyncSequence = first . getAsyncSequence ( ) ; return new com . navercorp . pinpoint . common . server . bo . LocalAsyncIdBo ( asyncId , asyncSequence ) ; } return null ; }
org . junit . Assert . assertNull ( localAsyncIdBo )
testMillisecondsJDBC ( ) { long time = ( ( readTimeJDBC ( ) ) / ( com . liferay . portal . kernel . util . Time . SECOND ) ) * ( com . liferay . portal . kernel . util . Time . SECOND ) ; for ( int i = 0 ; i < ( com . liferay . portal . kernel . util . Time . SECOND ) ; i ++ ) { writeTimeJDBC ( time ) ; "<AssertPlaceHolder>" ; } } readTimeJDBC ( ) { try ( java . sql . Connection connection = com . liferay . portal . kernel . dao . jdbc . DataAccess . getConnection ( ) ; java . sql . Statement statement = connection . createStatement ( ) ; java . sql . ResultSet resultSet = statement . executeQuery ( com . liferay . portal . dao . orm . test . SQLDateTest . _READ_RELEASE_MODIFIED_DATE ) ) { org . junit . Assert . assertTrue ( resultSet . next ( ) ) ; java . sql . Timestamp timestamp = resultSet . getTimestamp ( "modifiedDate" ) ; org . junit . Assert . assertFalse ( resultSet . next ( ) ) ; return timestamp . getTime ( ) ; } }
org . junit . Assert . assertEquals ( ( time ++ ) , readTimeJDBC ( ) )
getCount_simpleQuery_returnsFour ( ) { com . vaadin . v7 . data . util . sqlcontainer . query . FreeformQuery query = new com . vaadin . v7 . data . util . sqlcontainer . query . FreeformQuery ( "SELECT<sp>*<sp>FROM<sp>people" , java . util . Arrays . asList ( "ID" ) , connectionPool ) ; "<AssertPlaceHolder>" ; } getCount ( ) { com . vaadin . v7 . data . util . sqlcontainer . query . TableQuery . getLogger ( ) . log ( Level . FINE , "Fetching<sp>count..." ) ; com . vaadin . v7 . data . util . sqlcontainer . query . generator . StatementHelper sh = sqlGenerator . generateSelectQuery ( getFullTableName ( ) , filters , null , 0 , 0 , "COUNT(*)" ) ; boolean shouldCloseTransaction = false ; if ( ! ( isInTransaction ( ) ) ) { shouldCloseTransaction = true ; beginTransaction ( ) ; } java . sql . ResultSet r = null ; int count = - 1 ; try { r = executeQuery ( sh ) ; r . next ( ) ; count = r . getInt ( 1 ) ; } finally { try { if ( r != null ) { releaseConnection ( null , r . getStatement ( ) , r ) ; } } finally { if ( shouldCloseTransaction ) { commit ( ) ; } } } return count ; }
org . junit . Assert . assertEquals ( 4 , query . getCount ( ) )
testFormatExportedVariables ( ) { java . util . Map < java . lang . String , java . lang . String > exports = new java . util . LinkedHashMap ( ) ; exports . put ( "port" , "3306" ) ; exports . put ( "MySQL.port" , "3306" ) ; exports . put ( "ip" , "" ) ; exports . put ( "MySQL.ip" , null ) ; java . lang . String expected = "port<sp>=><sp>'3306',<sp>port<sp>=><sp>'3306',<sp>ip<sp>=><sp>undef,<sp>ip<sp>=><sp>undef" ; "<AssertPlaceHolder>" ; } formatExportedVariables ( java . util . Map ) { java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; boolean first = true ; for ( java . util . Map . Entry < java . lang . String , java . lang . String > entry : instanceExports . entrySet ( ) ) { if ( first ) first = false ; else sb . append ( ",<sp>" ) ; java . lang . String vname = net . roboconf . core . model . helpers . VariableHelpers . parseVariableName ( entry . getKey ( ) ) . getValue ( ) ; sb . append ( vname . toLowerCase ( ) ) ; sb . append ( "<sp>=><sp>" ) ; if ( net . roboconf . core . utils . Utils . isEmptyOrWhitespaces ( entry . getValue ( ) ) ) sb . append ( "undef" ) ; else sb . append ( ( ( "'" + ( entry . getValue ( ) ) ) + "'" ) ) ; } return sb . toString ( ) ; }
org . junit . Assert . assertEquals ( expected , this . plugin . formatExportedVariables ( exports ) )
testGetGenericSuperType1 ( ) { java . lang . String msg ; msg = "The<sp>adaptation<sp>of<sp>UML2TypePrimitiveType.getGenericSuperType()<sp>seems<sp>to<sp>be<sp>wrong." ; msg += "<sp>The<sp>Type<sp>" + ( org . dresdenocl . metamodels . uml2 . test . tests . TestUmlTypePrimitiveType . nonPrimitivePrimitiveType . getQualifiedName ( ) ) ; msg += "<sp>should<sp>not<sp>have<sp>Generic<sp>Super<sp>Types." ; "<AssertPlaceHolder>" ; } getGenericSuperType ( ) { if ( ( genericSuperType ) == null ) { genericSuperType = new org . eclipse . emf . ecore . util . EObjectContainmentEList < org . dresdenocl . pivotmodel . GenericType > ( org . dresdenocl . pivotmodel . GenericType . class , this , org . dresdenocl . pivotmodel . PivotModelPackage . TYPE__GENERIC_SUPER_TYPE ) ; } return genericSuperType ; }
org . junit . Assert . assertEquals ( msg , 0 , org . dresdenocl . metamodels . uml2 . test . tests . TestUmlTypePrimitiveType . nonPrimitivePrimitiveType . getGenericSuperType ( ) . size ( ) )
testConcurrency ( ) { final int count = 10 ; com . github . jedis . lock . integration . JedisLockTestIT . ConcurrentLocker [ ] lockers = new com . github . jedis . lock . integration . JedisLockTestIT . ConcurrentLocker [ ] { new com . github . jedis . lock . integration . JedisLockTestIT . ConcurrentLocker ( count ) , new com . github . jedis . lock . integration . JedisLockTestIT . ConcurrentLocker ( count ) , new com . github . jedis . lock . integration . JedisLockTestIT . ConcurrentLocker ( count ) } ; for ( com . github . jedis . lock . integration . JedisLockTestIT . ConcurrentLocker locker : lockers ) { locker . start ( ) ; } for ( com . github . jedis . lock . integration . JedisLockTestIT . ConcurrentLocker locker : lockers ) { locker . join ( ) ; } for ( com . github . jedis . lock . integration . JedisLockTestIT . ConcurrentLocker locker : lockers ) { "<AssertPlaceHolder>" ; } } count ( ) { return counter ; }
org . junit . Assert . assertEquals ( count , locker . count ( ) )
testGetGraphPanelContainer ( ) { System . out . println ( "getGraphPanelContainer" ) ; kg . apc . jmeter . vizualizers . JMXMonGui instance = new kg . apc . jmeter . vizualizers . JMXMonGui ( ) ; javax . swing . JPanel result = instance . getGraphPanelContainer ( ) ; "<AssertPlaceHolder>" ; } getGraphPanelContainer ( ) { kg . apc . jmeter . vizualizers . JPanel panel = new kg . apc . jmeter . vizualizers . JPanel ( new kg . apc . jmeter . vizualizers . BorderLayout ( ) ) ; kg . apc . jmeter . vizualizers . JPanel innerTopPanel = new kg . apc . jmeter . vizualizers . JPanel ( new kg . apc . jmeter . vizualizers . BorderLayout ( ) ) ; errorPane = new kg . apc . jmeter . vizualizers . JScrollPane ( ) ; errorPane . setMinimumSize ( new kg . apc . jmeter . vizualizers . Dimension ( 100 , 50 ) ) ; errorPane . setPreferredSize ( new kg . apc . jmeter . vizualizers . Dimension ( 100 , 50 ) ) ; errorTextArea = new kg . apc . jmeter . vizualizers . JTextArea ( ) ; errorTextArea . setForeground ( Color . red ) ; errorTextArea . setBackground ( new kg . apc . jmeter . vizualizers . Color ( 255 , 255 , 153 ) ) ; errorTextArea . setEditable ( false ) ; errorPane . setViewportView ( errorTextArea ) ; registerPopup ( ) ; innerTopPanel . add ( createSamplerPanel ( ) , BorderLayout . NORTH ) ; innerTopPanel . add ( errorPane , BorderLayout . SOUTH ) ; innerTopPanel . add ( getFilePanel ( ) , BorderLayout . CENTER ) ; panel . add ( innerTopPanel , BorderLayout . NORTH ) ; errorPane . setVisible ( false ) ; return panel ; }
org . junit . Assert . assertNotNull ( result )
testTruncatePolimorphic ( ) { com . orientechnologies . orient . core . metadata . schema . OClass vcl = database . getMetadata ( ) . getSchema ( ) . createClass ( "A" ) ; database . getMetadata ( ) . getSchema ( ) . createClass ( "ab" , vcl ) ; com . orientechnologies . orient . core . record . impl . ODocument doc = new com . orientechnologies . orient . core . record . impl . ODocument ( "A" ) ; database . save ( doc ) ; doc = new com . orientechnologies . orient . core . record . impl . ODocument ( "ab" ) ; database . save ( doc ) ; java . lang . Number ret = database . command ( new com . orientechnologies . orient . core . sql . OCommandSQL ( "truncate<sp>class<sp>A<sp>POLYMORPHIC" ) ) . execute ( ) ; "<AssertPlaceHolder>" ; } intValue ( ) { return value ; }
org . junit . Assert . assertEquals ( ret . intValue ( ) , 2 )
verifyApplyReturnsPayloadFromXToken ( ) { final org . glassfish . jersey . server . ContainerRequest request = mock ( org . glassfish . jersey . server . ContainerRequest . class ) ; doReturn ( null ) . when ( tokenHeaderUtility ) . getAuthorizationToken ( request ) ; doReturn ( token ) . when ( tokenHeaderUtility ) . getXAuthorizationToken ( request ) ; given ( validator . validateAndDecrypt ( keys , token ) ) . willReturn ( "hello" ) ; final java . lang . String result = function . apply ( request ) ; "<AssertPlaceHolder>" ; } validateAndDecrypt ( java . util . Collection , com . macasaet . fernet . Validator ) { return validator . validateAndDecrypt ( keys , this ) ; }
org . junit . Assert . assertEquals ( "hello" , result )
shouldReplaceConsistencyWithAtPlus ( ) { com . couchbase . client . core . message . kv . MutationToken token1 = new com . couchbase . client . core . message . kv . MutationToken ( 1 , 1234 , 1000 , "bucket1" ) ; com . couchbase . client . core . message . kv . MutationToken token2 = new com . couchbase . client . core . message . kv . MutationToken ( 2 , 1235 , 2000 , "bucket1" ) ; com . couchbase . client . java . document . JsonDocument doc1 = com . couchbase . client . java . document . JsonDocument . create ( "id" , 0 , com . couchbase . client . java . document . json . JsonObject . empty ( ) , 0 , token1 ) ; com . couchbase . client . java . document . JsonDocument doc2 = com . couchbase . client . java . document . JsonDocument . create ( "id" , 0 , com . couchbase . client . java . document . json . JsonObject . empty ( ) , 0 , token2 ) ; com . couchbase . client . java . search . SearchQuery p = new com . couchbase . client . java . search . SearchQuery ( "foo" , null ) . searchConsistency ( SearchConsistency . NOT_BOUNDED ) . consistentWith ( doc1 , doc2 ) ; com . couchbase . client . java . document . json . JsonObject result = com . couchbase . client . java . document . json . JsonObject . empty ( ) ; p . injectParams ( result ) ; com . couchbase . client . java . document . json . JsonObject expectedVector = com . couchbase . client . java . document . json . JsonObject . create ( ) . put ( "foo" , com . couchbase . client . java . document . json . JsonObject . create ( ) . put ( "1/1234" , 1000L ) . put ( "2/1235" , 2000L ) ) ; com . couchbase . client . java . document . json . JsonObject expected = com . couchbase . client . java . document . json . JsonObject . create ( ) . put ( "ctl" , com . couchbase . client . java . document . json . JsonObject . create ( ) . put ( "consistency" , com . couchbase . client . java . document . json . JsonObject . create ( ) . put ( "level" , "at_plus" ) . put ( "vectors" , expectedVector ) ) ) ; "<AssertPlaceHolder>" ; } put ( java . lang . String , V ) { if ( key == null ) { throw new java . lang . NullPointerException ( "Unsupported<sp>null<sp>key" ) ; } if ( ! ( com . couchbase . client . java . document . json . JsonValue . checkType ( value ) ) ) { throw new java . lang . IllegalArgumentException ( "Unsupported<sp>value<sp>type." ) ; } for ( int i = 0 ; i < ( com . couchbase . client . java . datastructures . collections . CouchbaseMap . MAX_OPTIMISTIC_LOCKING_ATTEMPTS ) ; i ++ ) { try { com . couchbase . client . java . subdoc . DocumentFragment < com . couchbase . client . core . message . kv . subdoc . multi . Lookup > current = bucket . lookupIn ( id ) . get ( key ) . execute ( ) ; long returnCas = current . cas ( ) ; java . lang . Object result = null ; if ( current . exists ( key ) ) { result = current . content ( key ) ; } bucket . mutateIn ( id ) . upsert ( key , value , false ) . withCas ( returnCas ) . execute ( ) ; return ( ( V ) ( result ) ) ; } catch ( com . couchbase . client . java . error . CASMismatchException ex ) { } } throw new java . util . ConcurrentModificationException ( ( ( "Couldn't<sp>perform<sp>put<sp>in<sp>less<sp>than<sp>" + ( com . couchbase . client . java . datastructures . collections . CouchbaseMap . MAX_OPTIMISTIC_LOCKING_ATTEMPTS ) ) + "<sp>iterations" ) ) ; }
org . junit . Assert . assertEquals ( expected , result )
testGetProjectsFromIndexPatternsWhenNoResults ( ) { givenSearchResultToIncludePattern ( null ) ; java . util . Set < io . fabric8 . elasticsearch . plugin . model . Project > act = utils . getProjectsFromIndexPatterns ( OpenshiftRequestContext . EMPTY ) ; java . util . Set < io . fabric8 . elasticsearch . plugin . model . Project > exp = new java . util . HashSet ( ) ; "<AssertPlaceHolder>" ; } getProjectsFromIndexPatterns ( io . fabric8 . elasticsearch . plugin . OpenshiftRequestContextFactory . OpenshiftRequestContext ) { java . util . Set < io . fabric8 . elasticsearch . plugin . model . Project > patterns = new java . util . HashSet ( ) ; org . elasticsearch . action . search . SearchResponse response = pluginClient . search ( context . getKibanaIndex ( ) , io . fabric8 . elasticsearch . plugin . kibana . KibanaUtils . INDICIES_TYPE ) ; if ( ( ( response . getHits ( ) ) != null ) && ( ( response . getHits ( ) . getTotalHits ( ) ) > 0 ) ) { for ( org . elasticsearch . search . SearchHit hit : response . getHits ( ) . getHits ( ) ) { java . lang . String id = hit . getId ( ) ; io . fabric8 . elasticsearch . plugin . model . Project project = getProjectFromIndexPattern ( id ) ; if ( ( ! ( project . getName ( ) . equals ( id ) ) ) || ( project . equals ( io . fabric8 . elasticsearch . plugin . kibana . KibanaUtils . ALL_ALIAS ) ) ) { patterns . add ( project ) ; } } } else { io . fabric8 . elasticsearch . plugin . kibana . KibanaUtils . LOGGER . debug ( "No<sp>index-mappings<sp>found<sp>in<sp>the<sp>kibana<sp>index<sp>'{}'" , context . getKibanaIndex ( ) ) ; } return patterns ; }
org . junit . Assert . assertEquals ( exp , act )
fullTextQuery_IndexAllProps_NodePathQuery_NoPlan ( ) { org . apache . jackrabbit . oak . spi . state . NodeBuilder defn = newLucenePropertyIndexDefinition ( builder , "test" , of ( "foo" ) , "async" ) ; defn = org . apache . jackrabbit . oak . plugins . index . lucene . LuceneIndexDefinition . updateDefinition ( defn . getNodeState ( ) . builder ( ) ) ; org . apache . jackrabbit . oak . spi . state . NodeBuilder foob = org . apache . jackrabbit . oak . plugins . index . lucene . IndexPlannerTest . getNode ( defn , "indexRules/nt:base/properties/foo" ) ; foob . setProperty ( FulltextIndexConstants . PROP_NAME , "foo" ) ; foob . setProperty ( FulltextIndexConstants . PROP_ANALYZED , true ) ; org . apache . jackrabbit . oak . plugins . index . search . spi . query . FulltextIndexPlanner planner = createPlannerForFulltext ( defn . getNodeState ( ) , org . apache . jackrabbit . oak . spi . query . fulltext . FullTextParser . parse ( "jcr:content/*" , "mountain<sp>OR<sp>valley" ) ) ; "<AssertPlaceHolder>" ; } getPlan ( ) { if ( ( definition ) == null ) { org . apache . jackrabbit . oak . plugins . index . search . spi . query . FulltextIndexPlanner . log . debug ( "Index<sp>{}<sp>not<sp>loaded" , indexPath ) ; return null ; } org . apache . jackrabbit . oak . plugins . index . search . spi . query . IndexPlan . Builder builder = getPlanBuilder ( ) ; if ( definition . isTestMode ( ) ) { if ( builder == null ) { if ( notSupportedFeature ( ) ) { return null ; } java . lang . String msg = java . lang . String . format ( ( "No<sp>plan<sp>found<sp>for<sp>filter<sp>[%s]<sp>" + "while<sp>using<sp>definition<sp>[%s]<sp>and<sp>testMode<sp>is<sp>found<sp>to<sp>be<sp>enabled" ) , filter , definition ) ; throw new java . lang . IllegalStateException ( msg ) ; } else { builder . setEstimatedEntryCount ( 1 ) . setCostPerExecution ( 0.001 ) . setCostPerEntry ( 0.001 ) ; } } return builder != null ? builder . build ( ) : null ; }
org . junit . Assert . assertNull ( planner . getPlan ( ) )
Create3G_test11 ( ) { com . att . aro . core . configuration . pojo . Profile3G profile3g = mock ( com . att . aro . core . configuration . pojo . Profile3G . class ) ; when ( profile3g . getProfileType ( ) ) . thenReturn ( ProfileType . T3G ) ; when ( profile3g . getIdleDchPromoAvg ( ) ) . thenReturn ( 12000.0 ) ; when ( profile3g . getIdleDchPromoMin ( ) ) . thenReturn ( 1000.0 ) ; when ( profile3g . getIdleDchPromoMax ( ) ) . thenReturn ( 20000.0 ) ; when ( profile3g . getFachDchPromoAvg ( ) ) . thenReturn ( 1000.0 ) ; when ( profile3g . getFachDchPromoMin ( ) ) . thenReturn ( 2500.0 ) ; when ( profile3g . getFachDchPromoMax ( ) ) . thenReturn ( 6000.0 ) ; when ( profile3g . getDchFachTimer ( ) ) . thenReturn ( 1000.0 ) ; when ( profile3g . getFachIdleTimer ( ) ) . thenReturn ( 2000.0 ) ; double traceDuration = 2000.0 ; java . util . List < com . att . aro . core . packetanalysis . pojo . PacketInfo > packetlist = new java . util . ArrayList < com . att . aro . core . packetanalysis . pojo . PacketInfo > ( ) ; when ( pktInfoArray [ 0 ] . getTimeStamp ( ) ) . thenReturn ( ( ( date . getTime ( ) ) - 1500.0 ) ) ; when ( pktInfoArray [ 0 ] . getDir ( ) ) . thenReturn ( PacketDirection . DOWNLINK ) ; when ( pktInfoArray [ 0 ] . getLen ( ) ) . thenReturn ( 1000 ) ; when ( pktInfoArray [ 0 ] . getStateMachine ( ) ) . thenReturn ( RRCState . STATE_DCH ) ; packetlist . add ( pktInfoArray [ 0 ] ) ; when ( pktInfoArray [ 1 ] . getTimeStamp ( ) ) . thenReturn ( ( ( date . getTime ( ) ) + 1000.0 ) ) ; when ( pktInfoArray [ 1 ] . getDir ( ) ) . thenReturn ( PacketDirection . DOWNLINK ) ; when ( pktInfoArray [ 1 ] . getLen ( ) ) . thenReturn ( 1000 ) ; when ( pktInfoArray [ 1 ] . getStateMachine ( ) ) . thenReturn ( RRCState . STATE_DCH ) ; packetlist . add ( pktInfoArray [ 1 ] ) ; when ( pktInfoArray [ 2 ] . getTimeStamp ( ) ) . thenReturn ( ( ( date . getTime ( ) ) + 1500.0 ) ) ; when ( pktInfoArray [ 2 ] . getDir ( ) ) . thenReturn ( PacketDirection . DOWNLINK ) ; when ( pktInfoArray [ 2 ] . getLen ( ) ) . thenReturn ( 1000 ) ; when ( pktInfoArray [ 2 ] . getStateMachine ( ) ) . thenReturn ( RRCState . STATE_DCH ) ; packetlist . add ( pktInfoArray [ 2 ] ) ; java . util . List < com . att . aro . core . packetanalysis . pojo . RrcStateRange > testList = rrcStateRangeFactory . create ( packetlist , profile3g , traceDuration ) ; "<AssertPlaceHolder>" ; } size ( ) { return sessionTable . size ( ) ; }
org . junit . Assert . assertEquals ( 1 , testList . size ( ) )
testReturnsPayloadWhenMatchesIfNoCaptureGroupDefinedTextArgument ( ) { java . lang . Object result = regexFuntion . call ( new java . lang . Object [ ] { "TEST\\w+TEST" , "TESTfooTEST" } , context ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( "TESTfooTEST" , result )
testGetExplanation ( ) { instance = getInstance ( explanation , getFactory ( ) ) ; "<AssertPlaceHolder>" ; } getExplanation ( ) { return explanation ; }
org . junit . Assert . assertEquals ( explanation , instance . getExplanation ( ) )
testListIsEmpty ( ) { java . util . List < java . io . File > list = menuManager . getMRUList ( ) ; "<AssertPlaceHolder>" ; } getMRUList ( ) { if ( ( fMRUList ) == null ) { fMRUList = loadMRUListFromPreferenceStore ( ) ; } return fMRUList ; }
org . junit . Assert . assertTrue ( list . isEmpty ( ) )
testFullConfiguration ( ) { org . apache . activemq . artemis . core . config . impl . FileConfiguration fc = new org . apache . activemq . artemis . core . config . impl . FileConfiguration ( ) ; org . apache . activemq . artemis . core . config . FileDeploymentManager deploymentManager = new org . apache . activemq . artemis . core . config . FileDeploymentManager ( "ConfigurationTest-full-config.xml" ) ; deploymentManager . addDeployable ( fc ) ; deploymentManager . readConfiguration ( ) ; "<AssertPlaceHolder>" ; } isPersistDeliveryCountBeforeDelivery ( ) { return persistDeliveryCountBeforeDelivery ; }
org . junit . Assert . assertEquals ( true , fc . isPersistDeliveryCountBeforeDelivery ( ) )
getAttributes_shouldReturnEmptyListWhenMatchingPersonAttributeByIdIsVoided ( ) { org . openmrs . Person person = personHelper ( true , 1 , 1 , 3 , "name1" , "name2" , "name3" , "value1" , "value2" , "value3" ) ; "<AssertPlaceHolder>" ; } getAttributes ( org . openmrs . PersonAttributeType ) { java . util . List < org . openmrs . PersonAttribute > ret = new java . util . ArrayList ( ) ; for ( org . openmrs . PersonAttribute attribute : getAttributes ( ) ) { if ( ( personAttributeType . equals ( attribute . getAttributeType ( ) ) ) && ( ! ( attribute . getVoided ( ) ) ) ) { ret . add ( attribute ) ; } } return ret ; }
org . junit . Assert . assertEquals ( 0 , person . getAttributes ( 1 ) . size ( ) )
testGetElement ( ) { when ( element . getOrientation ( ) ) . thenReturn ( OrientationType . Horizontal ) ; mmarquee . automation . uiautomation . IUIAutomation mocked_automation = org . mockito . Mockito . mock ( mmarquee . automation . uiautomation . IUIAutomation . class ) ; mmarquee . automation . UIAutomation instance = new mmarquee . automation . UIAutomation ( mocked_automation ) ; mmarquee . automation . controls . AutomationWindow window = new mmarquee . automation . controls . AutomationWindow ( new mmarquee . automation . controls . ElementBuilder ( element ) . addPattern ( container ) . automation ( instance ) . addPattern ( pattern ) ) ; mmarquee . automation . AutomationElement result = window . getElement ( ) ; "<AssertPlaceHolder>" ; } getElement ( ) { return this . element ; }
org . junit . Assert . assertTrue ( ( result == ( element ) ) )
testGetParametersWithDefaultEntity ( ) { org . lnu . is . domain . timeperiod . TimePeriod entity = new org . lnu . is . domain . timeperiod . TimePeriod ( ) ; java . util . Map < java . lang . String , java . lang . Object > expected = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; expected . put ( "status" , RowStatus . ACTIVE ) ; expected . put ( "userGroups" , groups ) ; java . util . Map < java . lang . String , java . lang . Object > actual = unit . getParameters ( entity ) ; "<AssertPlaceHolder>" ; } getParameters ( org . springframework . web . context . request . NativeWebRequest ) { java . util . Map < java . lang . String , java . lang . Object > resultMap = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; java . util . Map < java . lang . String , java . lang . String > pathVariables = ( ( java . util . Map < java . lang . String , java . lang . String > ) ( webRequest . getAttribute ( HandlerMapping . URI_TEMPLATE_VARIABLES_ATTRIBUTE , RequestAttributes . SCOPE_REQUEST ) ) ) ; java . util . Map < java . lang . String , java . lang . Object > requestParams = getRequestParameterMap ( webRequest ) ; for ( Map . Entry < java . lang . String , java . lang . Object > entry : requestParams . entrySet ( ) ) { resultMap . put ( entry . getKey ( ) , entry . getValue ( ) ) ; } resultMap . putAll ( pathVariables ) ; return resultMap ; }
org . junit . Assert . assertEquals ( expected , actual )
testRemoteStatusDeletedFile ( ) { final org . tmatesoft . svn . test . TestOptions options = org . tmatesoft . svn . test . TestOptions . getInstance ( ) ; final org . tmatesoft . svn . test . SvnOperationFactory svnOperationFactory = new org . tmatesoft . svn . test . SvnOperationFactory ( ) ; final org . tmatesoft . svn . test . Sandbox sandbox = org . tmatesoft . svn . test . Sandbox . createWithCleanup ( ( ( getTestName ( ) ) + ".testRemoteStatusDeletedFile" ) , options ) ; try { final org . tmatesoft . svn . test . SVNURL url = sandbox . createSvnRepository ( ) ; final org . tmatesoft . svn . test . CommitBuilder commitBuilder1 = new org . tmatesoft . svn . test . CommitBuilder ( url ) ; commitBuilder1 . addFile ( "file" ) ; commitBuilder1 . commit ( ) ; final org . tmatesoft . svn . test . CommitBuilder commitBuilder2 = new org . tmatesoft . svn . test . CommitBuilder ( url ) ; commitBuilder2 . delete ( "file" ) ; commitBuilder2 . commit ( ) ; final org . tmatesoft . svn . test . WorkingCopy workingCopy = sandbox . checkoutNewWorkingCopy ( url , 1 ) ; final java . io . File workingCopyDirectory = workingCopy . getWorkingCopyDirectory ( ) ; final java . io . File file = new java . io . File ( workingCopyDirectory , "file" ) ; final org . tmatesoft . svn . test . SvnGetStatus getStatus = svnOperationFactory . createGetStatus ( ) ; getStatus . setSingleTarget ( org . tmatesoft . svn . test . SvnTarget . fromFile ( file ) ) ; getStatus . setRemote ( true ) ; final org . tmatesoft . svn . test . SvnStatus status = getStatus . run ( ) ; "<AssertPlaceHolder>" ; } finally { svnOperationFactory . dispose ( ) ; sandbox . dispose ( ) ; } } getRepositoryChangedRevision ( ) { return repositoryChangedRevision ; }
org . junit . Assert . assertEquals ( 2 , status . getRepositoryChangedRevision ( ) )
testGenerateImplicitFlowURI ( ) { com . github . jreddit . oauth . param . RedditScopeBuilder builder = new com . github . jreddit . oauth . param . RedditScopeBuilder ( ) ; builder . addScope ( RedditScope . FLAIR ) ; java . lang . String url = subject . generateImplicitFlowURI ( builder ) ; org . apache . commons . validator . routines . UrlValidator urlValidator = new org . apache . commons . validator . routines . UrlValidator ( ) ; "<AssertPlaceHolder>" ; } generateImplicitFlowURI ( com . github . jreddit . oauth . param . RedditScopeBuilder ) { java . util . Map < java . lang . String , java . lang . String > params = new java . util . HashMap < java . lang . String , java . lang . String > ( ) ; params . put ( com . github . jreddit . oauth . RedditOAuthAgent . PARAM_CLIENT_ID , redditApp . getClientID ( ) ) ; params . put ( com . github . jreddit . oauth . RedditOAuthAgent . PARAM_RESPONSE_TYPE , "token" ) ; params . put ( com . github . jreddit . oauth . RedditOAuthAgent . PARAM_STATE , java . util . UUID . randomUUID ( ) . toString ( ) ) ; params . put ( com . github . jreddit . oauth . RedditOAuthAgent . PARAM_REDIRECT_URI , redditApp . getRedirectURI ( ) ) ; params . put ( com . github . jreddit . oauth . RedditOAuthAgent . PARAM_SCOPE , scopeBuilder . build ( ) ) ; return ( com . github . jreddit . oauth . RedditOAuthAgent . REDDIT_AUTHORIZE ) + ( com . github . jreddit . request . util . KeyValueFormatter . format ( params , true ) ) ; }
org . junit . Assert . assertTrue ( urlValidator . isValid ( url ) )
createPCJ ( ) { try ( final org . apache . rya . indexing . pcj . storage . PrecomputedJoinStorage pcjStorage = new org . apache . rya . indexing . pcj . storage . mongo . MongoPcjStorage ( getMongoClient ( ) , conf . getRyaInstanceName ( ) ) ) { final org . apache . rya . mongodb . instance . MongoRyaInstanceDetailsRepository detailsRepo = new org . apache . rya . mongodb . instance . MongoRyaInstanceDetailsRepository ( getMongoClient ( ) , conf . getRyaInstanceName ( ) ) ; detailsRepo . initialize ( org . apache . rya . api . instance . RyaDetails . builder ( ) . setRyaInstanceName ( conf . getRyaInstanceName ( ) ) . setRyaVersion ( "test" ) . setEntityCentricIndexDetails ( new org . apache . rya . api . instance . RyaDetails . EntityCentricIndexDetails ( false ) ) . setTemporalIndexDetails ( new org . apache . rya . api . instance . RyaDetails . TemporalIndexDetails ( false ) ) . setFreeTextDetails ( new org . apache . rya . api . instance . RyaDetails . FreeTextIndexDetails ( false ) ) . setProspectorDetails ( new org . apache . rya . api . instance . RyaDetails . ProspectorDetails ( com . google . common . base . Optional . absent ( ) ) ) . setJoinSelectivityDetails ( new org . apache . rya . api . instance . RyaDetails . JoinSelectivityDetails ( com . google . common . base . Optional . absent ( ) ) ) . setPCJIndexDetails ( org . apache . rya . api . instance . RyaDetails . PCJIndexDetails . builder ( ) . setEnabled ( true ) ) . build ( ) ) ; final java . lang . String pcjId = pcjStorage . createPcj ( "SELECT<sp>*<sp>WHERE<sp>{<sp>?a<sp><http://isA><sp>?b<sp>}<sp>" ) ; final com . google . common . collect . ImmutableMap < java . lang . String , org . apache . rya . api . instance . RyaDetails . PCJIndexDetails . PCJDetails > detailsMap = detailsRepo . getRyaInstanceDetails ( ) . getPCJIndexDetails ( ) . getPCJDetails ( ) ; final org . apache . rya . api . instance . RyaDetails . PCJIndexDetails . PCJDetails expectedDetails = org . apache . rya . api . instance . RyaDetails . PCJIndexDetails . PCJDetails . builder ( ) . setId ( pcjId ) . build ( ) ; "<AssertPlaceHolder>" ; } } get ( org . apache . rya . api . domain . RyaIRI ) { java . util . Objects . requireNonNull ( subject ) ; try { final org . bson . Document document = mongo . getDatabase ( ryaInstanceName ) . getCollection ( org . apache . rya . indexing . entity . storage . mongo . MongoEntityStorage . COLLECTION_NAME ) . find ( com . mongodb . client . model . Filters . eq ( EntityDocumentConverter . SUBJECT , subject . getData ( ) ) ) . first ( ) ; return document == null ? java . util . Optional . empty ( ) : java . util . Optional . of ( org . apache . rya . indexing . entity . storage . mongo . MongoEntityStorage . ENTITY_CONVERTER . fromDocument ( document ) ) ; } catch ( com . mongodb . MongoException | org . apache . rya . indexing . entity . storage . mongo . DocumentConverter . DocumentConverterException e ) { throw new org . apache . rya . indexing . entity . storage . mongo . EntityStorageException ( ( ( "Could<sp>not<sp>get<sp>the<sp>Entity<sp>with<sp>Subject<sp>'" + ( subject . getData ( ) ) ) + "'." ) , e ) ; } }
org . junit . Assert . assertEquals ( expectedDetails , detailsMap . get ( pcjId ) )
testGetRabbits ( ) { org . mintcode . errabbit . model . Rabbit r1 = new org . mintcode . errabbit . model . Rabbit ( ) ; r1 . setId ( "1" ) ; org . mintcode . errabbit . model . Rabbit r2 = new org . mintcode . errabbit . model . Rabbit ( ) ; r2 . setId ( "2" ) ; java . util . List < org . mintcode . errabbit . model . Rabbit > rabbitList = new java . util . ArrayList ( ) ; rabbitList . add ( r1 ) ; rabbitList . add ( r2 ) ; org . mintcode . errabbit . model . RabbitGroup group = new org . mintcode . errabbit . model . RabbitGroup ( ) ; group . setRabbits ( rabbitList ) ; "<AssertPlaceHolder>" ; } getRabbits ( ) { return rabbitSet ; }
org . junit . Assert . assertEquals ( rabbitList , group . getRabbits ( ) )
testAllocator ( ) { options . setSocketOpt ( ZMQ . ZMQ_MSG_ALLOCATOR , new zmq . msg . MsgAllocatorDirect ( ) ) ; "<AssertPlaceHolder>" ; } getSocketOpt ( int ) { switch ( option ) { case ZMQ . ZMQ_SNDHWM : return sendHwm ; case ZMQ . ZMQ_RCVHWM : return recvHwm ; case ZMQ . ZMQ_AFFINITY : return affinity ; case ZMQ . ZMQ_IDENTITY : return identity ; case ZMQ . ZMQ_RATE : return rate ; case ZMQ . ZMQ_RECOVERY_IVL : return recoveryIvl ; case ZMQ . ZMQ_SNDBUF : return sndbuf ; case ZMQ . ZMQ_RCVBUF : return rcvbuf ; case ZMQ . ZMQ_TOS : return tos ; case ZMQ . ZMQ_TYPE : return type ; case ZMQ . ZMQ_LINGER : return linger ; case ZMQ . ZMQ_RECONNECT_IVL : return reconnectIvl ; case ZMQ . ZMQ_RECONNECT_IVL_MAX : return reconnectIvlMax ; case ZMQ . ZMQ_BACKLOG : return backlog ; case ZMQ . ZMQ_MAXMSGSIZE : return maxMsgSize ; case ZMQ . ZMQ_MULTICAST_HOPS : return multicastHops ; case ZMQ . ZMQ_RCVTIMEO : return recvTimeout ; case ZMQ . ZMQ_SNDTIMEO : return sendTimeout ; case ZMQ . ZMQ_IPV4ONLY : return ! ( ipv6 ) ; case ZMQ . ZMQ_IPV6 : return ipv6 ; case ZMQ . ZMQ_TCP_KEEPALIVE : return tcpKeepAlive ; case ZMQ . ZMQ_IMMEDIATE : return immediate ; case ZMQ . ZMQ_DELAY_ATTACH_ON_CONNECT : return ! ( immediate ) ; case ZMQ . ZMQ_SOCKS_PROXY : return socksProxyAddress ; case ZMQ . ZMQ_TCP_KEEPALIVE_CNT : case ZMQ . ZMQ_TCP_KEEPALIVE_IDLE : case ZMQ . ZMQ_TCP_KEEPALIVE_INTVL : return 0 ; case ZMQ . ZMQ_MECHANISM : return mechanism ; case ZMQ . ZMQ_PLAIN_SERVER : return ( asServer ) && ( ( mechanism ) == ( zmq . io . mechanism . Mechanisms . PLAIN ) ) ; case ZMQ . ZMQ_PLAIN_USERNAME : return plainUsername ; case ZMQ . ZMQ_PLAIN_PASSWORD : return plainPassword ; case ZMQ . ZMQ_ZAP_DOMAIN : return zapDomain ; case ZMQ . ZMQ_LAST_ENDPOINT : return lastEndpoint ; case ZMQ . ZMQ_CURVE_SERVER : return ( asServer ) && ( ( mechanism ) == ( zmq . io . mechanism . Mechanisms . CURVE ) ) ; case ZMQ . ZMQ_CURVE_PUBLICKEY : return curvePublicKey ; case ZMQ . ZMQ_CURVE_SERVERKEY : return curveServerKey ; case ZMQ . ZMQ_CURVE_SECRETKEY : return curveSecretKey ; case ZMQ . ZMQ_CONFLATE : return conflate ; case ZMQ . ZMQ_GSSAPI_SERVER : return ( asServer ) && ( ( mechanism ) == ( zmq . io . mechanism . Mechanisms . GSSAPI ) ) ; case ZMQ . ZMQ_GSSAPI_PRINCIPAL : return gssPrincipal ; case ZMQ . ZMQ_GSSAPI_SERVICE_PRINCIPAL : return gssServicePrincipal ; case ZMQ . ZMQ_GSSAPI_PLAINTEXT : return gssPlaintext ; case ZMQ . ZMQ_HANDSHAKE_IVL : return handshakeIvl ; case ZMQ . ZMQ_HEARTBEAT_IVL : return heartbeatInterval ; case ZMQ . ZMQ_HEARTBEAT_TIMEOUT : return heartbeatTimeout ; case ZMQ . ZMQ_HEARTBEAT_TTL : return ( heartbeatTtl ) * 100 ; case ZMQ . ZMQ_HEARTBEAT_CONTEXT : return heartbeatContext ; case ZMQ . ZMQ_MSG_ALLOCATOR : return allocator ; case ZMQ . ZMQ_MSG_ALLOCATION_HEAP_THRESHOLD : if ( ( allocator ) instanceof zmq . msg . MsgAllocatorThreshold ) { zmq . msg . MsgAllocatorThreshold all = ( ( zmq . msg . MsgAllocatorThreshold ) ( allocator ) ) ; return all . threshold ; } return - 1 ; case ZMQ . ZMQ_SELECTOR_PROVIDERCHOOSER : return selectorChooser ; default : throw new java . lang . IllegalArgumentException ( ( "option=" + option ) ) ; } }
org . junit . Assert . assertThat ( options . getSocketOpt ( ZMQ . ZMQ_MSG_ALLOCATOR ) , org . hamcrest . CoreMatchers . is ( ( ( java . lang . Object ) ( options . allocator ) ) ) )
testRegexNoOrg ( ) { org . restcomm . connect . commons . dao . Sid srcSid = null ; org . restcomm . connect . commons . dao . Sid destSid = null ; java . lang . String regex = "12<sp>when(numDao.getTotalIncomingPhoneNumbers((IncomingPhoneNumberFilter)<sp>any())).\n" + "<sp>thenReturn(1,1,1);.*" ; java . util . List < org . restcomm . connect . dao . entities . IncomingPhoneNumber > emptyNumbers = new java . util . ArrayList ( ) ; java . util . List < org . restcomm . connect . dao . entities . IncomingPhoneNumber > numbers = new java . util . ArrayList ( ) ; final org . restcomm . connect . dao . entities . IncomingPhoneNumber . Builder builder = org . restcomm . connect . dao . entities . IncomingPhoneNumber . builder ( ) ; builder . setPhoneNumber ( regex ) ; numbers . add ( builder . build ( ) ) ; org . restcomm . connect . dao . IncomingPhoneNumbersDao numDao = org . mockito . Mockito . mock ( org . restcomm . connect . dao . IncomingPhoneNumbersDao . class ) ; when ( numDao . getTotalIncomingPhoneNumbers ( ( ( org . restcomm . connect . dao . entities . IncomingPhoneNumberFilter ) ( any ( ) ) ) ) ) . thenReturn ( 1 , 1 , 1 ) ; when ( numDao . getIncomingPhoneNumbersByFilter ( ( ( org . restcomm . connect . dao . entities . IncomingPhoneNumberFilter ) ( any ( ) ) ) ) ) . thenReturn ( emptyNumbers , emptyNumbers ) ; when ( numDao . getIncomingPhoneNumbersRegex ( ( ( org . restcomm . connect . dao . entities . IncomingPhoneNumberFilter ) ( any ( ) ) ) ) ) . thenReturn ( numbers ) ; org . mockito . InOrder inOrder = inOrder ( numDao ) ; org . restcomm . connect . core . service . number . NumberSelectorServiceImpl service = new org . restcomm . connect . core . service . number . NumberSelectorServiceImpl ( numDao ) ; org . restcomm . connect . dao . entities . IncomingPhoneNumber found = service . searchNumber ( "1234" , srcSid , destSid ) ; "<AssertPlaceHolder>" ; inOrder . verify ( numDao , times ( 2 ) ) . getIncomingPhoneNumbersByFilter ( ( ( org . restcomm . connect . dao . entities . IncomingPhoneNumberFilter ) ( any ( ) ) ) ) ; inOrder . verify ( numDao , never ( ) ) . getIncomingPhoneNumbersRegex ( ( ( org . restcomm . connect . dao . entities . IncomingPhoneNumberFilter ) ( any ( ) ) ) ) ; } searchNumber ( java . lang . String , org . restcomm . connect . commons . dao . Sid , org . restcomm . connect . commons . dao . Sid ) { return searchNumber ( phone , sourceOrganizationSid , destinationOrganizationSid , new java . util . HashSet ( java . util . Arrays . asList ( SearchModifier . ORG_COMPLIANT ) ) ) ; }
org . junit . Assert . assertNull ( found )
testVerifySimpleWSSucceeds ( ) { org . jboss . as . webservices . verification . JwsWebServiceEndpointVerifier sut = new org . jboss . as . webservices . verification . JwsWebServiceEndpointVerifier ( org . jboss . as . webservices . verification . SimpleWSImpl . class , null , deploymentReflectionIndex ) ; sut . verify ( ) ; "<AssertPlaceHolder>" ; } failed ( ) { return ! ( verificationFailures . isEmpty ( ) ) ; }
org . junit . Assert . assertFalse ( sut . failed ( ) )
isCanonical_TrueTest ( ) { java . lang . String acpString = "C0C1C2O3<sp>0:1(2),0:2(1),1:3(1),2:3(1)" ; org . openscience . cdk . interfaces . IAtomContainer ac = org . openscience . cdk . group . AtomContainerPrinter . fromString ( acpString , org . openscience . cdk . group . BondDiscretePartitionRefinerTest . builder ) ; org . openscience . cdk . group . BondDiscretePartitionRefiner refiner = new org . openscience . cdk . group . BondDiscretePartitionRefiner ( ) ; "<AssertPlaceHolder>" ; } isCanonical ( org . openscience . cdk . interfaces . IAtomContainer ) { setup ( atomContainer ) ; super . refine ( refinable . getInitialPartition ( ) ) ; return isCanonical ( ) ; }
org . junit . Assert . assertTrue ( refiner . isCanonical ( ac ) )
testGetVMUptime ( ) { "<AssertPlaceHolder>" ; } getVMUptime ( ) { java . lang . management . RuntimeMXBean runtimeMxBean = java . lang . management . ManagementFactory . getRuntimeMXBean ( ) ; return runtimeMxBean . getUptime ( ) ; }
org . junit . Assert . assertTrue ( ( ( instance . getVMUptime ( ) ) > 10 ) )
testDelete ( ) { int planetsBefore = countRowsInTable ( org . helloworld . milkyway . domain . Planet . class ) ; org . helloworld . milkyway . domain . Planet earth = planetService . findById ( getServiceContext ( ) , 1L ) ; planetService . delete ( getServiceContext ( ) , earth ) ; int planetsAfter = countRowsInTable ( org . helloworld . milkyway . domain . Planet . class ) ; "<AssertPlaceHolder>" ; } countRowsInTable ( java . lang . Class ) { javax . persistence . Query query = getEntityManager ( ) . createQuery ( ( ( "select<sp>count(e)<sp>from<sp>" + ( domainObjectClass . getSimpleName ( ) ) ) + "<sp>e" ) ) ; return ( ( java . lang . Integer ) ( query . getSingleResult ( ) ) ) ; }
org . junit . Assert . assertEquals ( ( planetsBefore - 1 ) , planetsAfter )
testAnnotationMetadata ( ) { org . teiid . runtime . HardCodedExecutionFactory hc = buildHardCodedExecutionFactory ( ) ; org . teiid . olingo . TestODataIntegration . teiid . addTranslator ( "x5" , hc ) ; org . teiid . adminapi . impl . ModelMetaData mmd = new org . teiid . adminapi . impl . ModelMetaData ( ) ; mmd . setName ( "m" ) ; mmd . addSourceMetadata ( "DDL" , "create<sp>foreign<sp>table<sp>x<sp>(a<sp>string<sp>primary<sp>key)<sp>OPTIONS<sp>(ANNOTATION<sp>'hello',<sp>foo<sp>'bar');" ) ; mmd . setModelType ( Model . Type . PHYSICAL ) ; mmd . addSourceMapping ( "x5" , "x5" , null ) ; org . teiid . olingo . TestODataIntegration . teiid . deployVDB ( "northwind" , mmd ) ; org . eclipse . jetty . client . api . ContentResponse response = org . teiid . olingo . TestODataIntegration . http . newRequest ( ( ( org . teiid . olingo . TestODataIntegration . baseURL ) + "/northwind/m/$metadata" ) ) . method ( "GET" ) . send ( ) ; "<AssertPlaceHolder>" ; } getStatus ( ) { return status ; }
org . junit . Assert . assertEquals ( 200 , response . getStatus ( ) )
testArgsImmutability ( ) { final com . shopzilla . hadoop . repl . commands . CommandInvocation commandInvocation = new com . shopzilla . hadoop . repl . commands . CommandInvocation ( "cmd" , "a" , "t" ) ; commandInvocation . args ( ) [ 1 ] = "b" ; "<AssertPlaceHolder>" ; } args ( ) { return java . util . Arrays . copyOf ( args , args . length ) ; }
org . junit . Assert . assertArrayEquals ( new java . lang . String [ ] { "a" , "t" } , commandInvocation . args ( ) )
testRegister ( ) { org . apache . hadoop . yarn . appcatalog . model . Application example = new org . apache . hadoop . yarn . appcatalog . model . Application ( ) ; example . setOrganization ( "jenkins-ci.org" ) ; example . setName ( "jenkins" ) ; example . setDescription ( "World<sp>leading<sp>open<sp>source<sp>automation<sp>system." ) ; example . setIcon ( "/css/img/feather.png" ) ; org . apache . hadoop . yarn . appcatalog . application . TestAppCatalogSolrClient . spy . register ( example ) ; java . util . List < org . apache . hadoop . yarn . appcatalog . model . AppStoreEntry > apps = org . apache . hadoop . yarn . appcatalog . application . TestAppCatalogSolrClient . spy . getRecommendedApps ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return loggers . size ( ) ; }
org . junit . Assert . assertEquals ( 1 , apps . size ( ) )
allMissing ( ) { expectedEx . expect ( org . neo4j . graphalgo . similarity . IllegalArgumentException . class ) ; expectedEx . expectMessage ( "Node<sp>ids<sp>[10,<sp>11,<sp>-1,<sp>29]<sp>do<sp>not<sp>exist<sp>in<sp>node<sp>ids<sp>list" ) ; org . neo4j . graphalgo . similarity . CategoricalInput [ ] ids = new org . neo4j . graphalgo . similarity . CategoricalInput [ 5 ] ; ids [ 0 ] = new org . neo4j . graphalgo . similarity . CategoricalInput ( 5 , new long [ ] { } ) ; ids [ 1 ] = new org . neo4j . graphalgo . similarity . CategoricalInput ( 6 , new long [ ] { } ) ; ids [ 2 ] = new org . neo4j . graphalgo . similarity . CategoricalInput ( 7 , new long [ ] { } ) ; ids [ 3 ] = new org . neo4j . graphalgo . similarity . CategoricalInput ( 8 , new long [ ] { } ) ; ids [ 4 ] = new org . neo4j . graphalgo . similarity . CategoricalInput ( 9 , new long [ ] { } ) ; int [ ] indexes = org . neo4j . graphalgo . similarity . SimilarityInput . indexes ( org . neo4j . graphalgo . similarity . SimilarityInput . extractInputIds ( ids ) , java . util . Arrays . asList ( 10L , 11L , ( - 1L ) , 29L ) ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertArrayEquals ( indexes , new int [ ] { } )
testInitialize_inexistingDirectory ( ) { org . junit . Assume . assumeTrue ( this . running ) ; net . roboconf . core . utils . Utils . deleteFilesRecursively ( this . instanceDirectory ) ; this . plugin . initialize ( this . inst ) ; "<AssertPlaceHolder>" ; } initialize ( net . roboconf . core . model . beans . Instance ) { this . logger . fine ( ( ( ( this . agentId ) + "<sp>is<sp>initializing<sp>the<sp>plug-in<sp>for<sp>" ) + ( instance . getName ( ) ) ) ) ; try { installPuppetModules ( instance ) ; } catch ( java . lang . Exception e ) { throw new net . roboconf . plugin . api . PluginException ( e ) ; } }
org . junit . Assert . assertFalse ( this . instanceDirectory . exists ( ) )
testGetContentModel ( ) { when ( cacheWrapper . getModel ( org . mockito . Mockito . anyString ( ) ) ) . thenReturn ( createModel ( 1 , "ART" ) ) ; org . entando . entando . aps . system . services . dataobjectmodel . DataObjectModel model = this . dataObjectModelManager . getDataObjectModel ( 1L ) ; "<AssertPlaceHolder>" ; } getDataObjectModel ( long ) { return ( ( org . entando . entando . aps . system . services . dataobjectmodel . DataObjectModel ) ( this . getCacheWrapper ( ) . getModel ( java . lang . String . valueOf ( dataObjectModelId ) ) ) ) ; }
org . junit . Assert . assertNotNull ( model )
testGetAndSetJMSExpiration ( ) { org . apache . qpid . jms . message . JmsMessage msg = factory . createMessage ( ) ; msg . setJMSExpiration ( this . jmsExpiration ) ; "<AssertPlaceHolder>" ; } getJMSExpiration ( ) { return facade . getExpiration ( ) ; }
org . junit . Assert . assertTrue ( ( ( msg . getJMSExpiration ( ) ) == ( this . jmsExpiration ) ) )