input
stringlengths
28
18.7k
output
stringlengths
39
1.69k
testAuthenticateFailsNull ( ) { final org . apache . sshd . server . session . ServerSession mockServerSession = context . mock ( org . apache . sshd . server . session . ServerSession . class ) ; final com . asolutions . scmsshd . ldap . LDAPBindingProvider ldapBinding = context . mock ( com . asolutions . scmsshd . ldap . LDAPBindingProvider . class ) ; final com . asolutions . scmsshd . authenticators . LDAPUsernameResolver ldapUsernameResolver = context . mock ( com . asolutions . scmsshd . authenticators . LDAPUsernameResolver . class ) ; checking ( new org . jmock . Expectations ( ) { { one ( ldapUsernameResolver ) . resolveUserName ( com . asolutions . scmsshd . authenticators . LDAPAuthenticatorTest . USERNAME ) ; will ( returnValue ( com . asolutions . scmsshd . authenticators . LDAPAuthenticatorTest . RESOLVED_USER_NAME ) ) ; oneOf ( ldapBinding ) . getBinding ( com . asolutions . scmsshd . authenticators . LDAPAuthenticatorTest . RESOLVED_USER_NAME , com . asolutions . scmsshd . authenticators . LDAPAuthenticatorTest . PASSWORD ) ; will ( throwException ( new javax . naming . NamingException ( ) ) ) ; } } ) ; com . asolutions . scmsshd . authenticators . LDAPAuthenticator auth = new com . asolutions . scmsshd . authenticators . LDAPAuthenticator ( ldapUsernameResolver , ldapBinding ) ; "<AssertPlaceHolder>" ; } authenticate ( java . lang . String , java . lang . String , org . apache . sshd . server . session . ServerSession ) { for ( com . asolutions . scmsshd . authenticators . IPasswordAuthenticator auth : authList ) { final java . lang . Object authResult = auth . authenticate ( username , password , session ) ; if ( authResult != null ) { return authResult ; } } return null ; }
org . junit . Assert . assertNull ( auth . authenticate ( com . asolutions . scmsshd . authenticators . LDAPAuthenticatorTest . USERNAME , com . asolutions . scmsshd . authenticators . LDAPAuthenticatorTest . PASSWORD , mockServerSession ) )
testGetMessages ( ) { sut . getMessages ( testId , org . eurekastreams . server . service . opensocial . spi . MessageServiceTest . TEST_MESSAGE_COLL_ID , new java . util . HashSet < java . lang . String > ( ) , new java . util . ArrayList < java . lang . String > ( ) , testCollectionOptions , org . eurekastreams . server . service . opensocial . spi . MessageServiceTest . FAKETOKEN ) ; "<AssertPlaceHolder>" ; } getMessages ( org . apache . shindig . social . opensocial . spi . UserId , java . lang . String , java . util . Set , java . util . List , org . apache . shindig . social . opensocial . spi . CollectionOptions , org . apache . shindig . auth . SecurityToken ) { return null ; }
org . junit . Assert . assertTrue ( true )
testFilterGeheimeAfnemerindicatie ( ) { final int leveringAutorisatieId = 1 ; org . mockito . Mockito . when ( leveringsautorisatieService . geefLeveringautorisatie ( leveringAutorisatieId ) ) . thenReturn ( bouwLeveringsautorisatieGeheim ( leveringAutorisatieId ) ) ; final nl . bzk . brp . domain . leveringmodel . persoon . Persoonslijst persoonslijst = maakPersoonMetAfnemerindicatie ( leveringAutorisatieId , "000001" ) ; final nl . bzk . brp . service . maakbericht . algemeen . MaakBerichtParameters maakBerichtParameters = new nl . bzk . brp . service . maakbericht . algemeen . MaakBerichtParameters ( ) ; final nl . bzk . brp . domain . algemeen . Autorisatiebundel autorisatiebundel = new nl . bzk . brp . domain . algemeen . Autorisatiebundel ( null , nl . bzk . brp . domain . algemeen . AutAutUtil . zoekDienst ( nl . bzk . brp . domain . algemeen . TestAutorisaties . metSoortDienst ( SoortDienst . GEEF_DETAILS_PERSOON ) , SoortDienst . GEEF_DETAILS_PERSOON ) ) ; maakBerichtParameters . setAutorisatiebundels ( com . google . common . collect . Lists . newArrayList ( autorisatiebundel ) ) ; final nl . bzk . brp . service . maakbericht . algemeen . Berichtgegevens berichtgegevens = new nl . bzk . brp . service . maakbericht . algemeen . Berichtgegevens ( maakBerichtParameters , persoonslijst , new nl . bzk . brp . service . maakbericht . algemeen . MaakBerichtPersoonInformatie ( nl . bzk . algemeenbrp . dal . domein . brp . enums . SoortSynchronisatie . VOLLEDIG_BERICHT ) , autorisatiebundel , new nl . bzk . brp . service . maakbericht . bepaling . StatischePersoongegevens ( ) ) ; new nl . bzk . brp . service . maakbericht . AutorisatieAlles ( berichtgegevens ) ; berichtgegevens . setKandidaatRecords ( com . google . common . collect . Sets . newHashSet ( ) ) ; persoonslijst . getMetaObject ( ) . accept ( new nl . bzk . brp . domain . leveringmodel . ParentFirstModelVisitor ( ) { @ nl . bzk . brp . service . maakbericht . filterstappen . Override protected void doVisit ( final nl . bzk . brp . domain . leveringmodel . MetaRecord record ) { berichtgegevens . getKandidaatRecords ( ) . add ( record ) ; } } ) ; autoriseerAfnemerindicatiesService . execute ( berichtgegevens ) ; final java . util . Set < nl . bzk . brp . domain . leveringmodel . MetaObject > afnemerIndicaties = berichtgegevens . getPersoonslijst ( ) . getModelIndex ( ) . geefObjecten ( Element . PERSOON_AFNEMERINDICATIE ) ; for ( nl . bzk . brp . domain . leveringmodel . MetaObject afnemerIndicatie : afnemerIndicaties ) { "<AssertPlaceHolder>" ; } } isGeautoriseerd ( nl . bzk . brp . domain . leveringmodel . MetaModel ) { return berichtmodel . containsKey ( model ) ; }
org . junit . Assert . assertFalse ( berichtgegevens . isGeautoriseerd ( afnemerIndicatie ) )
testEmptyQuery ( ) { org . infinispan . query . dsl . QueryFactory qf = org . infinispan . all . embeddedquery . QueryDslConditionsTest . getQueryFactory ( ) ; org . infinispan . query . dsl . Query q = qf . from ( org . infinispan . all . embeddedquery . QueryDslConditionsTest . getModelFactory ( ) . getUserImplClass ( ) ) . build ( ) ; java . util . List < org . infinispan . all . embeddedquery . testdomain . User > list = q . list ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return cache . size ( ) ; }
org . junit . Assert . assertEquals ( 3 , list . size ( ) )
testReclaimPolicy ( ) { pv . setReclaimPolicy ( "Recycle" ) ; java . lang . String policy = pv . getReclaimPolicy ( ) ; "<AssertPlaceHolder>" ; } getReclaimPolicy ( ) { return asString ( com . openshift . internal . restclient . model . volume . PersistentVolume . PV_RECLAIM_POLICY ) ; }
org . junit . Assert . assertEquals ( policy , "Recycle" )
shouldNotInjectFlushAfterExplicitFlushBeforeReadConfig ( ) { org . kaazing . k3po . lang . internal . ast . AstScriptNode expectedScriptNode = new org . kaazing . k3po . lang . internal . ast . builder . AstScriptNodeBuilder ( ) . addConnectStream ( ) . addConnectedEvent ( ) . done ( ) . addFlushCommand ( ) . done ( ) . addReadConfigEvent ( ) . done ( ) . done ( ) . done ( ) ; org . kaazing . k3po . lang . internal . ast . AstScriptNode inputScriptNode = new org . kaazing . k3po . lang . internal . ast . builder . AstScriptNodeBuilder ( ) . addConnectStream ( ) . addConnectedEvent ( ) . done ( ) . addFlushCommand ( ) . done ( ) . addReadConfigEvent ( ) . done ( ) . done ( ) . done ( ) ; org . kaazing . k3po . driver . internal . behavior . visitor . InjectFlushVisitor injectFlush = new org . kaazing . k3po . driver . internal . behavior . visitor . InjectFlushVisitor ( ) ; org . kaazing . k3po . lang . internal . ast . AstScriptNode actualScriptNode = inputScriptNode . accept ( injectFlush , new org . kaazing . k3po . driver . internal . behavior . visitor . InjectFlushVisitor . State ( ) ) ; "<AssertPlaceHolder>" ; } accept ( org . kaazing . k3po . lang . internal . ast . Visitor , P ) { return visitor . visit ( this , parameter ) ; }
org . junit . Assert . assertEquals ( expectedScriptNode , actualScriptNode )
testExceptions1 ( ) { java . lang . String imei = "" ; try { imei = edu . columbia . cs . psl . test . phosphor . DroidBenchIntTagITCase . taintedString ( "abcd" ) ; throw new java . lang . RuntimeException ( ) ; } catch ( java . lang . RuntimeException ex ) { "<AssertPlaceHolder>" ; } } getTaint ( java . lang . String ) { return edu . columbia . cs . psl . phosphor . runtime . Tainter . getTaint ( description . toCharArray ( ) [ 0 ] ) ; }
org . junit . Assert . assertTrue ( ( ( edu . columbia . cs . psl . test . phosphor . DroidBenchIntTagITCase . getTaint ( imei ) ) != 0 ) )
runTestReflection3 ( ) { soot . jimple . infoflow . results . InfoflowResults res = analyzeAPKFile ( "Reflection/Reflection3.apk" , null , enableReflectionCallback ) ; "<AssertPlaceHolder>" ; } size ( ) { return ( this . results ) == null ? 0 : this . results . size ( ) ; }
org . junit . Assert . assertEquals ( 1 , res . size ( ) )
equalDoesNotDependsOnMethodAndHref ( ) { final org . apache . isis . viewer . restfulobjects . applib . LinkRepresentation link = new org . apache . isis . viewer . restfulobjects . applib . LinkRepresentation ( ) . withHref ( "http://localhost:8080/objects/ABC:123" ) . withMethod ( RestfulHttpMethod . GET ) . withRel ( "something" ) ; final org . apache . isis . viewer . restfulobjects . applib . LinkRepresentation link2 = new org . apache . isis . viewer . restfulobjects . applib . LinkRepresentation ( ) . withHref ( "http://localhost:8080/objects/ABC:123" ) . withMethod ( RestfulHttpMethod . GET ) . withRel ( "else" ) ; "<AssertPlaceHolder>" ; } is ( org . apache . isis . core . metamodel . spec . feature . Contributed ) { return new com . google . common . base . Predicate < T > ( ) { @ org . apache . isis . core . metamodel . specloader . specimpl . Override public boolean apply ( org . apache . isis . core . metamodel . spec . feature . ObjectMember input ) { return contributed . isIncluded ( ) ; } } ; }
org . junit . Assert . assertThat ( link , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( link2 ) ) )
parseWithProtocolAndHostAndPathAndTwoQueryParameters ( ) { final com . azure . common . implementation . http . UrlBuilder builder = com . azure . common . implementation . http . UrlBuilder . parse ( "https://www.bing.com/image.gif?a=1&b=2" ) ; "<AssertPlaceHolder>" ; } toString ( ) { return this . value ; }
org . junit . Assert . assertEquals ( "https://www.bing.com/image.gif?a=1&b=2" , builder . toString ( ) )
get_foreign_keys ( ) { com . hotels . bdp . waggledance . client . CloseableThriftHiveMetastoreIface thriftHiveMetastoreIface = factory . newInstance ( delegate ) ; org . apache . hadoop . hive . metastore . api . ForeignKeysRequest foreignKeysRequest = new org . apache . hadoop . hive . metastore . api . ForeignKeysRequest ( null , null , com . hotels . bdp . waggledance . client . compatibility . HiveCompatibleThriftHiveMetastoreIfaceFactoryTest . DB_NAME , com . hotels . bdp . waggledance . client . compatibility . HiveCompatibleThriftHiveMetastoreIfaceFactoryTest . TABLE_NAME ) ; when ( delegate . get_foreign_keys ( foreignKeysRequest ) ) . thenThrow ( new org . apache . thrift . TApplicationException ( "Error" ) ) ; org . apache . hadoop . hive . metastore . api . ForeignKeysResponse foreignKeysResponse = thriftHiveMetastoreIface . get_foreign_keys ( foreignKeysRequest ) ; "<AssertPlaceHolder>" ; verify ( delegate ) . get_table ( com . hotels . bdp . waggledance . client . compatibility . HiveCompatibleThriftHiveMetastoreIfaceFactoryTest . DB_NAME , com . hotels . bdp . waggledance . client . compatibility . HiveCompatibleThriftHiveMetastoreIfaceFactoryTest . TABLE_NAME ) ; } get_foreign_keys ( org . apache . hadoop . hive . metastore . api . ForeignKeysRequest ) { client . get_table ( request . getForeign_db_name ( ) , request . getForeign_tbl_name ( ) ) ; return new org . apache . hadoop . hive . metastore . api . ForeignKeysResponse ( java . util . Collections . emptyList ( ) ) ; }
org . junit . Assert . assertThat ( foreignKeysResponse , org . hamcrest . CoreMatchers . is ( new org . apache . hadoop . hive . metastore . api . ForeignKeysResponse ( java . util . Collections . emptyList ( ) ) ) )
testToBuilder ( ) { com . google . cloud . datastore . NullValue value = com . google . cloud . datastore . NullValue . of ( ) ; "<AssertPlaceHolder>" ; } toBuilder ( ) { return ( this ) == ( com . google . firestore . admin . v1 . DeleteIndexRequest . DEFAULT_INSTANCE ) ? new com . google . firestore . admin . v1 . DeleteIndexRequest . Builder ( ) : new com . google . firestore . admin . v1 . DeleteIndexRequest . Builder ( ) . mergeFrom ( this ) ; }
org . junit . Assert . assertEquals ( value , value . toBuilder ( ) . build ( ) )
debieraObtenerPuesto ( ) { mx . edu . um . mateo . rh . dao . PuestoDaoTest . log . debug ( "Debiera<sp>obtener<sp>puesto" ) ; mx . edu . um . mateo . general . model . Organizacion organizacion = new mx . edu . um . mateo . general . model . Organizacion ( "tst-01" , "test-01" , "test-01" ) ; currentSession ( ) . save ( organizacion ) ; mx . edu . um . mateo . general . model . Empresa empresa = new mx . edu . um . mateo . general . model . Empresa ( "tst-01" , "test-01" , "test-01" , "usaername" 2 , organizacion ) ; currentSession ( ) . save ( empresa ) ; mx . edu . um . mateo . rh . model . Seccion seccion = new mx . edu . um . mateo . rh . model . Seccion ( ) ; seccion . setId ( new java . lang . Long ( 1 ) ) ; seccion . setCategoriaId ( "x" ) ; seccion . setMaximo ( Float . NaN ) ; seccion . setMinimo ( Float . NaN ) ; seccion . setNombre ( "usaername" 1 ) ; seccion . setRangoAcademico ( Float . NaN ) ; currentSession ( ) . save ( seccion ) ; currentSession ( ) . save ( seccion ) ; mx . edu . um . mateo . inventario . model . Almacen almacen = new mx . edu . um . mateo . inventario . model . Almacen ( "TST" , "TEST" , empresa ) ; currentSession ( ) . save ( almacen ) ; mx . edu . um . mateo . rh . model . Puesto puesto = new mx . edu . um . mateo . rh . model . Puesto ( "tst-01" , empresa ) ; int i = 8 ; puesto . setCategoria ( i ) ; puesto . setMaximo ( i ) ; puesto . setMinimo ( i ) ; puesto . setRangoAcademico ( Double . NaN ) ; puesto . setStatus ( "a" ) ; mx . edu . um . mateo . general . model . Usuario usuario = new mx . edu . um . mateo . general . model . Usuario ( "usaername" , "usaername" 0 , "usaername" 1 ) ; usuario . setCorreo ( "algo@um.edu.mx" ) ; usuario . setUsername ( "test" ) ; usuario . setAlmacen ( almacen ) ; usuario . setEmpresa ( empresa ) ; usuario . setPassword ( "test" ) ; currentSession ( ) . save ( usuario ) ; instance . graba ( puesto , usuario ) ; java . lang . Long id = puesto . getId ( ) ; mx . edu . um . mateo . rh . model . Puesto result = instance . obtiene ( id ) ; "<AssertPlaceHolder>" ; } getDescripcion ( ) { return descripcion ; }
org . junit . Assert . assertEquals ( "tst-01" , result . getDescripcion ( ) )
testUpdateEntity_noEvent ( ) { handler . addRequest ( false , "><Value>Closed</Value></Field></Fields></Entity>" 1 , "><Value>Closed</Value></Field></Fields></Entity>" 0 , 200 ) . expectXmlBody ( "<Entity<sp>Type=\"defect\"><Fields><Field<sp>Name=\"status\"><Value>Closed</Value></Field></Fields></Entity>" ) . content ( "entityServiceTest_entity.xml" ) ; addEntityListener ( new com . hp . alm . ali . idea . entity . EntityAdapter ( ) { @ com . hp . alm . ali . idea . services . Override public void entityLoaded ( final com . hp . alm . ali . idea . model . Entity entity , final com . hp . alm . ali . idea . services . Event event ) { org . junit . Assert . fail ( "Event<sp>not<sp>expected" ) ; } } ) ; com . hp . alm . ali . idea . model . Entity defect = new com . hp . alm . ali . idea . model . Entity ( "defect" , 86 ) ; defect . setProperty ( "priority" , "1-Critical" ) ; defect . setProperty ( "status" , "Closed" ) ; com . hp . alm . ali . idea . model . Entity updated = entityService . updateEntity ( defect , java . util . Collections . singleton ( "status" ) , false , false , false ) ; "<AssertPlaceHolder>" ; } getId ( ) { return id ; }
org . junit . Assert . assertEquals ( 86 , updated . getId ( ) )
testIsNewOnNewFile_shouldReturnTrue ( ) { initGitFileSystem ( ) ; writeToGfs ( "/test_file.txt" ) ; com . beijunyi . parallelgit . filesystem . io . GitFileAttributes attributes = readGitAttributes ( "/test_file.txt" ) ; "<AssertPlaceHolder>" ; } isNew ( ) { return origin . isMissing ( ) ; }
org . junit . Assert . assertTrue ( attributes . isNew ( ) )
hasChangedWhenPropertyIsUnchangedShouldReturnFalse ( ) { java . lang . String value = "value" ; resourceEditProperty = new ch . puzzle . itc . mobiliar . builders . ResourceEditPropertyBuilder ( ) . withValue ( value ) . build ( ) ; boolean hasChanged = resourceEditProperty . hasChanged ( ) ; "<AssertPlaceHolder>" ; } hasChanged ( ) { boolean isDecrypted = ( ( propertyValue ) != null ) && ( propertyValue . equals ( ch . puzzle . itc . mobiliar . business . property . entity . ResourceEditProperty . UNDECRYPTED ) ) ; boolean isEqualToOriginalValue = ( ( ( originalValue ) == null ) && ( ( propertyValue ) == null ) ) || ( ( ( originalValue ) != null ) && ( originalValue . equals ( propertyValue ) ) ) ; boolean isEqualPropertyComment = ( ( ( originalPropertyComment ) == null ) && ( ( propertyComment ) == null ) ) || ( ( ( originalPropertyComment ) != null ) && ( originalPropertyComment . equals ( propertyComment ) ) ) ; if ( isDecrypted || ( isReset ( ) ) ) { return false ; } else { return ( ! isEqualToOriginalValue ) || ( ! isEqualPropertyComment ) ; } }
org . junit . Assert . assertFalse ( hasChanged )
getColumnWidth_Locale ( ) { user . setRemoteLdapAttributes ( java . util . Arrays . asList ( org . oscm . ui . beans . LDAP_ATTR_LOCALE ) ) ; java . lang . String expected = ( java . lang . String . valueOf ( ( ( UserImportBean . BASE_WIDTH ) / 4 ) ) ) + ( org . oscm . ui . beans . UserImportBeanTest . UNIT ) ; "<AssertPlaceHolder>" ; } getColumnWidth ( ) { java . lang . String expected = ( java . lang . String . valueOf ( ( ( UserImportBean . BASE_WIDTH ) / 3 ) ) ) + ( org . oscm . ui . beans . UserImportBeanTest . UNIT ) ; org . junit . Assert . assertEquals ( expected , bean . getColumnWidth ( ) ) ; }
org . junit . Assert . assertEquals ( expected , bean . getColumnWidth ( ) )
servicesWithNoConfigsInitialValue ( ) { org . apache . ambari . server . stack . StackModule sm = org . apache . ambari . server . stack . StackModuleTest . createStackModule ( "FooBar" , "2.4" , com . google . common . base . Optional . absent ( ) , com . google . common . collect . Lists . newArrayList ( repoInfo ( "bar" , "2.0.1" , "http://bar.org" , "centos6" ) ) , com . google . common . collect . Lists . newArrayList ( repoInfo ( "bar" , "2.0.1" , "http://bar.org" , "centos7" ) ) ) ; java . util . List < java . lang . String > servicesWithNoConfigs = sm . getModuleInfo ( ) . getServicesWithNoConfigs ( ) ; "<AssertPlaceHolder>" ; } size ( ) { java . util . Set < java . lang . String > nodes = new java . util . HashSet < java . lang . String > ( ) ; for ( org . apache . ambari . eventdb . model . WorkflowDag . WorkflowDagEntry entry : entries ) { nodes . add ( entry . getSource ( ) ) ; nodes . addAll ( entry . getTargets ( ) ) ; } return nodes . size ( ) ; }
org . junit . Assert . assertEquals ( servicesWithNoConfigs . size ( ) , 0 )
testAfter_before ( ) { final org . apache . rya . api . function . temporal . AfterTemporalInstant function = new org . apache . rya . api . function . temporal . AfterTemporalInstant ( ) ; final org . eclipse . rdf4j . model . Value [ ] args = new org . eclipse . rdf4j . model . Value [ 2 ] ; args [ 0 ] = org . apache . rya . api . function . temporal . AfterTemporalFunctionsTest . VF . createLiteral ( org . apache . rya . api . function . temporal . AfterTemporalFunctionsTest . TIME . toString ( ) ) ; args [ 1 ] = org . apache . rya . api . function . temporal . AfterTemporalFunctionsTest . VF . createLiteral ( org . apache . rya . api . function . temporal . AfterTemporalFunctionsTest . TIME_10 . toString ( ) ) ; final org . eclipse . rdf4j . model . Value rez = function . evaluate ( org . apache . rya . api . function . temporal . AfterTemporalFunctionsTest . VF , args ) ; "<AssertPlaceHolder>" ; } evaluate ( org . eclipse . rdf4j . model . ValueFactory , org . eclipse . rdf4j . model . Value [ ] ) { if ( ( args . length ) != 2 ) { throw new org . eclipse . rdf4j . query . algebra . evaluation . ValueExprEvaluationException ( ( ( ( getURI ( ) ) + "<sp>requires<sp>exactly<sp>2<sp>arguments,<sp>got<sp>" ) + ( args . length ) ) ) ; } final java . lang . String [ ] strInterval = args [ 1 ] . stringValue ( ) . split ( "/" ) ; if ( ( strInterval . length ) != 2 ) { throw new org . eclipse . rdf4j . query . algebra . evaluation . ValueExprEvaluationException ( ( ( ( ( getURI ( ) ) + "<sp>requires<sp>the<sp>second<sp>argument:<sp>" ) + ( args [ 1 ] ) ) + "<sp>to<sp>be<sp>2<sp>dates<sp>seperated<sp>by<sp>a<sp>\'/\'" ) ) ; } try { final java . time . ZonedDateTime date1 = java . time . ZonedDateTime . parse ( args [ 0 ] . stringValue ( ) ) ; final java . time . ZonedDateTime [ ] interval = new java . time . ZonedDateTime [ ] { java . time . ZonedDateTime . parse ( strInterval [ 0 ] ) , java . time . ZonedDateTime . parse ( strInterval [ 1 ] ) } ; final boolean result = relation ( date1 , interval ) ; return valueFactory . createLiteral ( result ) ; } catch ( final java . time . format . DateTimeParseException e ) { throw new org . eclipse . rdf4j . query . algebra . evaluation . ValueExprEvaluationException ( "Date/Times<sp>provided<sp>must<sp>be<sp>of<sp>the<sp>ISO-8601<sp>format.<sp>Example:<sp>2007-04-05T14:30Z" ) ; } }
org . junit . Assert . assertEquals ( org . apache . rya . api . function . temporal . AfterTemporalFunctionsTest . VF . createLiteral ( false ) , rez )
testSpecialCase ( ) { org . spf4j . io . PipedOutputStreamTest . test ( "101" , 2 , true ) ; "<AssertPlaceHolder>" ; } test ( java . lang . String , int , boolean ) { final org . spf4j . io . PipedOutputStream pos = new org . spf4j . io . PipedOutputStream ( buffSize ) ; final java . io . InputStream pis ; if ( buffered ) { pis = new org . spf4j . io . MemorizingBufferedInputStream ( pos . getInputStream ( ) ) ; } else { pis = pos . getInputStream ( ) ; } DefaultExecutor . INSTANCE . execute ( new org . spf4j . base . AbstractRunnable ( ) { @ org . spf4j . io . Override public void doRun ( ) throws org . spf4j . io . Exception { try ( java . io . OutputStream os = pos ) { final byte [ ] utf8 = org . spf4j . base . Strings . toUtf8 ( testStr ) ; os . write ( utf8 [ 0 ] ) ; os . write ( utf8 , 1 , ( ( utf8 . length ) - 1 ) ) ; } } } ) ; java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; try ( java . io . InputStream is = pis ) { byte [ ] buffer = new byte [ 1024 ] ; int read ; while ( ( read = is . read ( buffer ) ) > 0 ) { sb . append ( org . spf4j . base . Strings . fromUtf8 ( buffer , 0 , read ) ) ; } } org . junit . Assert . assertEquals ( ( ( ( "buffSize<sp>=<sp>" + buffSize ) + ",<sp>buffered<sp>=<sp>" ) + buffered ) , testStr , sb . toString ( ) ) ; }
org . junit . Assert . assertTrue ( true )
whenNameSet_buildLocation ( ) { com . graphhopper . jsprit . core . problem . Location l = Location . Builder . newInstance ( ) . setName ( "mystreet<sp>6a" ) . setIndex ( 1 ) . build ( ) ; "<AssertPlaceHolder>" ; } getName ( ) { return null ; }
org . junit . Assert . assertEquals ( "mystreet<sp>6a" , l . getName ( ) )
testTrain_RegressionDataSet_ExecutorService ( ) { System . out . println ( "train" ) ; jsat . regression . RegressionDataSet trainSet = jsat . FixedProblems . getSimpleRegression1 ( 2000 , jsat . utils . random . RandomUtil . getRandom ( ) ) ; jsat . regression . RegressionDataSet testSet = jsat . FixedProblems . getSimpleRegression1 ( 200 , jsat . utils . random . RandomUtil . getRandom ( ) ) ; for ( jsat . classifiers . neuralnetwork . RBFNet . Phase1Learner p1l : RBFNet . Phase1Learner . values ( ) ) for ( jsat . classifiers . neuralnetwork . RBFNet . Phase2Learner p2l : java . util . EnumSet . complementOf ( java . util . EnumSet . of ( RBFNet . Phase2Learner . CLOSEST_OPPOSITE_CENTROID ) ) ) { jsat . classifiers . neuralnetwork . RBFNet net = new jsat . classifiers . neuralnetwork . RBFNet ( 25 ) ; net . setAlpha ( 1 ) ; net . setPhase1Learner ( p1l ) ; net . setPhase2Learner ( p2l ) ; net = net . clone ( ) ; net . train ( trainSet , true ) ; net = net . clone ( ) ; double errors = 0 ; for ( int i = 0 ; i < ( testSet . size ( ) ) ; i ++ ) errors += java . lang . Math . pow ( ( ( testSet . getTargetValue ( i ) ) - ( net . regress ( testSet . getDataPoint ( i ) ) ) ) , 2 ) ; "<AssertPlaceHolder>" ; } } size ( ) { return datapoints . size ( ) ; }
org . junit . Assert . assertTrue ( ( ( errors / ( testSet . size ( ) ) ) < 1 ) )
iremove7 ( ) { org . roaringbitmap . buffer . MappeableContainer rc = new org . roaringbitmap . buffer . MappeableRunContainer ( ) ; rc . iadd ( 0 , 10 ) ; rc . iremove ( 0 , 15 ) ; "<AssertPlaceHolder>" ; } getCardinality ( ) { return ( ( int ) ( getLongCardinality ( ) ) ) ; }
org . junit . Assert . assertEquals ( 0 , rc . getCardinality ( ) )
test1 ( ) { "<AssertPlaceHolder>" ; } getByCode ( java . lang . String ) { return com . neovisionaries . i18n . LanguageAlpha3Code . getByCode ( code , true ) ; }
org . junit . Assert . assertNull ( com . neovisionaries . i18n . LanguageAlpha3Code . getByCode ( null ) )
testListWithDefaultFormattedDates ( ) { java . lang . String uriTemplate = "http://dummy/default/persons" ; java . nio . file . Path expectedResultFilePath = java . nio . file . Paths . get ( com . epimorphics . lda . tests . TestJSONFormatterUsesISOFormatting . TEST_BASE , "testPersonListWithDefaultFormattedDates.json" ) ; Cache . Registry . clearAll ( ) ; com . epimorphics . lda . support . MultiMap < java . lang . String , java . lang . String > bindings = new com . epimorphics . lda . support . MultiMap < java . lang . String , java . lang . String > ( ) ; com . epimorphics . lda . core . APIEndpoint ep = tester . router . getMatch ( uriTemplate , bindings ) . getEndpoint ( ) ; com . epimorphics . lda . core . APIResultSet rs = tester . runQuery ( uriTemplate , "" ) ; com . epimorphics . lda . renderers . Renderer r = ep . getRendererByType ( MediaType . APPLICATION_JSON ) ; com . epimorphics . lda . support . Times times = new com . epimorphics . lda . support . Times ( ) ; com . epimorphics . lda . renderers . Renderer . BytesOut response = r . render ( times , ep . getSpec ( ) . getBindings ( ) . copy ( ) , new java . util . HashMap < java . lang . String , java . lang . String > ( ) , rs ) ; java . io . ByteArrayOutputStream baos = new java . io . ByteArrayOutputStream ( ) ; response . writeAll ( times , baos ) ; java . lang . String expected = new java . lang . String ( java . nio . file . Files . readAllBytes ( expectedResultFilePath ) ) ; java . lang . String actual = baos . toString ( ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( ( ( ( "(" + ( L ) ) + "<sp>" ) + ( op ) ) + "<sp>" ) + ( R ) ) + ")" ; }
org . junit . Assert . assertEquals ( expected , actual )
shouldCreateWhiteMana ( ) { mage . Mana mana = mage . Mana . WhiteMana ( 1 ) ; "<AssertPlaceHolder>" ; } getWhite ( ) { return white ; }
org . junit . Assert . assertEquals ( 1 , mana . getWhite ( ) )
shouldNotValidate_singleCondition ( ) { java . lang . String assertion = "'toto'<sp>==<sp>'tata'" ; io . gravitee . gateway . services . healthcheck . eval . assertion . AssertionEvaluation evaluation = new io . gravitee . gateway . services . healthcheck . eval . assertion . AssertionEvaluation ( assertion ) ; boolean result = evaluation . validate ( ) ; "<AssertPlaceHolder>" ; } validate ( ) { try { final org . springframework . expression . ExpressionParser parser = new org . springframework . expression . spel . standard . SpelExpressionParser ( ) ; final org . springframework . expression . Expression expr = parser . parseExpression ( assertion ) ; final org . springframework . expression . spel . support . StandardEvaluationContext context = new org . springframework . expression . spel . support . StandardEvaluationContext ( ) ; context . registerFunction ( "jsonPath" , org . springframework . beans . BeanUtils . resolveSignature ( "evaluate" , io . gravitee . el . spel . function . JsonPathFunction . class ) ) ; context . setVariables ( variables ) ; return expr . getValue ( context , boolean . class ) ; } catch ( org . springframework . expression . spel . SpelEvaluationException spelex ) { throw new io . gravitee . gateway . services . healthcheck . eval . EvaluationException ( ( "Assertion<sp>can<sp>not<sp>be<sp>verified<sp>:<sp>" + ( assertion ) ) , spelex ) ; } }
org . junit . Assert . assertFalse ( result )
getNextExecution_shouldGetTheCorrectRepeatInterval ( ) { java . util . Calendar startTime = java . util . Calendar . getInstance ( ) ; java . lang . Long repeatInterval = ( ( long ) ( 4 * 60 ) ) ; org . openmrs . scheduler . TaskDefinition taskDefinition = new org . openmrs . scheduler . TaskDefinition ( ) ; taskDefinition . setStartTime ( startTime . getTime ( ) ) ; taskDefinition . setRepeatInterval ( repeatInterval ) ; startTime . add ( Calendar . MINUTE , 4 ) ; java . util . Date nextTime = org . openmrs . scheduler . SchedulerUtil . getNextExecution ( taskDefinition ) ; "<AssertPlaceHolder>" ; } getNextExecution ( org . openmrs . scheduler . TaskDefinition ) { java . util . Calendar nextTime = java . util . Calendar . getInstance ( ) ; try { java . util . Date firstTime = taskDefinition . getStartTime ( ) ; if ( firstTime != null ) { java . util . Date currentTime = new java . util . Date ( ) ; if ( firstTime . after ( currentTime ) ) { return firstTime ; } long repeatInterval = taskDefinition . getRepeatInterval ( ) ; if ( repeatInterval == 0 ) { return firstTime ; } long betweenTime = ( currentTime . getTime ( ) ) - ( firstTime . getTime ( ) ) ; long lastTime = betweenTime % ( repeatInterval * 1000 ) ; long additional = ( repeatInterval * 1000 ) - lastTime ; nextTime . setTime ( new java . util . Date ( ( ( currentTime . getTime ( ) ) + additional ) ) ) ; org . openmrs . scheduler . SchedulerUtil . log . debug ( ( ( ( "The<sp>task<sp>" + ( taskDefinition . getName ( ) ) ) + "<sp>will<sp>start<sp>at<sp>" ) + ( nextTime . getTime ( ) ) ) ) ; } } catch ( java . lang . Exception e ) { org . openmrs . scheduler . SchedulerUtil . log . error ( ( "Failed<sp>to<sp>get<sp>next<sp>execution<sp>time<sp>for<sp>" + ( taskDefinition . getName ( ) ) ) , e ) ; } return nextTime . getTime ( ) ; }
org . junit . Assert . assertEquals ( startTime . getTime ( ) , nextTime )
testBuildEffectiveAuthorization_Same ( ) { de . persosim . simulator . protocols . ta . Authorization auth1 = new de . persosim . simulator . protocols . ta . Authorization ( field1 ) ; de . persosim . simulator . protocols . ta . Authorization auth2 = new de . persosim . simulator . protocols . ta . Authorization ( field1 ) ; de . persosim . simulator . protocols . ta . Authorization effectiveAuth = auth1 . buildEffectiveAuthorization ( auth2 ) ; "<AssertPlaceHolder>" ; } buildEffectiveAuthorization ( de . persosim . simulator . protocols . ta . Authorization ) { de . persosim . simulator . utils . BitField newAuthorization = authorization . getAuthorization ( ) ; de . persosim . simulator . utils . BitField effectiveAuth = newAuthorization . and ( this . authorization ) ; if ( ( this . authorization . getNumberOfBits ( ) ) != ( newAuthorization . getNumberOfBits ( ) ) ) { log ( this . getClass ( ) , "updating<sp>authorizations<sp>of<sp>different<sp>length" , LogLevel . WARN ) ; } return new de . persosim . simulator . protocols . ta . Authorization ( effectiveAuth ) ; }
org . junit . Assert . assertEquals ( auth1 , effectiveAuth )
testDateParsing ( ) { java . lang . String start = "1970-01-01T05:00:00Z" ; java . util . Date date = toDate ( start ) ; "<AssertPlaceHolder>" ; print ( date . toString ( ) ) ; } toDate ( java . lang . String ) { java . text . SimpleDateFormat input_format = new java . text . SimpleDateFormat ( "yyyy-MM-dd'T'HH:mm:ss'Z'" ) ; try { java . util . Date date = input_format . parse ( strDate ) ; return date ; } catch ( java . text . ParseException e ) { logger . error ( e ) ; } return null ; }
org . junit . Assert . assertTrue ( ( date != null ) )
testGetCar ( ) { org . springframework . context . support . ClassPathXmlApplicationContext ctx = new org . springframework . context . support . ClassPathXmlApplicationContext ( "com/brianway/learning/spring/ioc/factorybean/beans-factorybean.xml" ) ; com . brianway . learning . spring . ioc . factorybean . Car car1 = ( ( com . brianway . learning . spring . ioc . factorybean . Car ) ( ctx . getBean ( "car" ) ) ) ; com . brianway . learning . spring . ioc . factorybean . Car car2 = ( ( com . brianway . learning . spring . ioc . factorybean . Car ) ( ctx . getBean ( "car" ) ) ) ; System . out . println ( car1 ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertTrue ( ( car1 == car2 ) )
testGetScannerAndAppender ( ) { org . apache . tajo . catalog . Schema schema = new org . apache . tajo . catalog . Schema ( ) ; schema . addColumn ( "id" , TajoDataTypes . Type . INT4 ) ; schema . addColumn ( "age" , TajoDataTypes . Type . INT4 ) ; schema . addColumn ( "name" , TajoDataTypes . Type . TEXT ) ; org . apache . tajo . catalog . TableMeta meta = org . apache . tajo . catalog . CatalogUtil . newTableMeta ( CatalogProtos . StoreType . CSV ) ; org . apache . tajo . storage . v2 . Tuple [ ] tuples = new org . apache . tajo . storage . v2 . Tuple [ 4 ] ; for ( int i = 0 ; i < ( tuples . length ) ; i ++ ) { tuples [ i ] = new org . apache . tajo . storage . v2 . VTuple ( 3 ) ; tuples [ i ] . put ( new org . apache . tajo . datum . Datum [ ] { org . apache . tajo . datum . DatumFactory . createInt4 ( i ) , org . apache . tajo . datum . DatumFactory . createInt4 ( ( i + 32 ) ) , org . apache . tajo . datum . DatumFactory . createText ( ( "name" + i ) ) } ) ; } org . apache . hadoop . fs . Path path = org . apache . tajo . storage . v2 . StorageUtil . concatPath ( testDir , "testGetScannerAndAppender" , "table.csv" ) ; fs . mkdirs ( path . getParent ( ) ) ; org . apache . tajo . storage . v2 . Appender appender = org . apache . tajo . storage . v2 . StorageManagerFactory . getStorageManager ( conf ) . getAppender ( meta , schema , path ) ; appender . init ( ) ; for ( org . apache . tajo . storage . v2 . Tuple t : tuples ) { appender . addTuple ( t ) ; } appender . close ( ) ; org . apache . tajo . storage . v2 . Scanner scanner = org . apache . tajo . storage . v2 . StorageManagerFactory . getStorageManager ( conf ) . getFileScanner ( meta , schema , path ) ; scanner . init ( ) ; int i = 0 ; org . apache . tajo . storage . v2 . Tuple tuple = null ; while ( ( tuple = scanner . next ( ) ) != null ) { i ++ ; } "<AssertPlaceHolder>" ; } next ( ) { try { if ( ( totalRow ) <= 0 ) { return false ; } cur = nextTuple ( ) ; ( curRow ) ++ ; if ( ( cur ) != null ) { return true ; } } catch ( java . io . IOException e ) { throw new org . apache . tajo . jdbc . SQLException ( e . getMessage ( ) ) ; } return false ; }
org . junit . Assert . assertEquals ( 4 , i )
testGetActiveTreatmentNoAttributes ( ) { final io . rtr . alchemy . identities . Identity identity = mock ( io . rtr . alchemy . identities . Identity . class ) ; doReturn ( io . rtr . alchemy . identities . AttributesMap . empty ( ) ) . when ( identity ) . computeAttributes ( ) ; final io . rtr . alchemy . models . Experiment exp = experiments . create ( "exp" ) . addTreatment ( "control" ) . allocate ( "control" , 100 ) . setFilter ( io . rtr . alchemy . filtering . FilterExpression . of ( "baz" ) ) . activate ( ) . save ( ) ; doReturn ( com . google . common . collect . ImmutableMap . of ( "exp" , exp ) ) . when ( cache ) . getActiveExperiments ( ) ; "<AssertPlaceHolder>" ; } getActiveTreatment ( java . lang . String , io . rtr . alchemy . dto . identities . IdentityDto ) { return resource ( io . rtr . alchemy . client . AlchemyClient . ENDPOINT_ACTIVE_TREATMENT , com . google . common . collect . ImmutableMap . of ( io . rtr . alchemy . client . AlchemyClient . PARAM_EXPERIMENT_NAME , experimentName ) ) . post ( io . rtr . alchemy . dto . models . TreatmentDto . class , identity ) ; }
org . junit . Assert . assertNull ( experiments . getActiveTreatment ( "exp" , identity ) )
testGetTitle ( ) { classUnderTest . setTitle ( "aTestString" ) ; "<AssertPlaceHolder>" ; } getTitle ( ) { return org . firebirdsql . squirrel . tab . IndexInfoTab . s_stringMgr . getString ( "IndexInfoTab.title" ) ; }
org . junit . Assert . assertEquals ( "aTestString" , classUnderTest . getTitle ( ) )
testGetStringBundler ( ) { com . liferay . petra . io . unsync . UnsyncStringWriter unsyncStringWriter = new com . liferay . petra . io . unsync . UnsyncStringWriter ( true ) ; com . liferay . petra . string . StringBundler stringBundler = ( ( com . liferay . petra . string . StringBundler ) ( com . liferay . petra . io . unsync . UnsyncStringWriterTest . _stringBundlerField . get ( unsyncStringWriter ) ) ) ; "<AssertPlaceHolder>" ; } getStringBundler ( ) { return _stringBundler ; }
org . junit . Assert . assertSame ( stringBundler , unsyncStringWriter . getStringBundler ( ) )
testKnownPaths ( ) { com . cloudera . labs . envelope . validate . Validation v = new com . cloudera . labs . envelope . validate . FilesystemPathAccessibleValidation ( "hello" ) ; "<AssertPlaceHolder>" ; } getKnownPaths ( ) { return com . google . common . collect . Sets . newHashSet ( ) ; }
org . junit . Assert . assertEquals ( com . google . common . collect . Sets . newHashSet ( "hello" ) , v . getKnownPaths ( ) )
copyRAINoOutputTest ( ) { @ net . imagej . ops . copy . SuppressWarnings ( "unchecked" ) net . imglib2 . RandomAccessibleInterval < net . imglib2 . type . numeric . real . DoubleType > output = ( ( net . imglib2 . RandomAccessibleInterval < net . imglib2 . type . numeric . real . DoubleType > ) ( ops . run ( net . imagej . ops . copy . CopyII . class , input ) ) ) ; net . imglib2 . Cursor < net . imglib2 . type . numeric . real . DoubleType > inc = input . localizingCursor ( ) ; net . imglib2 . RandomAccess < net . imglib2 . type . numeric . real . DoubleType > outRA = output . randomAccess ( ) ; while ( inc . hasNext ( ) ) { inc . fwd ( ) ; outRA . setPosition ( inc ) ; "<AssertPlaceHolder>" ; } } get ( ) { for ( int d = 0 ; d < ( position . length ) ; d ++ ) { blockPos [ d ] = ( position [ d ] ) / ( blockSize [ d ] ) ; blockOffset [ d ] = ( position [ d ] ) % ( blockSize [ d ] ) ; } final int blockIndex = net . imglib2 . util . IntervalIndexer . positionToIndex ( blockPos , blockDims ) ; final int shuffledBlockIndex = blockIndices [ blockIndex ] ; net . imglib2 . util . IntervalIndexer . indexToPosition ( shuffledBlockIndex , blockDims , shuffledBlockPos ) ; for ( int d = 0 ; d < ( position . length ) ; d ++ ) { final long pd = ( ( shuffledBlockPos [ d ] ) * ( blockSize [ d ] ) ) + ( blockOffset [ d ] ) ; imageRA . setPosition ( pd , d ) ; } return imageRA . get ( ) ; }
org . junit . Assert . assertEquals ( inc . get ( ) . get ( ) , outRA . get ( ) . get ( ) , 0.0 )
testGetRelatedSuggestionsWithEmptyList ( ) { setUpSearchedKeywords ( "q" , "a<sp>b" ) ; java . util . List < com . liferay . portal . search . web . internal . suggestions . display . context . SuggestionDisplayContext > suggestionDisplayContexts = buildRelatedQueriesSuggestions ( java . util . Collections . emptyList ( ) ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return _portalCacheListeners . isEmpty ( ) ; }
org . junit . Assert . assertTrue ( suggestionDisplayContexts . isEmpty ( ) )
canCreateMigrationPlanFromTenantToNoTenant ( ) { org . camunda . bpm . engine . repository . ProcessDefinition sharedDefinition = testHelper . deployAndGetDefinition ( ProcessModels . ONE_TASK_PROCESS ) ; org . camunda . bpm . engine . repository . ProcessDefinition tenantDefinition = testHelper . deployForTenantAndGetDefinition ( org . camunda . bpm . engine . test . api . multitenancy . MultiTenancyMigrationTest . TENANT_ONE , ProcessModels . ONE_TASK_PROCESS ) ; org . camunda . bpm . engine . migration . MigrationPlan migrationPlan = engineRule . getRuntimeService ( ) . createMigrationPlan ( tenantDefinition . getId ( ) , sharedDefinition . getId ( ) ) . mapEqualActivities ( ) . build ( ) ; "<AssertPlaceHolder>" ; } build ( ) { return migrationPlan ; }
org . junit . Assert . assertNotNull ( migrationPlan )
generateDateOfBirthShouldGenerateValidDates ( ) { org . mafagafogigante . dungeon . date . Date now = new org . mafagafogigante . dungeon . date . Date ( 1000 , 1 , 1 ) ; for ( int age = 0 ; age < 100 ; age ++ ) { org . mafagafogigante . dungeon . entity . creatures . DateOfBirthGenerator dateOfBirthGenerator = new org . mafagafogigante . dungeon . entity . creatures . DateOfBirthGenerator ( now , age ) ; for ( int i = 0 ; i < 100 ; i ++ ) { org . mafagafogigante . dungeon . date . Date dateOfBirth = dateOfBirthGenerator . generateDateOfBirth ( ) ; org . mafagafogigante . dungeon . date . Duration duration = new org . mafagafogigante . dungeon . date . Duration ( dateOfBirth , now ) ; long maximumSeconds = ( age + 1 ) * ( DungeonTimeUnit . YEAR . as ( DungeonTimeUnit . SECOND ) ) ; "<AssertPlaceHolder>" ; } } } getSeconds ( ) { return ( duration ) / 1000 ; }
org . junit . Assert . assertTrue ( ( ( duration . getSeconds ( ) ) < maximumSeconds ) )
testDeselectWithWrongIndex ( ) { combo . add ( "item1" ) ; combo . add ( "item2" ) ; combo . add ( "item3" ) ; combo . select ( 1 ) ; combo . deselect ( 0 ) ; "<AssertPlaceHolder>" ; } getSelectionIndex ( ) { checkWidget ( ) ; int result = - 1 ; if ( cellSelectionEnabled ) { if ( ( selectedCells . size ( ) ) != 0 ) { result = selectedCells . get ( 0 ) . y ; } } else { if ( ( selectedItems . size ( ) ) != 0 ) { result = items . indexOf ( selectedItems . get ( 0 ) ) ; } } return result ; }
org . junit . Assert . assertEquals ( 1 , combo . getSelectionIndex ( ) )
when_setAllDatasets_then_insituFilterActive ( ) { org . n52 . io . request . IoParameters parameters = org . n52 . io . request . IoParameters . createDefaults ( ) ; org . n52 . io . request . FilterResolver resolver = createResolver ( parameters ) ; "<AssertPlaceHolder>" ; } hasInsituFilter ( ) { return ( parameters . getInsitu ( ) ) != null ; }
org . junit . Assert . assertFalse ( resolver . hasInsituFilter ( ) )
testGetBodyLength ( ) { org . apache . rocketmq . jms . domain . message . JmsBytesMessage bytesMessage = new org . apache . rocketmq . jms . domain . message . JmsBytesMessage ( receiveData ) ; System . out . println ( bytesMessage . getBodyLength ( ) ) ; "<AssertPlaceHolder>" ; } getBodyLength ( ) { return getData ( ) . length ; }
org . junit . Assert . assertEquals ( bytesMessage . getBodyLength ( ) , receiveData . length )
testComplexTypes ( ) { com . amazonaws . mobileconnectors . dynamodbv2 . dynamodbmapper . DynamoDBMapper util = new com . amazonaws . mobileconnectors . dynamodbv2 . dynamodbmapper . DynamoDBMapper ( dynamo ) ; com . amazonaws . mobileconnectors . dynamodbv2 . dynamodbmapper . ComplexTypeIntegrationTest . ComplexClass obj = getUniqueObject ( ) ; util . save ( obj ) ; com . amazonaws . mobileconnectors . dynamodbv2 . dynamodbmapper . ComplexTypeIntegrationTest . ComplexClass loaded = util . load ( com . amazonaws . mobileconnectors . dynamodbv2 . dynamodbmapper . ComplexTypeIntegrationTest . ComplexClass . class , obj . getKey ( ) ) ; "<AssertPlaceHolder>" ; } getKey ( ) { return key ; }
org . junit . Assert . assertEquals ( obj , loaded )
extractFromPage229 ( ) { if ( ( this . getClass ( ) ) != ( com . itextpdf . layout . SimpleTextExtractionStrategyTest . class ) ) return ; com . itextpdf . kernel . pdf . PdfDocument pdfDocument = new com . itextpdf . kernel . pdf . PdfDocument ( new com . itextpdf . kernel . pdf . PdfReader ( ( ( com . itextpdf . layout . SimpleTextExtractionStrategyTest . sourceFolder ) + "page229.pdf" ) ) ) ; java . lang . String text1 = com . itextpdf . kernel . pdf . canvas . parser . PdfTextExtractor . getTextFromPage ( pdfDocument . getPage ( 1 ) , new com . itextpdf . kernel . pdf . canvas . parser . listener . SimpleTextExtractionStrategy ( ) ) ; java . lang . String text2 = com . itextpdf . kernel . pdf . canvas . parser . PdfTextExtractor . getTextFromPage ( pdfDocument . getPage ( 1 ) , new com . itextpdf . kernel . pdf . canvas . parser . listener . GlyphTextEventListener ( new com . itextpdf . kernel . pdf . canvas . parser . listener . SimpleTextExtractionStrategy ( ) ) ) ; pdfDocument . close ( ) ; "<AssertPlaceHolder>" ; } close ( ) { pdfDocument . close ( ) ; }
org . junit . Assert . assertEquals ( text1 , text2 )
testValueOf ( ) { for ( org . jscep . transaction . PkiStatus status : org . jscep . transaction . PkiStatus . values ( ) ) { "<AssertPlaceHolder>" ; } } valueOf ( int ) { for ( org . jscep . transaction . PkiStatus status : org . jscep . transaction . PkiStatus . values ( ) ) { if ( ( status . getValue ( ) ) == value ) { return status ; } } throw new java . lang . IllegalArgumentException ( ) ; }
org . junit . Assert . assertSame ( status , org . jscep . transaction . PkiStatus . valueOf ( status . getValue ( ) ) )
trackNeedsTobeEncodedToStandardInputMovExtensionOnlyMp4AllowedReturnsTrue ( ) { org . opencastproject . mediapackage . Track track = org . easymock . EasyMock . createMock ( org . opencastproject . mediapackage . Track . class ) ; org . easymock . EasyMock . expect ( track . getURI ( ) ) . andReturn ( new java . net . URI ( "http://mh-allinone.localdomain/files/mediapackage/4631bade-04ae-4369-a38f-63a9a0f2e5bf/9404c35b-9463-4932-ad88-0f7030c2448e/audio.mov" ) ) . anyTimes ( ) ; org . easymock . EasyMock . replay ( track ) ; boolean result = org . opencastproject . workflow . handler . composer . PartialImportWorkflowOperationHandler . trackNeedsTobeEncodedToStandard ( track , org . opencastproject . workflow . handler . composer . PartialImportWorkflowOperationHandlerTest . defaultExtensions ) ; "<AssertPlaceHolder>" ; } trackNeedsTobeEncodedToStandard ( org . opencastproject . mediapackage . Track , java . util . List ) { java . lang . String extension = org . apache . commons . io . FilenameUtils . getExtension ( track . getURI ( ) . toString ( ) ) ; for ( java . lang . String requiredExtension : requiredExtensions ) { if ( requiredExtension . equalsIgnoreCase ( extension ) ) { return false ; } } return true ; }
org . junit . Assert . assertTrue ( result )
testVisibility ( ) { org . jboss . shrinkwrap . api . spec . JavaArchive module = org . jboss . shrinkwrap . api . ShrinkWrap . create ( org . jboss . shrinkwrap . api . spec . JavaArchive . class , "biz.wiz.quiz-1.0.0.GA.car" ) ; module . addClasses ( biz . wiz . quiz . $module_ . class , biz . wiz . quiz . run_ . class ) ; java . io . File defaultFile = new java . io . File ( getRepo ( ) , "default/default.car" ) ; "<AssertPlaceHolder>" ; org . jboss . shrinkwrap . api . spec . JavaArchive lib = org . jboss . shrinkwrap . api . ShrinkWrap . create ( org . jboss . shrinkwrap . api . spec . JavaArchive . class , "default.car" ) ; org . jboss . shrinkwrap . api . importer . ZipImporter zipImporter = lib . as ( org . jboss . shrinkwrap . api . importer . ZipImporter . class ) ; zipImporter . importFrom ( defaultFile ) ; testArchive ( module , lib ) ; } getRepo ( ) { return new java . io . File ( getClass ( ) . getResource ( "/repo" ) . toURI ( ) ) ; }
org . junit . Assert . assertTrue ( defaultFile . exists ( ) )
containsCorrectFilterForOrientation1 ( ) { net . coobird . thumbnailator . tasks . io . URLImageSource source = new net . coobird . thumbnailator . tasks . io . URLImageSource ( new java . net . URL ( "file:test-resources/Exif/source_1.jpg" ) ) ; net . coobird . thumbnailator . ThumbnailParameter param = new net . coobird . thumbnailator . builders . ThumbnailParameterBuilder ( ) . size ( 20 , 20 ) . build ( ) ; source . setThumbnailParameter ( param ) ; source . read ( ) ; "<AssertPlaceHolder>" ; } getImageFilters ( ) { return filters ; }
org . junit . Assert . assertTrue ( param . getImageFilters ( ) . isEmpty ( ) )
defaultLastDownloadedWhenSingleAssetMarkedAsDownloaded ( ) { org . sonatype . nexus . repository . storage . Bucket bucket = createBucket ( org . sonatype . nexus . repository . search . DefaultComponentMetadataProducerTest . REPO_NAME ) ; org . sonatype . nexus . repository . storage . Component component = createDetachedComponent ( bucket , org . sonatype . nexus . repository . search . DefaultComponentMetadataProducerTest . GROUP , org . sonatype . nexus . repository . search . DefaultComponentMetadataProducerTest . NAME , org . sonatype . nexus . repository . search . DefaultComponentMetadataProducerTest . VERSION ) ; org . sonatype . nexus . repository . storage . Asset expected = createDetachedAsset ( bucket , org . sonatype . nexus . repository . search . DefaultComponentMetadataProducerTest . NAME , component ) ; expected . markAsDownloaded ( standardHours ( 12 ) ) ; java . lang . Iterable < org . sonatype . nexus . repository . storage . Asset > assets = newArrayList ( createDetachedAsset ( bucket , "asset1" , component ) , expected , createDetachedAsset ( bucket , "asset2" , component ) ) ; org . joda . time . DateTime actual = underTest . lastDownloaded ( assets ) . get ( ) ; "<AssertPlaceHolder>" ; } is ( java . lang . String ) { return org . sonatype . nexus . rapture . PasswordPlaceholder . VALUE . equals ( value ) ; }
org . junit . Assert . assertThat ( actual , org . hamcrest . Matchers . is ( expected . lastDownloaded ( ) ) )
testGoodName ( ) { org . apache . hadoop . conf . Configuration conf = new org . apache . hadoop . conf . Configuration ( ) ; java . lang . Class < ? > test = org . apache . hadoop . io . WritableName . getClass ( "long" , conf ) ; "<AssertPlaceHolder>" ; } getClass ( java . lang . String , org . apache . hadoop . conf . Configuration ) { java . lang . Class < ? > writableClass = org . apache . hadoop . io . WritableName . NAME_TO_CLASS . get ( name ) ; if ( writableClass != null ) return writableClass . asSubclass ( org . apache . hadoop . io . Writable . class ) ; try { return conf . getClassByName ( name ) ; } catch ( java . lang . ClassNotFoundException e ) { java . io . IOException newE = new java . io . IOException ( ( "WritableName<sp>can't<sp>load<sp>class:<sp>" + name ) ) ; newE . initCause ( e ) ; throw newE ; } }
org . junit . Assert . assertTrue ( ( test != null ) )
testAccessUpdateUserWithoutRights ( ) { net . maritimecloud . identityregistry . model . database . entities . User user = new net . maritimecloud . identityregistry . model . database . entities . User ( ) ; user . setMrn ( "urn:mrn:mcl:user:dma:thc" ) ; user . setFirstName ( "Thomas" ) ; user . setLastName ( "ROLE_SERVICE_ADMIN" 4 ) ; user . setEmail ( "thcc@dma.dk" ) ; user . setIdOrganization ( 1L ) ; java . lang . String userJson = serialize ( user ) ; net . maritimecloud . identityregistry . model . database . Organization org = spy ( net . maritimecloud . identityregistry . model . database . Organization . class ) ; org . setMrn ( "urn:mrn:mcl:org:dma" ) ; org . setAddress ( "Carl<sp>Jakobsensvej<sp>31,<sp>2500<sp>Valby" ) ; org . setCountry ( "Denmark" ) ; org . setUrl ( "http://dma.dk" ) ; org . setEmail ( "ROLE_SERVICE_ADMIN" 0 ) ; org . setName ( "ROLE_SERVICE_ADMIN" 1 ) ; java . util . Set < net . maritimecloud . identityregistry . model . database . IdentityProviderAttribute > identityProviderAttributes = new java . util . HashSet ( ) ; org . setIdentityProviderAttributes ( identityProviderAttributes ) ; org . keycloak . adapters . springsecurity . token . KeycloakAuthenticationToken auth = net . maritimecloud . identityregistry . controllers . TokenGenerator . generateKeycloakToken ( "urn:mrn:mcl:org:dma" , "ROLE_SERVICE_ADMIN" , "ROLE_SERVICE_ADMIN" 2 ) ; given ( this . organizationService . getOrganizationByMrn ( "urn:mrn:mcl:org:dma" ) ) . willReturn ( org ) ; given ( this . entityService . getByMrn ( "urn:mrn:mcl:user:dma:thc" ) ) . willReturn ( user ) ; when ( org . getId ( ) ) . thenReturn ( 1L ) ; try { mvc . perform ( put ( "ROLE_SERVICE_ADMIN" 3 ) . with ( authentication ( auth ) ) . header ( "ROLE_SERVICE_ADMIN" 5 , "bla" ) . content ( userJson ) . contentType ( "application/json" ) ) . andExpect ( status ( ) . isForbidden ( ) ) ; } catch ( java . lang . Exception e ) { e . printStackTrace ( ) ; "<AssertPlaceHolder>" ; } } getId ( ) { return id ; }
org . junit . Assert . assertTrue ( false )
testFindAll ( ) { org . oscarehr . common . model . SecPrivilege secPrivilege1 = new org . oscarehr . common . model . SecPrivilege ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( secPrivilege1 ) ; secPrivilege1 . setPrivilege ( "alpha" ) ; dao . persist ( secPrivilege1 ) ; org . oscarehr . common . model . SecPrivilege secPrivilege2 = new org . oscarehr . common . model . SecPrivilege ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( secPrivilege2 ) ; secPrivilege2 . setPrivilege ( "bravo" ) ; dao . persist ( secPrivilege2 ) ; org . oscarehr . common . model . SecPrivilege secPrivilege3 = new org . oscarehr . common . model . SecPrivilege ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( secPrivilege3 ) ; secPrivilege3 . setPrivilege ( "charlie" ) ; dao . persist ( secPrivilege3 ) ; java . util . List < org . oscarehr . common . model . SecPrivilege > expectedResult = new java . util . ArrayList < org . oscarehr . common . model . SecPrivilege > ( java . util . Arrays . asList ( secPrivilege1 , secPrivilege2 , secPrivilege3 ) ) ; java . util . List < org . oscarehr . common . model . SecPrivilege > result = dao . findAll ( ) ; org . apache . log4j . Logger logger = org . oscarehr . util . MiscUtils . getLogger ( ) ; for ( org . oscarehr . common . model . SecPrivilege item : result ) { logger . info ( ( "id:" + ( item . getId ( ) ) ) ) ; } if ( ( result . size ( ) ) != ( expectedResult . size ( ) ) ) { logger . warn ( "Array<sp>sizes<sp>do<sp>not<sp>match.<sp>Result:" ) ; org . junit . Assert . fail ( "Array<sp>sizes<sp>do<sp>not<sp>match." ) ; } for ( int i = 0 ; i < ( expectedResult . size ( ) ) ; i ++ ) { if ( ! ( expectedResult . get ( i ) . equals ( result . get ( i ) ) ) ) { logger . warn ( "Items<sp>do<sp>not<sp>match." ) ; org . junit . Assert . fail ( "Items<sp>do<sp>not<sp>match." ) ; } } "<AssertPlaceHolder>" ; } get ( java . lang . String ) { try { return terser . get ( path ) ; } catch ( ca . uhn . hl7v2 . HL7Exception e ) { oscar . oscarLab . ca . all . parsers . CLSHandler . logger . warn ( ( "Unable<sp>to<sp>get<sp>field<sp>at<sp>" + path ) , e ) ; return null ; } }
org . junit . Assert . assertTrue ( true )
testCreateKeyForMetricValuesByIpAndDate ( ) { java . lang . String actual = metricDAO . createKeyForMetricValuesByIpAndDate ( "someip" , java . lang . System . currentTimeMillis ( ) ) ; java . lang . String date = new java . text . SimpleDateFormat ( "ddMMyyyy" ) . format ( new java . util . Date ( java . lang . System . currentTimeMillis ( ) ) ) ; java . lang . String expected = ( "someip" + ( KEY_SEPARATOR ) ) + date ; "<AssertPlaceHolder>" ; } createKeyForMetricValuesByIpAndDate ( java . lang . String , long ) { java . lang . String date = org . ebayopensource . turmeric . monitoring . cassandra . storage . dao . impl . MetricsDAO . DATE_FORMATER . format ( new java . util . Date ( timestamp ) ) ; java . lang . String result = ( ipAddress + ( KEY_SEPARATOR ) ) + date ; return result ; }
org . junit . Assert . assertEquals ( expected , actual )
typedObjectFromDoubleAndDouble ( ) { com . pardot . rhombus . cobject . CField field = new com . pardot . rhombus . cobject . CField ( "test" , "double" ) ; java . lang . Double jsonValue = 1.2345678901234567E9 ; java . lang . Object result = com . pardot . rhombus . util . JsonUtil . typedObjectFromValueAndField ( jsonValue , field ) ; "<AssertPlaceHolder>" ; } typedObjectFromValueAndField ( java . lang . Object , com . pardot . rhombus . cobject . CField ) { try { return com . pardot . rhombus . util . JsonUtil . typedObjectFromValueAndFieldType ( jsonValue , field . getType ( ) ) ; } catch ( java . lang . IllegalArgumentException e ) { throw new java . lang . IllegalArgumentException ( ( ( ( ( ( ( ( "Field<sp>" + ( field . getName ( ) ) ) + ":<sp>Unable<sp>to<sp>convert<sp>" ) + jsonValue ) + "<sp>of<sp>type<sp>" ) + ( jsonValue . getClass ( ) ) ) + "<sp>to<sp>C*<sp>type<sp>" ) + ( field . getType ( ) . toString ( ) ) ) ) ; } }
org . junit . Assert . assertEquals ( jsonValue , result )
whenNoBreaks_thenGoThroughBlocks ( ) { java . lang . String animal = "DOG" ; "<AssertPlaceHolder>" ; } forgetBreakInSwitch ( java . lang . String ) { java . lang . String result ; switch ( animal ) { case "DOG" : System . out . println ( "domestic<sp>animal" ) ; result = "domestic<sp>animal" ; default : System . out . println ( "unknown<sp>animal" ) ; result = "unknown<sp>animal" ; } return result ; }
org . junit . Assert . assertEquals ( "unknown<sp>animal" , s . forgetBreakInSwitch ( animal ) )
testLocalRepoExplicit ( ) { java . util . Hashtable < java . lang . String , java . lang . Object > config = new java . util . Hashtable ( ) ; config . put ( "org.ops4j.pax.url.mvn.localRepository" , "foo/bar" ) ; "<AssertPlaceHolder>" ; } getLocalRepoFromConfig ( java . util . Dictionary ) { java . lang . String path = null ; if ( dict != null ) { path = ( ( java . lang . String ) ( dict . get ( "org.ops4j.pax.url.mvn.localRepository" ) ) ) ; if ( path == null ) { java . lang . String settings = ( ( java . lang . String ) ( dict . get ( "org.ops4j.pax.url.mvn.settings" ) ) ) ; if ( settings != null ) { path = org . apache . karaf . bundle . core . internal . MavenConfigService . getLocalRepositoryFromSettings ( new java . io . File ( settings ) ) ; } } } return path ; }
org . junit . Assert . assertEquals ( "foo/bar" , org . apache . karaf . bundle . core . internal . MavenConfigService . getLocalRepoFromConfig ( config ) )
parse ( ) { net . openhft . chronicle . wire . LongConverter c = Base95LongConverter . INSTANCE ; System . out . println ( c . asString ( ( - 1L ) ) ) ; for ( java . lang . String s : ",a,ab,abc,abcd,ab.de,123+56,1234567,12345678,123456789,z23456789,0z23456789,<8S@[|bcnB" . split ( "," ) ) { long v = c . parse ( s ) ; java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; c . append ( sb , v ) ; "<AssertPlaceHolder>" ; } } toString ( ) { return ( "ScalarStrategy<" + ( type . getName ( ) ) ) + ">" ; }
org . junit . Assert . assertEquals ( s , sb . toString ( ) )
shouldNotBeAnAdmin ( ) { org . candlepin . auth . UserPrincipal up = new org . candlepin . auth . UserPrincipal ( "notadmin" , null , false ) ; "<AssertPlaceHolder>" ; } hasFullAccess ( ) { return true ; }
org . junit . Assert . assertFalse ( up . hasFullAccess ( ) )
removeDriftTest_2d_WithGaps ( ) { de . biomedical_imaging . traJ . Trajectory t = new de . biomedical_imaging . traJ . Trajectory ( 2 ) ; de . biomedical_imaging . traJ . Trajectory tWithDrift = new de . biomedical_imaging . traJ . Trajectory ( 2 ) ; int z = 0 ; double [ ] drift = new double [ ] { 1 , 2 , 0 } ; for ( int i = 0 ; i < 100 ; i ++ ) { if ( ( ( i + 1 ) % 10 ) == 0 ) { t . add ( null ) ; tWithDrift . add ( null ) ; } else { t . add ( new org . scijava . vecmath . Point3d ( i , i , z ) ) ; tWithDrift . add ( new org . scijava . vecmath . Point3d ( ( i + ( i * ( drift [ 0 ] ) ) ) , ( i + ( i * ( drift [ 1 ] ) ) ) , z ) ) ; } } de . biomedical_imaging . traJ . drift . StaticDriftCorrector dcorr = new de . biomedical_imaging . traJ . drift . StaticDriftCorrector ( drift ) ; de . biomedical_imaging . traJ . Trajectory tCorrected = dcorr . removeDrift ( tWithDrift ) ; "<AssertPlaceHolder>" ; } getPositionsAsArray ( ) { double [ ] [ ] posAsArr = new double [ size ( ) ] [ 3 ] ; for ( int i = 0 ; i < ( size ( ) ) ; i ++ ) { if ( ( get ( i ) ) != null ) { posAsArr [ i ] [ 0 ] = get ( i ) . x ; posAsArr [ i ] [ 1 ] = get ( i ) . y ; posAsArr [ i ] [ 2 ] = get ( i ) . z ; } else { posAsArr [ i ] = null ; } } return posAsArr ; }
org . junit . Assert . assertArrayEquals ( t . getPositionsAsArray ( ) , tCorrected . getPositionsAsArray ( ) )
testGetValue_1 ( ) { com . impetus . ankush . agent . action . impl . Property fixture = new com . impetus . ankush . agent . action . impl . Property ( ) ; fixture . setDescription ( "" ) ; fixture . setName ( "" ) ; fixture . setValue ( "" ) ; java . lang . String result = fixture . getValue ( ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return value ; }
org . junit . Assert . assertEquals ( "" , result )
testExistingGetter ( ) { try { org . eclipse . xtend2 . lib . StringConcatenation _builder = new org . eclipse . xtend2 . lib . StringConcatenation ( ) ; _builder . append ( "class<sp>Foo<sp>{" ) ; _builder . newLine ( ) ; _builder . append ( "\t" ) ; _builder . append ( "@Property<sp>int<sp>foo" ) ; _builder . newLine ( ) ; _builder . append ( "\t" ) ; _builder . append ( "def<sp>getFoo()<sp>{" ) ; _builder . newLine ( ) ; _builder . append ( "\t\t" ) ; _builder . append ( "5" ) ; _builder . newLine ( ) ; _builder . append ( "\t" ) ; _builder . append ( "}" ) ; _builder . newLine ( ) ; _builder . append ( "}" ) ; _builder . newLine ( ) ; final org . eclipse . xtext . util . IAcceptor < org . eclipse . xtext . xbase . testing . CompilationTestHelper . Result > _function = ( org . eclipse . xtext . xbase . testing . CompilationTestHelper . Result it ) -> { try { final java . lang . Object instance = it . getCompiledClass ( ) . newInstance ( ) ; final java . lang . reflect . Method getFoo = it . getCompiledClass ( ) . getDeclaredMethod ( "getFoo" ) ; "<AssertPlaceHolder>" ; } catch ( _e ) { throw org . eclipse . xtext . xbase . lib . Exceptions . sneakyThrow ( org . eclipse . xtend . core . tests . compiler . _e ) ; } } ; this . compilationTestHelper . compile ( _builder , _function ) ; } catch ( java . lang . Throwable _e ) { throw org . eclipse . xtext . xbase . lib . Exceptions . sneakyThrow ( _e ) ; } } invoke ( org . eclipse . emf . mwe2 . runtime . workflow . IWorkflowContext ) { try { java . io . File directory = new java . io . File ( path ) ; if ( ! ( directory . exists ( ) ) ) throw new java . lang . RuntimeException ( path ) ; java . io . Writer writer = null ; try { java . io . File list = new java . io . File ( directory , fileName ) ; if ( ! ( list . exists ( ) ) ) list . createNewFile ( ) ; writer = new java . io . BufferedWriter ( new java . io . FileWriter ( list ) ) ; for ( java . io . File contained : directory . listFiles ( ) ) { if ( contained . isDirectory ( ) ) { appendFilesTo ( contained , writer , directory . toURI ( ) ) ; } } } finally { if ( writer != null ) writer . close ( ) ; } } catch ( java . io . IOException ioe ) { throw new java . lang . RuntimeException ( ioe ) ; } }
org . junit . Assert . assertEquals ( java . lang . Integer . valueOf ( 5 ) , getFoo . invoke ( instance ) )
testTimeoutResultAndTimeoutSetTooHigh ( ) { setupTask ( new com . sun . sgs . app . TransactionTimeoutException ( "timed<sp>out" ) ) ; org . easymock . EasyMock . expect ( task . getTryCount ( ) ) . andStubReturn ( ( ( NowOrLaterRetryPolicy . DEFAULT_RETRY_BACKOFF_THRESHOLD ) + 1 ) ) ; org . easymock . EasyMock . expect ( task . getTimeout ( ) ) . andStubReturn ( ( ( long ) ( ( ( Integer . MAX_VALUE ) / 2 ) + ( ( Integer . MAX_VALUE ) / 4 ) ) ) ) ; replayMocks ( ) ; com . sun . sgs . kernel . schedule . SchedulerRetryAction action = policy . getRetryAction ( task ) ; "<AssertPlaceHolder>" ; verifyMocks ( ) ; } getRetryAction ( com . sun . sgs . kernel . schedule . ScheduledTask ) { if ( task == null ) { throw new java . lang . IllegalArgumentException ( "task<sp>cannot<sp>be<sp>null" ) ; } java . lang . Throwable result = task . getLastFailure ( ) ; if ( result == null ) { throw new java . lang . IllegalStateException ( ( "task's<sp>last<sp>failure<sp>" + "cannot<sp>be<sp>null" ) ) ; } if ( ( result instanceof com . sun . sgs . app . ExceptionRetryStatus ) && ( ( ( com . sun . sgs . app . ExceptionRetryStatus ) ( result ) ) . shouldRetry ( ) ) ) { if ( ( task . getTryCount ( ) ) > ( retryBackoffThreshold ) ) { if ( ( result instanceof com . sun . sgs . app . TransactionTimeoutException ) && ( ( ( task . getTimeout ( ) ) * 2L ) < ( ( long ) ( Integer . MAX_VALUE ) ) ) ) { com . sun . sgs . impl . kernel . schedule . NowOrLaterRetryPolicy . logger . logThrow ( Level . WARNING , task . getLastFailure ( ) , ( "Task<sp>has<sp>been<sp>retried<sp>{0}<sp>times:<sp>{1}\n" + ( "Increasing<sp>its<sp>timeout<sp>to<sp>{2}<sp>ms<sp>and<sp>" + "scheduling<sp>its<sp>retry<sp>for<sp>later" ) ) , task . getTryCount ( ) , task , ( ( task . getTimeout ( ) ) * 2 ) ) ; task . setTimeout ( ( ( task . getTimeout ( ) ) * 2 ) ) ; } else { com . sun . sgs . impl . kernel . schedule . NowOrLaterRetryPolicy . logger . logThrow ( Level . WARNING , task . getLastFailure ( ) , ( "Task<sp>has<sp>been<sp>retried<sp>{0}<sp>times:<sp>{1}\n" + "scheduling<sp>its<sp>retry<sp>for<sp>later" ) , task . getTryCount ( ) , task ) ; } return com . sun . sgs . kernel . schedule . SchedulerRetryAction . RETRY_LATER ; } else { return com . sun . sgs . kernel . schedule . SchedulerRetryAction . RETRY_NOW ; } } else { if ( com . sun . sgs . impl . kernel . schedule . NowOrLaterRetryPolicy . logger . isLoggable ( Level . FINE ) ) { if ( task . isRecurring ( ) ) { com . sun . sgs . impl . kernel . schedule . NowOrLaterRetryPolicy . logger . log ( Level . FINE , ( "skipping<sp>a<sp>recurrence<sp>of<sp>a<sp>task<sp>because<sp>it<sp>" + "failed<sp>with<sp>a<sp>non-retryable<sp>exception:<sp>{0}" ) , task ) ; } else { com . sun . sgs . impl . kernel . schedule . NowOrLaterRetryPolicy . logger . log ( Level . FINE , ( "dropping<sp>a<sp>task<sp>because<sp>it<sp>failed<sp>with<sp>a<sp>" + "non-retryable<sp>exception:<sp>{0}" ) , task ) ; } } return com . sun . sgs . kernel . schedule . SchedulerRetryAction . DROP ; } }
org . junit . Assert . assertEquals ( SchedulerRetryAction . RETRY_LATER , action )
shouldReturnNullIfIntegerFieldIsNull ( ) { defaultEntity . setField ( com . qcadoo . model . internal . DefaultEntityTest . INTEGER_FIELD_NAME , null ) ; java . lang . Integer result = defaultEntity . getIntegerField ( com . qcadoo . model . internal . DefaultEntityTest . INTEGER_FIELD_NAME ) ; "<AssertPlaceHolder>" ; } getIntegerField ( java . lang . String ) { return entity . getIntegerField ( fieldName ) ; }
org . junit . Assert . assertNull ( result )
testGetWithHit ( ) { final edu . illinois . library . cantaloupe . image . Identifier identifier = new edu . illinois . library . cantaloupe . image . Identifier ( "jpg" ) ; final edu . illinois . library . cantaloupe . image . Info info = new edu . illinois . library . cantaloupe . image . Info ( ) ; instance . put ( identifier , info ) ; edu . illinois . library . cantaloupe . image . Info actualInfo = instance . get ( identifier ) ; "<AssertPlaceHolder>" ; } get ( java . util . UUID ) { return tasks . stream ( ) . filter ( ( t ) -> t . getUUID ( ) . equals ( uuid ) ) . findFirst ( ) . orElse ( null ) ; }
org . junit . Assert . assertEquals ( info , actualInfo )
testS13ClientSessionStartsIdleState ( ) { org . jdiameter . api . s13 . ClientS13Session session = getAppSession ( org . jdiameter . api . s13 . ClientS13Session . class , new org . jdiameter . common . impl . app . s13 . S13SessionFactoryImpl ( org . mobicents . diameter . stack . sessions . SessionsWithAppIdTest . sessionFactory ) , org . mobicents . diameter . stack . sessions . SessionsWithAppIdTest . S13_APPID ) ; org . jdiameter . common . api . app . s13 . S13SessionState state = session . getState ( org . jdiameter . common . api . app . s13 . S13SessionState . class ) ; "<AssertPlaceHolder>" ; } getState ( java . lang . Class ) { switch ( stack . getState ( ) ) { case IDLE : return ( ( E ) ( org . jdiameter . api . PeerState . DOWN ) ) ; case CONFIGURED : return ( ( E ) ( org . jdiameter . api . PeerState . INITIAL ) ) ; case STARTED : return ( ( E ) ( org . jdiameter . api . PeerState . OKAY ) ) ; case STOPPED : return ( ( E ) ( org . jdiameter . api . PeerState . SUSPECT ) ) ; } return ( ( E ) ( org . jdiameter . api . PeerState . DOWN ) ) ; }
org . junit . Assert . assertEquals ( state . IDLE , state )
validate_shouldPassValidationIfAllValuesPresent ( ) { org . openmrs . Obs obs = new org . openmrs . Obs ( ) ; obs . setPerson ( org . openmrs . api . context . Context . getPersonService ( ) . getPerson ( 2 ) ) ; obs . setConcept ( org . openmrs . api . context . Context . getConceptService ( ) . getConcept ( 5089 ) ) ; obs . setObsDatetime ( new java . util . Date ( ) ) ; obs . setValueNumeric ( 1.0 ) ; org . springframework . validation . Errors errors = new org . springframework . validation . BindException ( obs , "obs" ) ; obsValidator . validate ( obs , errors ) ; "<AssertPlaceHolder>" ; } hasErrors ( ) { return erroneous ; }
org . junit . Assert . assertFalse ( errors . hasErrors ( ) )
shouldBeSatisfiedByCorrectIngredients ( ) { com . manning . siia . kitchen . domain . Ingredient ingredient = mock ( com . manning . siia . kitchen . domain . Ingredient . class ) ; com . manning . siia . kitchen . domain . Product product = mock ( com . manning . siia . kitchen . domain . Product . class ) ; given ( ingredient . isSatisfiedBy ( product ) ) . willReturn ( true ) ; recipe . addIngredient ( ingredient ) ; "<AssertPlaceHolder>" ; } isSatisfiedBy ( java . util . List ) { java . util . Collection < com . manning . siia . kitchen . domain . Ingredient > unsatisfiedIngredients = findMissingIngredients ( products ) ; return unsatisfiedIngredients . isEmpty ( ) ; }
org . junit . Assert . assertThat ( recipe . isSatisfiedBy ( java . util . Arrays . asList ( product ) ) , org . hamcrest . Matchers . is ( true ) )
testGetValidatedEntityContextsNoEntitiesInList ( ) { org . slc . sli . api . config . EntityDefinition def = createEntityDef ( "student" ) ; org . slc . sli . domain . Entity student1 = createEntity ( "student" , 1 ) ; org . mockito . Mockito . when ( edOrgHelper . getDirectEdorgs ( org . mockito . Mockito . eq ( student1 ) ) ) . thenReturn ( new java . util . HashSet < java . lang . String > ( java . util . Arrays . asList ( "edOrg1" ) ) ) ; boolean isTransitive = false ; org . mockito . Mockito . when ( ownership . canAccess ( student1 , isTransitive ) ) . thenReturn ( true ) ; java . util . Collection < java . lang . String > ids = new java . util . HashSet < java . lang . String > ( ) ; java . util . Map < java . lang . String , org . slc . sli . api . util . SecurityUtil . UserContext > validatedEntityContexts = contextValidator . getValidatedEntityContexts ( def , new java . util . ArrayList < org . slc . sli . domain . Entity > ( ) , isTransitive , true ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return ( ( config ) == null ) || ( config . isEmpty ( ) ) ; }
org . junit . Assert . assertTrue ( validatedEntityContexts . isEmpty ( ) )
testSimpleLowerPriorityAddition ( ) { com . killeent . PriorityQueue . PriorityQueue < java . lang . String > heap = new com . killeent . PriorityQueue . Heap < java . lang . String > ( new com . killeent . HeapTest . StringComparator ( ) ) ; heap . add ( "b" ) ; heap . add ( "a" ) ; "<AssertPlaceHolder>" ; } peek ( ) { if ( ( start ) == ( free ) ) { return null ; } return queue [ start ] ; }
org . junit . Assert . assertEquals ( "a" , heap . peek ( ) )
testMultipleStages ( ) { final org . openimaj . hadoop . mapreduce . MultiStagedJob mjob = new org . openimaj . hadoop . mapreduce . MultiStagedJob ( initialFile . getAbsolutePath ( ) , outputFile . getAbsolutePath ( ) , new java . lang . String [ ] { } ) ; mjob . queueStage ( new org . openimaj . hadoop . mapreduce . stage . Stage < org . apache . hadoop . mapreduce . lib . input . TextInputFormat , org . apache . hadoop . mapreduce . lib . output . TextOutputFormat < org . apache . hadoop . io . NullWritable , org . apache . hadoop . io . Text > , org . apache . hadoop . io . LongWritable , org . apache . hadoop . io . Text , org . apache . hadoop . io . NullWritable , org . apache . hadoop . io . Text , org . apache . hadoop . io . NullWritable , org . apache . hadoop . io . Text > ( ) { @ org . openimaj . hadoop . mapreduce . Override public java . lang . String outname ( ) { return "countwords" ; } @ org . openimaj . hadoop . mapreduce . Override public java . lang . Class < ? extends org . apache . hadoop . mapreduce . Mapper < org . apache . hadoop . io . LongWritable , org . apache . hadoop . io . Text , org . apache . hadoop . io . NullWritable , org . apache . hadoop . io . Text > > mapper ( ) { return org . openimaj . hadoop . mapreduce . MultiStagedJobTest . CountWords . class ; } } ) ; mjob . queueStage ( new org . openimaj . hadoop . mapreduce . stage . Stage < org . apache . hadoop . mapreduce . lib . input . TextInputFormat , org . apache . hadoop . mapreduce . lib . output . TextOutputFormat < org . apache . hadoop . io . NullWritable , org . apache . hadoop . io . Text > , org . apache . hadoop . io . LongWritable , org . apache . hadoop . io . Text , org . apache . hadoop . io . NullWritable , org . apache . hadoop . io . Text , org . apache . hadoop . io . NullWritable , org . apache . hadoop . io . Text > ( ) { @ org . openimaj . hadoop . mapreduce . Override public java . lang . String outname ( ) { return "addone" ; } @ org . openimaj . hadoop . mapreduce . Override public java . lang . Class < ? extends org . apache . hadoop . mapreduce . Mapper < org . apache . hadoop . io . LongWritable , org . apache . hadoop . io . Text , org . apache . hadoop . io . NullWritable , org . apache . hadoop . io . Text > > mapper ( ) { return org . openimaj . hadoop . mapreduce . MultiStagedJobTest . AddOne . class ; } } ) ; System . out . println ( mjob . runAll ( ) ) ; final org . apache . hadoop . fs . Path [ ] countwordsp = mjob . getStagePaths ( "countwords" ) ; final org . apache . hadoop . fs . Path [ ] addonep = mjob . getStagePaths ( "addone" ) ; final org . apache . hadoop . fs . FileSystem fs = org . openimaj . hadoop . mapreduce . MultiStagedJobTest . getFileSystem ( countwordsp [ 0 ] . toUri ( ) ) ; final java . io . InputStream countstream = fs . open ( countwordsp [ 0 ] ) ; final java . io . InputStream addonestream = fs . open ( addonep [ 0 ] ) ; final java . lang . String [ ] clines = org . openimaj . io . FileUtils . readlines ( countstream ) ; final java . lang . String [ ] alines = org . openimaj . io . FileUtils . readlines ( addonestream ) ; for ( int i = 0 ; i < ( alines . length ) ; i ++ ) { final int cint = java . lang . Integer . parseInt ( clines [ i ] ) ; final int aint = java . lang . Integer . parseInt ( alines [ i ] ) ; "<AssertPlaceHolder>" ; } } readlines ( java . io . File ) { final java . io . BufferedReader br = new java . io . BufferedReader ( new java . io . InputStreamReader ( new java . io . FileInputStream ( file ) ) ) ; java . lang . String line = null ; final java . util . List < java . lang . String > allLines = new java . util . ArrayList < java . lang . String > ( ) ; while ( ( line = br . readLine ( ) ) != null ) { allLines . add ( line ) ; } br . close ( ) ; return allLines . toArray ( new java . lang . String [ allLines . size ( ) ] ) ; }
org . junit . Assert . assertTrue ( ( aint == ( cint + 1 ) ) )
test_getUrl ( ) { java . lang . String string = browser . getUrl ( ) ; "<AssertPlaceHolder>" ; } getUrl ( ) { if ( ( ( url ) == null ) || ( ( url . length ( ) ) == 0 ) ) return WebKit . ABOUT_BLANK ; return url ; }
org . junit . Assert . assertNotNull ( string )
testIsSpecMatchConfigSpecWithCurrentShapingPolicyDisabled ( ) { int currentNumPorts = 512 ; int currentvlanId = 100 ; boolean currentAutoExpand = true ; com . vmware . vim25 . DVSTrafficShapingPolicy currentTrafficShapingPolicy = new com . vmware . vim25 . DVSTrafficShapingPolicy ( ) ; com . vmware . vim25 . BoolPolicy currentIsEnabled = new com . vmware . vim25 . BoolPolicy ( ) ; currentIsEnabled . setValue ( false ) ; com . vmware . vim25 . VMwareDVSPortSetting currentVmwareDvsPortSetting = new com . vmware . vim25 . VMwareDVSPortSetting ( ) ; com . vmware . vim25 . VmwareDistributedVirtualSwitchVlanIdSpec currentVlanIdSpec = new com . vmware . vim25 . VmwareDistributedVirtualSwitchVlanIdSpec ( ) ; currentVlanIdSpec . setVlanId ( currentvlanId ) ; currentVmwareDvsPortSetting . setVlan ( currentVlanIdSpec ) ; currentTrafficShapingPolicy . setEnabled ( currentIsEnabled ) ; currentVmwareDvsPortSetting . setInShapingPolicy ( currentTrafficShapingPolicy ) ; when ( currentDvPortgroupInfo . getNumPorts ( ) ) . thenReturn ( currentNumPorts ) ; when ( currentDvPortgroupInfo . isAutoExpand ( ) ) . thenReturn ( currentAutoExpand ) ; when ( currentDvPortgroupInfo . getDefaultPortConfig ( ) ) . thenReturn ( currentVmwareDvsPortSetting ) ; int newNumPorts = 256 ; int newvlanId = 100 ; boolean newAutoExpand = true ; com . vmware . vim25 . DVSTrafficShapingPolicy newTrafficShapingPolicy = new com . vmware . vim25 . DVSTrafficShapingPolicy ( ) ; com . vmware . vim25 . BoolPolicy newIsEnabled = new com . vmware . vim25 . BoolPolicy ( ) ; newIsEnabled . setValue ( true ) ; com . vmware . vim25 . LongPolicy newAvgBw = new com . vmware . vim25 . LongPolicy ( ) ; newAvgBw . setValue ( 200L ) ; com . vmware . vim25 . LongPolicy newBurstSize = new com . vmware . vim25 . LongPolicy ( ) ; newBurstSize . setValue ( 400L ) ; com . vmware . vim25 . LongPolicy newPeakBw = new com . vmware . vim25 . LongPolicy ( ) ; newPeakBw . setValue ( 2000L ) ; com . vmware . vim25 . VMwareDVSPortSetting newVmwareDvsPortSetting = new com . vmware . vim25 . VMwareDVSPortSetting ( ) ; com . vmware . vim25 . VmwareDistributedVirtualSwitchVlanIdSpec newVlanIdSpec = new com . vmware . vim25 . VmwareDistributedVirtualSwitchVlanIdSpec ( ) ; newVlanIdSpec . setVlanId ( newvlanId ) ; newVmwareDvsPortSetting . setVlan ( newVlanIdSpec ) ; newTrafficShapingPolicy . setAverageBandwidth ( newAvgBw ) ; newTrafficShapingPolicy . setBurstSize ( newBurstSize ) ; newTrafficShapingPolicy . setPeakBandwidth ( newPeakBw ) ; newTrafficShapingPolicy . setEnabled ( newIsEnabled ) ; newVmwareDvsPortSetting . setInShapingPolicy ( newTrafficShapingPolicy ) ; when ( dvPortgroupConfigSpec . getNumPorts ( ) ) . thenReturn ( newNumPorts ) ; when ( dvPortgroupConfigSpec . isAutoExpand ( ) ) . thenReturn ( newAutoExpand ) ; when ( dvPortgroupConfigSpec . getDefaultPortConfig ( ) ) . thenReturn ( newVmwareDvsPortSetting ) ; boolean specCompareResult = com . cloud . hypervisor . vmware . mo . HypervisorHostHelper . isSpecMatch ( currentDvPortgroupInfo , dvPortgroupConfigSpec ) ; "<AssertPlaceHolder>" ; } isSpecMatch ( com . vmware . vim25 . DVPortgroupConfigInfo , com . vmware . vim25 . DVPortgroupConfigSpec ) { java . lang . String dvPortGroupName = newDvPortGroupSpec . getName ( ) ; com . cloud . hypervisor . vmware . mo . HypervisorHostHelper . s_logger . debug ( ( ( "Checking<sp>if<sp>configuration<sp>of<sp>dvPortGroup<sp>[" + dvPortGroupName ) + "]<sp>has<sp>changed." ) ) ; boolean specMatches = true ; com . vmware . vim25 . DVSTrafficShapingPolicy currentTrafficShapingPolicy ; currentTrafficShapingPolicy = currentDvPortgroupInfo . getDefaultPortConfig ( ) . getInShapingPolicy ( ) ; assert currentTrafficShapingPolicy != null ; com . vmware . vim25 . LongPolicy oldAverageBandwidthPolicy = currentTrafficShapingPolicy . getAverageBandwidth ( ) ; com . vmware . vim25 . LongPolicy oldBurstSizePolicy = currentTrafficShapingPolicy . getBurstSize ( ) ; com . vmware . vim25 . LongPolicy oldPeakBandwidthPolicy = currentTrafficShapingPolicy . getPeakBandwidth ( ) ; com . vmware . vim25 . BoolPolicy oldIsEnabledPolicy = currentTrafficShapingPolicy . getEnabled ( ) ; java . lang . Long oldAverageBandwidth = null ; java . lang . Long oldBurstSize = null ; java . lang . Long oldPeakBandwidth = null ; java . lang . Boolean oldIsEnabled = null ; if ( oldAverageBandwidthPolicy != null ) { oldAverageBandwidth = oldAverageBandwidthPolicy . getValue ( ) ; } if ( oldBurstSizePolicy != null ) { oldBurstSize = oldBurstSizePolicy . getValue ( ) ; } if ( oldPeakBandwidthPolicy != null ) { oldPeakBandwidth = oldPeakBandwidthPolicy . getValue ( ) ; } if ( oldIsEnabledPolicy != null ) { oldIsEnabled = oldIsEnabledPolicy . isValue ( ) ; } com . vmware . vim25 . DVSTrafficShapingPolicy newTrafficShapingPolicyInbound = newDvPortGroupSpec . getDefaultPortConfig ( ) . getInShapingPolicy ( ) ; com . vmware . vim25 . LongPolicy newAverageBandwidthPolicy = newTrafficShapingPolicyInbound . getAverageBandwidth ( ) ; com . vmware . vim25 . LongPolicy newBurstSizePolicy = newTrafficShapingPolicyInbound . getBurstSize ( ) ; com . vmware . vim25 . LongPolicy newPeakBandwidthPolicy = newTrafficShapingPolicyInbound . getPeakBandwidth ( ) ; com . vmware . vim25 . BoolPolicy newIsEnabledPolicy = newTrafficShapingPolicyInbound . getEnabled ( ) ; java . lang . Long newAverageBandwidth = null ; java . lang . Long newBurstSize = null ; java . lang . Long newPeakBandwidth = null ; java . lang . Boolean newIsEnabled = null ; if ( newAverageBandwidthPolicy != null ) { newAverageBandwidth = newAverageBandwidthPolicy . getValue ( ) ; } if ( newBurstSizePolicy != null ) { newBurstSize = newBurstSizePolicy . getValue ( ) ; } if ( newPeakBandwidthPolicy != null ) { newPeakBandwidth = newPeakBandwidthPolicy . getValue ( ) ; } if ( newIsEnabledPolicy != null ) { newIsEnabled = newIsEnabledPolicy . isValue ( ) ; } if ( ! ( oldIsEnabled . equals ( newIsEnabled ) ) ) { com . cloud . hypervisor . vmware . mo . HypervisorHostHelper . s_logger . info ( ( ( "Detected<sp>change<sp>in<sp>state<sp>of<sp>shaping<sp>policy<sp>(enabled/disabled)<sp>[" + newIsEnabled ) + "Detected<sp>change<sp>in<sp>state<sp>of<sp>shaping<sp>policy<sp>(enabled/disabled)<sp>[" 7 ) ) ; specMatches = false ; } if ( oldIsEnabled || newIsEnabled ) { if ( ( oldAverageBandwidth != null ) && ( ! ( oldAverageBandwidth . equals ( newAverageBandwidth ) ) ) ) { com . cloud . hypervisor . vmware . mo . HypervisorHostHelper . s_logger . info ( "Average<sp>bandwidth<sp>setting<sp>in<sp>new<sp>shaping<sp>policy<sp>doesn't<sp>match<sp>the<sp>existing<sp>setting." ) ; specMatches = false
org . junit . Assert . assertFalse ( specCompareResult )
testMonthNameDate ( ) { java . lang . String sqlText = ( "select<sp>d,<sp>MONTHNAME(d)<sp>as<sp>\"MONTHNAME\"<sp>from<sp>" + ( com . splicemachine . derby . utils . SpliceDateFunctionsIT . tableWatcherI ) ) + "<sp>order<sp>by<sp>d" ; try ( com . splicemachine . derby . utils . ResultSet rs = methodWatcher . executeQuery ( sqlText ) ) { java . lang . String expected = "<sp>from<sp>" 0 + ( ( ( ( ( ( "------------------------\n" + "2009-01-02<sp>|<sp>January<sp>|\n" ) + "2009-07-02<sp>|<sp>July<sp>|\n" ) + "2009-09-02<sp>|<sp>September<sp>|\n" ) + "2012-12-31<sp>|<sp>December<sp>|\n" ) + "2012-12-31<sp>|<sp>December<sp>|\n" ) + "2013-12-31<sp>|<sp>December<sp>|" ) ; "<AssertPlaceHolder>" ; } } toStringUnsorted ( com . splicemachine . homeless . ResultSet ) { return com . splicemachine . homeless . TestUtils . FormattedResult . ResultFactory . convert ( "" , rs , false ) . toString ( ) . trim ( ) ; }
org . junit . Assert . assertEquals ( ( ( "\n" + sqlText ) + "\n" ) , expected , TestUtils . FormattedResult . ResultFactory . toStringUnsorted ( rs ) )
testWeightAndJsonWithTensorflowScope ( ) { org . deeplearning4j . nn . multilayer . MultiLayerNetwork model = loadModel ( "modelimport/keras/tfscope/model.json.with.tensorflow.scope" , "modelimport/keras/tfscope/model.weight.with.tensorflow.scope" ) ; "<AssertPlaceHolder>" ; } loadModel ( java . lang . String , java . lang . String ) { org . nd4j . linalg . io . ClassPathResource modelResource = new org . nd4j . linalg . io . ClassPathResource ( modelJsonFilename , classLoader ) ; org . nd4j . linalg . io . ClassPathResource weightResource = new org . nd4j . linalg . io . ClassPathResource ( modelWeightFilename , classLoader ) ; org . deeplearning4j . nn . multilayer . MultiLayerNetwork network = null ; try { network = org . deeplearning4j . nn . modelimport . keras . KerasModelImport . importKerasSequentialModelAndWeights ( modelResource . getFile ( ) . getAbsolutePath ( ) , weightResource . getFile ( ) . getAbsolutePath ( ) , false ) ; } catch ( java . io . IOException | org . deeplearning4j . nn . modelimport . keras . exceptions . InvalidKerasConfigurationException | org . deeplearning4j . nn . modelimport . keras . exceptions . UnsupportedKerasConfigurationException e ) { e . printStackTrace ( ) ; } return network ; }
org . junit . Assert . assertNotNull ( model )
testCustomFormatSerialization ( ) { java . time . format . DateTimeFormatter formatter = java . time . format . DateTimeFormatter . ofPattern ( "HH:mm:ss" ) ; com . owlike . genson . Genson genson = createFormatterGenson ( formatter , java . time . LocalTime . class ) ; java . time . LocalTime dt = java . time . LocalTime . now ( ) ; java . lang . String formattedValue = formatter . format ( dt ) ; "<AssertPlaceHolder>" ; } toJsonQuotedString ( java . lang . String ) { return ( "\"" + string ) + "\"" ; }
org . junit . Assert . assertEquals ( toJsonQuotedString ( formattedValue ) , genson . serialize ( dt ) )
checkOtherDriverCompatibility ( ) { org . mariadb . jdbc . UrlParser jdbc = org . mariadb . jdbc . UrlParser . parse ( "jdbc:h2:mem:RZM;DB_CLOSE_DELAY=-1" ) ; "<AssertPlaceHolder>" ; } parse ( java . lang . String ) { return org . mariadb . jdbc . UrlParser . parse ( url , new java . util . Properties ( ) ) ; }
org . junit . Assert . assertTrue ( ( jdbc == null ) )
testSetArrayStart ( ) { final org . apache . commons . lang3 . builder . ToStringStyle style = new org . apache . commons . lang3 . builder . ToStringStyleTest . ToStringStyleImpl ( ) ; style . setArrayStart ( null ) ; "<AssertPlaceHolder>" ; } getArrayStart ( ) { return arrayStart ; }
org . junit . Assert . assertEquals ( "" , style . getArrayStart ( ) )
createPRPA201306ForPatientNotFoundSenderNull ( ) { org . hl7 . v3 . PRPAIN201306UV02 result ; gov . hhs . fha . nhinc . transform . subdisc . HL7PRPA201306Transforms transforms = new gov . hhs . fha . nhinc . transform . subdisc . HL7PRPA201306Transforms ( ) ; result = transforms . createPRPA201306ForPatientNotFound ( createPRPAIN201305UV02WhenSenderNull ( ) ) ; "<AssertPlaceHolder>" ; } createPRPAIN201305UV02WhenSenderNull ( ) { org . hl7 . v3 . PRPAIN201305UV02 query = new org . hl7 . v3 . PRPAIN201305UV02 ( ) ; query . setInteractionId ( createII ( ) ) ; query . getReceiver ( ) . add ( createMCCIMT000100UV01Receiver ( ) ) ; query . setControlActProcess ( createPRPAIN201305UV02ControlActProcess ( ) ) ; return query ; }
org . junit . Assert . assertNull ( result )
testMarshalUnmarshallDes ( ) { final javax . crypto . KeyGenerator generator = javax . crypto . KeyGenerator . getInstance ( "DES" ) ; final org . apache . camel . converter . crypto . CryptoDataFormat cryptoFormat = new org . apache . camel . converter . crypto . CryptoDataFormat ( "DES" , generator . generateKey ( ) ) ; org . apache . camel . CamelContext camelctx = new org . apache . camel . impl . DefaultCamelContext ( ) ; camelctx . addRoutes ( new org . apache . camel . builder . RouteBuilder ( ) { @ org . wildfly . camel . test . crypto . Override public void configure ( ) throws org . wildfly . camel . test . crypto . Exception { from ( "direct:start" ) . marshal ( cryptoFormat ) . unmarshal ( cryptoFormat ) ; } } ) ; camelctx . start ( ) ; try { org . apache . camel . ProducerTemplate producer = camelctx . createProducerTemplate ( ) ; java . lang . String result = producer . requestBody ( "direct:start" , "password" , java . lang . String . class ) ; "<AssertPlaceHolder>" ; } finally { camelctx . stop ( ) ; } } start ( ) { sshServer . start ( ) ; setupKnownHosts ( ) ; }
org . junit . Assert . assertEquals ( "password" , result . trim ( ) )
invalidStringLessOrEqualConstraintShouldCreateViolations ( ) { java . util . Set < javax . validation . ConstraintViolation < org . alien4cloud . tosca . model . definitions . PropertyDefinition > > violations = validator . validate ( createLessOrEqualDefinition ( ToscaTypes . STRING . toString ( ) , "value" ) , alien4cloud . tosca . container . validation . ToscaSequence . class ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( ( "name:<sp>[" + ( name ) ) + "],<sp>value:<sp>[" ) + ( value ) ) + "]" ; }
org . junit . Assert . assertEquals ( 2 , violations . size ( ) )
testJndiJdbcPool ( ) { com . enioka . jqm . test . helpers . CreationTools . createDatabaseProp ( "jmxEnabled" 3 , "org.hsqldb.jdbcDriver" , "jmxEnabled" 7 , "SA" , "jmxEnabled" 1 , cnx , "jmxEnabled" 0 , null ) ; cnx . runUpdate ( "jmxEnabled" 2 , "true" , "jmxEnabled" ) ; cnx . commit ( ) ; addAndStartEngine ( ) ; com . enioka . jqm . test . helpers . CreationTools . createJobDef ( null , true , "jmxEnabled" 4 , null , "jqm-tests/jqm-test-pyl-nodep/target/test.jar" , TestHelpers . qVip , 42 , "TestApp" , null , "jmxEnabled" 5 , "ModuleTest" , "other" , "other" , false , cnx ) ; com . enioka . jqm . api . JobRequest . create ( "TestApp" , "TestUser" ) . submit ( ) ; com . enioka . jqm . test . helpers . TestHelpers . waitFor ( 1 , 5000 , cnx ) ; com . enioka . jqm . test . helpers . TestHelpers . testOkCount ( 1 , cnx ) ; javax . management . MBeanServer mbs = java . lang . management . ManagementFactory . getPlatformMBeanServer ( ) ; int nb = ( ( java . lang . Integer ) ( mbs . getAttribute ( new javax . management . ObjectName ( "com.enioka.jqm:type=JdbcPool,name=jdbc/test" ) , "jmxEnabled" 6 ) ) ) ; "<AssertPlaceHolder>" ; } testOkCount ( long , com . enioka . jqm . jdbc . DbConn ) { return ( com . enioka . jqm . test . helpers . TestHelpers . getOkCount ( cnx ) ) == theoreticalOkCount ; }
org . junit . Assert . assertEquals ( 0 , nb )
testBadGet ( ) { org . easymock . EasyMock . replay ( s3Client , s3Transfer ) ; org . opencastproject . assetmanager . impl . storage . StoragePath path = new org . opencastproject . assetmanager . impl . storage . StoragePath ( org . opencastproject . assetmanager . aws . s3 . AwsS3AssetStoreTest . ORG_ID , org . opencastproject . assetmanager . aws . s3 . AwsS3AssetStoreTest . MP_ID , new org . opencastproject . assetmanager . impl . VersionImpl ( 1L ) , org . opencastproject . assetmanager . aws . s3 . AwsS3AssetStoreTest . ASSET_ID ) ; com . entwinemedia . fn . data . Opt < java . io . InputStream > streamOpt = store . get ( path ) ; "<AssertPlaceHolder>" ; } isSome ( ) { return new org . opencastproject . util . data . Function < org . opencastproject . util . data . Option < A > , java . lang . Boolean > ( ) { @ org . opencastproject . util . data . functions . Override public org . opencastproject . util . data . functions . Boolean apply ( org . opencastproject . util . data . Option < A > a ) { return a . isSome ( ) ; } } ; }
org . junit . Assert . assertFalse ( streamOpt . isSome ( ) )
headsWithQueryParametersFrom1_0OriginsViaExplicitProxiesCanNotBeCacheableEvenWithExpires ( ) { policy = new org . apache . hc . client5 . http . impl . cache . ResponseCachingPolicy ( 0 , true , true , true ) ; request = new org . apache . hc . core5 . http . message . BasicHttpRequest ( "HEAD" , "/foo?s=bar" ) ; response . setHeader ( "Date" , org . apache . hc . client5 . http . utils . DateUtils . formatDate ( now ) ) ; response . setHeader ( "Expires" , org . apache . hc . client5 . http . utils . DateUtils . formatDate ( tenSecondsFromNow ) ) ; response . setHeader ( "Via" , "HTTP/1.0<sp>someproxy" ) ; "<AssertPlaceHolder>" ; } isResponseCacheable ( org . apache . hc . core5 . http . HttpRequest , org . apache . hc . core5 . http . HttpResponse ) { final org . apache . hc . core5 . http . ProtocolVersion version = ( ( request . getVersion ( ) ) != null ) ? request . getVersion ( ) : org . apache . hc . core5 . http . HttpVersion . DEFAULT ; if ( ( version . compareToVersion ( HttpVersion . HTTP_1_1 ) ) > 0 ) { if ( log . isDebugEnabled ( ) ) { log . debug ( ( ( "Protocol<sp>version<sp>" + version ) + "<sp>is<sp>non-cacheable" ) ) ; } return false ; } final java . lang . String [ ] uncacheableRequestDirectives = new java . lang . String [ ] { org . apache . hc . client5 . http . cache . HeaderConstants . CACHE_CONTROL_NO_STORE } ; if ( hasCacheControlParameterFrom ( request , uncacheableRequestDirectives ) ) { log . debug ( "Response<sp>is<sp>explcitily<sp>non-cacheable<sp>per<sp>cache<sp>control<sp>directive" ) ; return false ; } if ( request . getRequestUri ( ) . contains ( "?" ) ) { if ( ( neverCache1_0ResponsesWithQueryString ) && ( from1_0Origin ( response ) ) ) { log . debug ( "Response<sp>is<sp>not<sp>cacheable<sp>as<sp>it<sp>had<sp>a<sp>query<sp>string" ) ; return false ; } else if ( ! ( isExplicitlyCacheable ( response ) ) ) { log . debug ( "Response<sp>is<sp>not<sp>cacheable<sp>as<sp>it<sp>is<sp>missing<sp>explicit<sp>caching<sp>headers" ) ; return false ; } } if ( expiresHeaderLessOrEqualToDateHeaderAndNoCacheControl ( response ) ) { log . debug ( "Expires<sp>header<sp>less<sp>or<sp>equal<sp>to<sp>Date<sp>header<sp>and<sp>no<sp>cache<sp>control<sp>directives" ) ; return false ; } if ( sharedCache ) { if ( ( ( request . countHeaders ( HeaderConstants . AUTHORIZATION ) ) > 0 ) && ( ! ( hasCacheControlParameterFrom ( response , org . apache . hc . client5 . http . impl . cache . ResponseCachingPolicy . AUTH_CACHEABLE_PARAMS ) ) ) ) { log . debug ( "Request<sp>contains<sp>private<sp>credentials" ) ; return false ; } } final java . lang . String method = request . getMethod ( ) ; return isResponseCacheable ( method , response ) ; }
org . junit . Assert . assertFalse ( policy . isResponseCacheable ( request , response ) )
testSerial ( ) { org . apache . commons . math4 . stat . descriptive . moment . VectorialCovariance stat = new org . apache . commons . math4 . stat . descriptive . moment . VectorialCovariance ( points [ 0 ] . length , true ) ; "<AssertPlaceHolder>" ; } serializeAndRecover ( java . lang . Object ) { try { java . io . ByteArrayOutputStream bos = new java . io . ByteArrayOutputStream ( ) ; java . io . ObjectOutputStream so = new java . io . ObjectOutputStream ( bos ) ; so . writeObject ( o ) ; java . io . ByteArrayInputStream bis = new java . io . ByteArrayInputStream ( bos . toByteArray ( ) ) ; java . io . ObjectInputStream si = new java . io . ObjectInputStream ( bis ) ; return si . readObject ( ) ; } catch ( java . lang . Exception e ) { throw new java . lang . RuntimeException ( e ) ; } }
org . junit . Assert . assertEquals ( stat , org . apache . commons . math4 . TestUtils . serializeAndRecover ( stat ) )
postProcessTokensCut ( ) { jetbrains . jetpad . base . Value < java . util . List < jetbrains . jetpad . hybrid . parser . Token > > lastSeenTokens = installTrackingPostProcessor ( true ) ; jetbrains . jetpad . hybrid . BaseHybridEditorEditingTest . type ( "1" ) ; selectLeft ( 1 ) ; jetbrains . jetpad . hybrid . BaseHybridEditorEditingTest . cut ( ) ; "<AssertPlaceHolder>" ; } get ( ) { return myValue . get ( ) ; }
org . junit . Assert . assertTrue ( lastSeenTokens . get ( ) . isEmpty ( ) )
getGroupDisplayName ( ) { java . lang . String group = "vmmgrp1" ; com . ibm . websphere . simplicity . log . Log . info ( com . ibm . ws . security . wim . adapter . ldap . fat . URAPIs_CustomLDAPTest . c , "getGroupDisplayName" , "Checking<sp>with<sp>a<sp>valid<sp>group." ) ; "<AssertPlaceHolder>" ; } getGroupDisplayName ( java . lang . String ) { return userRegistry . getGroupDisplayName ( securityName ) ; }
org . junit . Assert . assertEquals ( "vmmgrp1" , com . ibm . ws . security . wim . adapter . ldap . fat . URAPIs_CustomLDAPTest . servlet . getGroupDisplayName ( group ) )
testIsTableExistsNull ( ) { com . j256 . ormlite . support . DatabaseConnectionProxy proxy = new com . j256 . ormlite . support . DatabaseConnectionProxy ( null ) ; "<AssertPlaceHolder>" ; proxy . close ( ) ; } isTableExists ( java . lang . String ) { if ( ( proxy ) == null ) { return false ; } else { return proxy . isTableExists ( tableName ) ; } }
org . junit . Assert . assertFalse ( proxy . isTableExists ( "foo" ) )
testCountActiveWatingListNames ( ) { java . lang . String isHistory = "Y" ; java . lang . String isNotHistory = "N" ; org . oscarehr . common . model . WaitingListName waitingListName1 = new org . oscarehr . common . model . WaitingListName ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( waitingListName1 ) ; waitingListName1 . setIsHistory ( isNotHistory ) ; dao . persist ( waitingListName1 ) ; org . oscarehr . common . model . WaitingListName waitingListName2 = new org . oscarehr . common . model . WaitingListName ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( waitingListName2 ) ; waitingListName2 . setIsHistory ( isHistory ) ; dao . persist ( waitingListName2 ) ; org . oscarehr . common . model . WaitingListName waitingListName3 = new org . oscarehr . common . model . WaitingListName ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( waitingListName3 ) ; waitingListName3 . setIsHistory ( isNotHistory ) ; dao . persist ( waitingListName3 ) ; org . oscarehr . common . model . WaitingListName waitingListName4 = new org . oscarehr . common . model . WaitingListName ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( waitingListName4 ) ; waitingListName4 . setIsHistory ( isNotHistory ) ; dao . persist ( waitingListName4 ) ; long expectedResult = 3 ; long result = dao . countActiveWatingListNames ( ) ; "<AssertPlaceHolder>" ; } countActiveWatingListNames ( ) { javax . persistence . Query query = entityManager . createQuery ( "SELECT<sp>COUNT(*)<sp>FROM<sp>WaitingListName<sp>n<sp>WHERE<sp>n.isHistory<sp>=<sp>'N'" ) ; query . setMaxResults ( 1 ) ; return ( ( java . lang . Long ) ( query . getSingleResult ( ) ) ) ; }
org . junit . Assert . assertEquals ( expectedResult , result )
testScan_ts_same ( ) { recreateTable ( ) ; java . util . Date ts = parse ( "2000-01-01" , "yyyy-MM-dd" ) ; org . apache . hadoop . hbase . client . Put put = new org . apache . hadoop . hbase . client . Put ( rowKey_ForTest ) ; put . add ( allen . studyhbase . ColumnFamilyNameBytes , allen . studyhbase . QName1 , ts . getTime ( ) , org . apache . hadoop . hbase . util . Bytes . toBytes ( "a" ) ) ; table . put ( put ) ; java . util . Set < java . lang . String > resultRowKeys = new java . util . HashSet < java . lang . String > ( ) ; org . apache . hadoop . hbase . client . Scan scan = new org . apache . hadoop . hbase . client . Scan ( rowKey_ForTest , rowKey_ForTest ) ; scan . setTimeRange ( ts . getTime ( ) , ts . getTime ( ) ) ; org . apache . hadoop . hbase . client . ResultScanner resultScanner = table . getScanner ( scan ) ; for ( org . apache . hadoop . hbase . client . Result result = resultScanner . next ( ) ; result != null ; result = resultScanner . next ( ) ) { resultRowKeys . add ( org . apache . hadoop . hbase . util . Bytes . toString ( result . getRow ( ) ) ) ; } close ( resultScanner ) ; "<AssertPlaceHolder>" ; recreateTable ( ) ; } close ( java . io . Closeable ) { if ( closeable == null ) { return ; } try { closeable . close ( ) ; } catch ( java . io . IOException e ) { throw new com . alipay . simplehbase . exception . SimpleHBaseException ( "close<sp>closeable<sp>exception." , e ) ; } }
org . junit . Assert . assertTrue ( ( ( resultRowKeys . size ( ) ) == 0 ) )
a03_returnInt ( ) { "<AssertPlaceHolder>" ; } returnInt ( ) { return 1 ; }
org . junit . Assert . assertEquals ( 1 , proxy . returnInt ( ) )
test91getXAuditMapSearchCount ( ) { org . apache . ranger . common . SearchCriteria testSearchCriteria = createsearchCriteria ( ) ; testSearchCriteria . addParam ( "xUserId" , org . apache . ranger . biz . TestXUserMgr . userId ) ; org . apache . ranger . view . VXAuditMap vXAuditMap = getVXAuditMap ( ) ; java . util . List < org . apache . ranger . view . VXAuditMap > vXAuditMapList = new java . util . ArrayList < org . apache . ranger . view . VXAuditMap > ( ) ; vXAuditMapList . add ( vXAuditMap ) ; org . apache . ranger . view . VXAuditMapList auditMapList = new org . apache . ranger . view . VXAuditMapList ( ) ; auditMapList . setVXAuditMaps ( vXAuditMapList ) ; org . mockito . Mockito . when ( xAuditMapService . searchXAuditMaps ( ( ( org . apache . ranger . common . SearchCriteria ) ( org . mockito . Mockito . any ( ) ) ) ) ) . thenReturn ( auditMapList ) ; org . apache . ranger . view . VXLong vXLong = new org . apache . ranger . view . VXLong ( ) ; vXLong . setValue ( auditMapList . getListSize ( ) ) ; org . apache . ranger . view . VXLong vXLong1 = xUserMgr . getXAuditMapSearchCount ( testSearchCriteria ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return value ; }
org . junit . Assert . assertEquals ( vXLong . getValue ( ) , vXLong1 . getValue ( ) )
testInjectContext ( ) { "<AssertPlaceHolder>" ; }
org . junit . Assert . assertNotNull ( context )
testHighlightWithLinkInParagraph ( ) { java . lang . String term = "Bart<sp>Simpson" ; java . lang . String publication = "<p>Bart<sp>Simpson<sp>is<sp>the<sp>cooleast<sp>sk8ter<sp>in<sp>the<sp>world.<sp>Miss<sp>Krabappel<sp>doesn\'t<sp>see<sp>le<sp>good<sp>part<sp>in<sp><a<sp>href=\"www.simpson.com\"<sp>id=\"Bart<sp>Simpson\">Bart<sp>Simpson</a>.</p>" ; java . lang . String definition = "Skatter" ; java . lang . String className = "cool" ; boolean onlyFirst = false ; com . silverpeas . glossary . HighlightGlossaryTerms instance = new com . silverpeas . glossary . HighlightGlossaryTerms ( ) ; java . lang . String expResult = "<p><a<sp>href=\"#\"<sp>class=\"cool\"<sp>title=\"Skatter\">Bart<sp>Simpson</a><sp>is<sp>the<sp>cooleast<sp>sk8ter<sp>in<sp>the<sp>world.<sp>Miss<sp>Krabappel<sp>doesn\'t<sp>see<sp>le<sp>good<sp>part<sp>in<sp><a<sp>href=\"www.simpson.com\"<sp>id=\"Bart<sp>Simpson\">Bart<sp>Simpson</a>.</p>" ; java . lang . String result = instance . highlight ( term , publication , definition , className , onlyFirst ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( expResult , result )
testStepBroadcasted ( ) { final int [ ] bshape = new int [ ] { 1 , 5 , 1 } ; final int [ ] shape = new int [ ] { 4 , 5 , 6 } ; org . eclipse . january . dataset . ILazyDataset ld = org . eclipse . january . dataset . Random . lazyRand ( Dataset . INT32 , "Metadata1" , bshape ) ; org . eclipse . january . metadata . internal . SliceableTestMetadata md = new org . eclipse . january . metadata . internal . SliceableTestMetadata ( ld , null , null , null , null ) ; org . eclipse . january . dataset . ILazyDataset dataset = org . eclipse . january . dataset . Random . lazyRand ( Dataset . INT32 , "Main" , shape ) ; dataset . addMetadata ( md ) ; try { org . eclipse . january . dataset . SliceND snd = new org . eclipse . january . dataset . SliceND ( dataset . getShape ( ) ) ; snd . setSlice ( 1 , 0 , 5 , 2 ) ; org . eclipse . january . dataset . ILazyDataset slicedStep = dataset . getSliceView ( snd ) ; org . eclipse . january . metadata . internal . SliceableTestMetadata tmd = slicedStep . getFirstMetadata ( org . eclipse . january . metadata . internal . SliceableTestMetadata . class ) ; org . eclipse . january . dataset . ILazyDataset lazyDataset = tmd . getLazyDataset ( ) ; "<AssertPlaceHolder>" ; } catch ( java . lang . Exception e ) { org . junit . Assert . fail ( ( "Should<sp>not<sp>fail:<sp>" + e ) ) ; } } getShape ( ) { return shape ; }
org . junit . Assert . assertEquals ( slicedStep . getShape ( ) [ 1 ] , lazyDataset . getShape ( ) [ 1 ] )
testMissedInvertedMatch ( ) { org . graylog2 . plugin . streams . StreamRule rule = getSampleRule ( ) ; rule . setValue ( "^foo" ) ; rule . setInverted ( true ) ; org . graylog2 . plugin . Message msg = getSampleMessage ( ) ; msg . addField ( "something" , "foobar" ) ; org . graylog2 . streams . matchers . StreamRuleMatcher matcher = getMatcher ( rule ) ; "<AssertPlaceHolder>" ; } match ( org . graylog2 . plugin . Message , org . graylog2 . plugin . streams . StreamRule ) { java . lang . Double msgVal = getDouble ( msg . getField ( rule . getField ( ) ) ) ; if ( msgVal == null ) { return false ; } java . lang . Double ruleVal = getDouble ( rule . getValue ( ) ) ; if ( ruleVal == null ) { return false ; } return ( rule . getInverted ( ) ) ^ ( msgVal > ruleVal ) ; }
org . junit . Assert . assertFalse ( matcher . match ( msg , rule ) )
testExpandValueSetPropertySearchWithRegexExcludeNoFilter ( ) { createLoincSystemWithSomeCodes ( ) ; java . util . List < java . lang . String > codes ; ca . uhn . fhir . jpa . provider . dstu3 . ValueSet vs ; ca . uhn . fhir . jpa . provider . dstu3 . ValueSet outcome ; ca . uhn . fhir . jpa . provider . dstu3 . ValueSet . ConceptSetComponent exclude ; vs = new ca . uhn . fhir . jpa . provider . dstu3 . ValueSet ( ) ; vs . getCompose ( ) . addInclude ( ) . setSystem ( ca . uhn . fhir . jpa . provider . dstu3 . CS_URL ) ; exclude = vs . getCompose ( ) . addExclude ( ) ; exclude . setSystem ( ca . uhn . fhir . jpa . provider . dstu3 . CS_URL ) ; org . hl7 . fhir . instance . model . api . IIdType vsId = ourClient . create ( ) . resource ( vs ) . execute ( ) . getId ( ) ; outcome = ( ( ca . uhn . fhir . jpa . provider . dstu3 . ValueSet ) ( ourClient . operation ( ) . onInstance ( vsId ) . named ( "expand" ) . withNoParameters ( ca . uhn . fhir . jpa . provider . dstu3 . Parameters . class ) . execute ( ) . getParameter ( ) . get ( 0 ) . getResource ( ) ) ) ; codes = ca . uhn . fhir . jpa . provider . dstu3 . ResourceProviderDstu3ValueSetTest . toCodesContains ( outcome . getExpansion ( ) . getContains ( ) ) ; "<AssertPlaceHolder>" ; } empty ( ) { return ( items . size ( ) ) == 0 ; }
org . junit . Assert . assertThat ( codes , org . hamcrest . Matchers . empty ( ) )
incrementStatistic ( ) { com . madgnome . jira . plugins . jirachievements . data . ao . StatisticRefEnum statRef = com . madgnome . jira . plugins . jirachievements . data . ao . StatisticRefEnum . CREATED_ISSUE_COUNT ; createStatisticRef ( statRef ) ; com . madgnome . jira . plugins . jirachievements . data . ao . UserWrapper userWrapper = createUserWrapper ( ) ; daoService . createOrUpdate ( statRef , userWrapper , 1 ) ; daoService . incrementStatistic ( statRef , userWrapper , 2 ) ; "<AssertPlaceHolder>" ; } get ( int , int ) { com . madgnome . jira . plugins . jirachievements . data . ao . UserAchievement [ ] userAchievements = ao . find ( clazz , "ACHIEVEMENT_ID<sp>=<sp>?<sp>AND<sp>USER_WRAPPER_ID<sp>=<sp>?" , achievementId , userWrapperId ) ; return ( userAchievements . length ) > 0 ? userAchievements [ 0 ] : null ; }
org . junit . Assert . assertEquals ( daoService . get ( userWrapper , statRef ) . getValue ( ) , 3 )
getConnectionFromStatement ( ) { try ( io . sniffy . sql . Connection connection = io . sniffy . sql . DriverManager . getConnection ( "sniffy:jdbc:h2:mem:" , "sa" , "sa" ) ; io . sniffy . sql . Statement statement = connection . createStatement ( ) ) { "<AssertPlaceHolder>" ; } } getConnection ( ) { if ( null == ( dataSource ) ) throw new java . sql . SQLException ( "Target<sp>is<sp>not<sp>a<sp>DataSource<sp>instance" ) ; if ( ! ( SniffyConfiguration . INSTANCE . isMonitorJdbc ( ) ) ) return dataSource . getConnection ( ) ; java . sql . Connection delegateConnection ; long start = java . lang . System . currentTimeMillis ( ) ; java . lang . String url ; java . lang . String userName ; try { io . sniffy . Sniffy . enterJdbcMethod ( ) ; delegateConnection = dataSource . getConnection ( ) ; url = delegateConnection . getMetaData ( ) . getURL ( ) ; userName = delegateConnection . getMetaData ( ) . getUserName ( ) ; io . sniffy . sql . SniffyDriver . checkConnectionAllowed ( url , userName ) ; } finally { io . sniffy . Sniffy . exitJdbcMethod ( io . sniffy . sql . SniffyDataSource . GET_CONNECTION_METHOD , ( ( java . lang . System . currentTimeMillis ( ) ) - start ) , io . sniffy . sql . SniffyDataSource . GET_CONNECTION_METHOD_IMPL ) ; } return java . sql . Connection . class . cast ( java . lang . reflect . Proxy . newProxyInstance ( io . sniffy . sql . SniffyDriver . class . getClassLoader ( ) , new java . lang . Class [ ] { java . sql . Connection . class } , new io . sniffy . sql . ConnectionInvocationHandler ( delegateConnection , url , userName ) ) ) ; }
org . junit . Assert . assertEquals ( connection , statement . getConnection ( ) )
testListing ( ) { java . util . List < org . libreplan . business . orders . entities . Order > orderList = orderDAO . getOrders ( ) ; org . libreplan . business . orders . entities . Order newOrder = createValidOrder ( ) ; orderDAO . save ( newOrder ) ; "<AssertPlaceHolder>" ; } getOrders ( ) { return new org . libreplan . ws . orders . api . OrderListDTO ( findAll ( ) ) ; }
org . junit . Assert . assertThat ( orderDAO . getOrders ( ) . size ( ) , org . hamcrest . CoreMatchers . equalTo ( ( ( orderList . size ( ) ) + 1 ) ) )